Hi all,
I've just setup a cross compiler toolchain so i can compile programs for a Ben NanoNote running openwrt. The wiki for the NanoNote has this page with a basic c program and Makefile to test the compiler works: http://en.qi-hardware.com/wiki/Compilin … e_NanoNote
I've copied and pasted the code from here changing the directories to reflect my setup but when i try and run Make, or the gcc command make generates, I get an error from ld stating it can't find some of the libraries required by SDL.
Heres the output i get from make:
marco@ServerLOL:/media/HDD/Apps/NanoNote/Apps/Test$ make V=99
/media/HDD/Apps/NanoNote/OS/openwrt-xburst/staging_dir/toolchain-mipsel_gcc-4.6-linaro_uClibc-0.9.33.2/bin/mipsel-openwrt-linux-uclibc-gcc main.o -o hello-sdl -W1,-rpath-link=/media/HDD/Apps/NanoNote/OS/openwrt-xburst/staging_dir/target-mipsel_uClibc-0.9.33.2/usr/lib -lSDL -L/media/HDD/Apps/NanoNote/OS/openwrt-xburst/staging_dir/target-mipsel_uClibc-0.9.33.2/usr/lib
mipsel-openwrt-linux-uclibc-gcc: warning: environment variable 'STAGING_DIR' not defined
mipsel-openwrt-linux-uclibc-gcc: warning: environment variable 'STAGING_DIR' not defined
/media/HDD/Apps/NanoNote/OS/openwrt-xburst/staging_dir/toolchain-mipsel_gcc-4.6-linaro_uClibc-0.9.33.2/lib/gcc/mipsel-openwrt-linux-uclibc/4.6.4/../../../../mipsel-openwrt-linux-uclibc/bin/ld: warning: libdirectfb-1.4.so.0, needed by /media/HDD/Apps/NanoNote/OS/openwrt-xburst/staging_dir/target-mipsel_uClibc-0.9.33.2/usr/lib/libSDL.so, not found (try using -rpath or -rpath-link)
/media/HDD/Apps/NanoNote/OS/openwrt-xburst/staging_dir/toolchain-mipsel_gcc-4.6-linaro_uClibc-0.9.33.2/lib/gcc/mipsel-openwrt-linux-uclibc/4.6.4/../../../../mipsel-openwrt-linux-uclibc/bin/ld: warning: libfusion-1.4.so.0, needed by /media/HDD/Apps/NanoNote/OS/openwrt-xburst/staging_dir/target-mipsel_uClibc-0.9.33.2/usr/lib/libSDL.so, not found (try using -rpath or -rpath-link)
/media/HDD/Apps/NanoNote/OS/openwrt-xburst/staging_dir/toolchain-mipsel_gcc-4.6-linaro_uClibc-0.9.33.2/lib/gcc/mipsel-openwrt-linux-uclibc/4.6.4/../../../../mipsel-openwrt-linux-uclibc/bin/ld: warning: libdirect-1.4.so.0, needed by /media/HDD/Apps/NanoNote/OS/openwrt-xburst/staging_dir/target-mipsel_uClibc-0.9.33.2/usr/lib/libSDL.so, not found (try using -rpath or -rpath-link)
/media/HDD/Apps/NanoNote/OS/openwrt-xburst/staging_dir/target-mipsel_uClibc-0.9.33.2/usr/lib/libSDL.so: undefined reference to `DirectFBCreate'
/media/HDD/Apps/NanoNote/OS/openwrt-xburst/staging_dir/target-mipsel_uClibc-0.9.33.2/usr/lib/libSDL.so: undefined reference to `DirectFBErrorString'
/media/HDD/Apps/NanoNote/OS/openwrt-xburst/staging_dir/target-mipsel_uClibc-0.9.33.2/usr/lib/libSDL.so: undefined reference to `DirectFBError'
/media/HDD/Apps/NanoNote/OS/openwrt-xburst/staging_dir/target-mipsel_uClibc-0.9.33.2/usr/lib/libSDL.so: undefined reference to `DirectFBInit'
collect2: ld returned 1 exit status
make: *** [hello-sdl] Error 1
I believe the error about STAGING_DIR not being defined is irelevant, it's set in the makefile and i've tried setting it to the same value as an environment variable but this made no diffirence to the SDL errors, it just removed the warnings about STAGING_DIR
The files it says are missing can all be found in the directory included by -rpath-link and -L:
marco@ServerLOL:/media/HDD/Apps/NanoNote/Apps/Test$ ls -l /media/HDD/Apps/NanoNote/OS/openwrt-xburst/staging_dir/target-mipsel_uClibc-0.9.33.2/usr/lib
total 9528
drwxrwxr-x 6 marco marco 4096 May 16 13:07 directfb-1.4-0
-rwxrwxr-x 1 marco marco 1715892 May 16 13:09 libasound.a
...
lrwxrwxrwx 1 marco marco 22 May 16 13:07 libdirect-1.4.so.0 -> libdirect-1.4.so.0.2.0
-rwxrwxr-x 1 marco marco 77721 May 16 13:07 libdirect-1.4.so.0.2.0
lrwxrwxrwx 1 marco marco 24 May 16 13:07 libdirectfb-1.4.so.0 -> libdirectfb-1.4.so.0.2.0
-rwxrwxr-x 1 marco marco 601334 May 16 13:07 libdirectfb-1.4.so.0.2.0
...
lrwxrwxrwx 1 marco marco 22 May 16 13:07 libfusion-1.4.so.0 -> libfusion-1.4.so.0.2.0
-rwxrwxr-x 1 marco marco 43125 May 16 13:07 libfusion-1.4.so.0.2.0
...
drwxrwxr-x 2 marco marco 4096 May 16 12:23 lua
drwxrwxr-x 2 marco marco 4096 May 16 13:10 pkgconfig
the SDL libraries is in the same folder and I assume its found that ok as the errors all seem to be about SDL's own requirements.
Can anyone give me any help with these errors?