Hi, On Tue, 2007-09-04 at 11:04 +0200, Pedro Aguilar wrote: > This is a problem regarding the ST cross toolchain for the SH4 arch. I had > the same problems compiling GTK over DirectFB. > > This issue can be solved creating soft links of the libraries that libtool > searches, but it's not a clean way. > > A good solution could be to create a well-configured toolchain.
You are mixing two different issues here. One is libtool searching in the 'wrong' directories when cross-compiling. This can either be resolved by manually changing all *.la files (last line: libdir=), or by setting an environment variable during configure: LIBTOOL_PREFIX_BASE=<your exported rootfs>, which is more clean as it allows to build cross and native. The first solution would break native builds on the target platform. The second issue, the wrong ld being used isn't a problem with our toolchain either. In fact that's a libtool bug. A better workaround is to use the cross libtool provided with the STLinux distribution by setting LIBTOOL=/opt/STM/STLinux-2.3ear/host/bin/libtool during configure which should do the trick. Alternatively, one can set LD=sh4-linux-ld during make. More information on all this can be found here: http://www.metastatic.org/text/libtool.html Greets, Andre' > Regards, > -- > Pedro Aguilar > > > Configured with following: > > /home/raymond/sh4/DirectFB-1.0.0/configure --build=i686-linux > > --host=sh4-linux --target=sh4-linux > > --prefix=/opt/STM/STLinux-2.0/devkit/sh4/target/usr > > --cache-file=/home/raymond/sh4/DirectFB-1.0.0/sh4.cache --enable-static > > --with-tests > > > > $ make > > rm -f .libs/libdirectfb_fbdev.a.tmp/*.o > > if test -d .libs/libdirectfb_fbdev.a.tmp; then rmdir > > .libs/libdirectfb_fbdev.a.tmp; fi > > mkdir .libs/libdirectfb_fbdev.a.tmp > > (cd .libs/libdirectfb_fbdev.a.tmp && > > /opt/STM/STLinux-2.0/devkit/sh4/bin/sh4-linux-ar x > > ../../.libs/libdirectfb_fbdev.a) > > ld -o libdirectfb_fbdev.o -r .libs/libdirectfb_fbdev.a.tmp/*.o > > ld: .libs/libdirectfb_fbdev.a.tmp/agp.o: Relocations in generic ELF (EM: > > 42) > > .libs/libdirectfb_fbdev.a.tmp/agp.o: could not read symbols: File in wrong > > format > > make: *** [libdirectfb_fbdev.o] Error 1 > > > > Creating a soft link /usr/bin/ld to > > /opt/STM/STLinux-2.0/devkit/sh4/bin/sh4-linux-ld workaround the problem; > > I would very much prefer to fixed the problem. > > > > Can someone tell me where to start looking or if there is already a patch > > out there? > > > > Thanks, > > > > Raymond Pau > > InnoMedia Pte Ltd_______________________________________________ > > directfb-dev mailing list > > [email protected] > > http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev > > > > > > _______________________________________________ > directfb-dev mailing list > [email protected] > http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev _______________________________________________ directfb-dev mailing list [email protected] http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev
