Hi,
I'm new here. I'm running Attitude Adjustment on my device, and I'm running Ubuntu 11.04 on my dev machine. I'm trying to compile a program for use on OpenWRT. I'm pretty much a Linux virgin, but I am a professional .Net developer. So I'm not a complete retard :)
I have followed some walkthroughs and now the program I am trying to compile is giving me this error, and I'm stuck:
ccache_cc -L/home/user/hub-ctrl/openwrt/staging_dir/target-i386_uClibc-0.9.33.2/usr/lib -L/home/user/hub-ctrl/openwrt/staging_dir/target-i386_uClibc-0.9.33.2/lib -L/home/user/hub-ctrl/openwrt/staging_dir/toolchain-i386_gcc-4.6-linaro_uClibc-0.9.33.2/usr/lib -L/home/user/hub-ctrl/openwrt/staging_dir/toolchain-i386_gcc-4.6-linaro_uClibc-0.9.33.2/lib -o hub-ctrl hub-ctrl.o -lusb
hub-ctrl.o: In function `hub_port_status':
hub-ctrl.c:(.text+0x364): undefined reference to `__stack_chk_fail'
hub-ctrl.o: In function `usb_find_hubs':
hub-ctrl.c:(.text+0x7bf): undefined reference to `__stack_chk_fail'
collect2: ld returned 1 exit status
make[3]: *** [hub-ctrl] Error 1
make[3]: Leaving directory `/home/user/hub-ctrl/openwrt/build_dir/target-i386_uClibc-0.9.33.2/hub-ctrl'
make[2]: *** [/home/user/hub-ctrl/openwrt/build_dir/target-i386_uClibc-0.9.33.2/hub-ctrl/.built] Error 2
make[2]: Leaving directory `/home/user/hub-ctrl/openwrt/package/hub-ctrl'
make[1]: *** [package/hub-ctrl/compile] Error 2
make[1]: Leaving directory `/home/user/hub-ctrl/openwrt'
make: *** [package/hub-ctrl/compile] Error 2
I read that using make dflags="-fno-stack-protector" might resolve it. I've tried this to no avail. The program compiles fine using the Ubuntu compiler (gcc).
The full program is available here:http://www.gniibe.org/oitoite/ac-power-control-by-USB-hub/hub-ctrl.c
If anyone could provide some assistance it would be much appreciated :)
Cheers,
Henry