[Buildroot] DirectFB fails to build with buildroot 2009.11

Gilles Talis gilles.talis at gmail.com
Thu Jan 28 13:34:03 UTC 2010


That's great! Thanks a lot. I'll give that a try right away.

2010/1/28 Lionel Landwerlin <llandwerlin at gmail.com>

> Hello
> I'm experiencing the same problem since I'm using external toolchains. It
> took me quite a few time to figure out the problem (and when cross compiling
> from amd64 to i386, you don't even get any error at link time, but generated
> binaries are unusuable...).
> The problem is that when installing directfb, librairies are relinked for
> the destination directory. This relink step uses the .la linker scripts from
> the directfb installation which haven't been processed to replace the libdir
> path.
> Thus, it ends up adding -L/usr/lib instead of -L$(STAGING_DIR)/usr/lib to
> the compiler options.
> Here is a patch to fix the problem. Apply it to your buildroot copy, and rm
> -rf output/build/directfb-1.4.2
> I'm pretty sure that others librairies have the same issue. We might need
> to factorise this fix in Makefile.autotools.in... Not sure yet.
> Regards,
> --
> Lionel
> On Thu, Jan 28, 2010 at 2:13 PM, Gilles Talis <gilles.talis at gmail.com>wrote:
>> Hi,
>> I am trying to cross-compile DirectFB using buildroot and I have an issue
>> during the installation phase.
>> I am using an external binary toolchain (codesourcery ARM toolchain). The
>> output of my compilation is as follows:
>> I have the same error for pretty much all libraries generated by the build
>> process. At some point, compiler points the wrong libs directory: /usr/lib
>> instead of <staging_dir>/usr/lib
>> This is specific to DirectFB as I can compile about almost anything else
>> :-)
>> Example with the one of the GFX drivers libs generated:
>> Making install in nvidia
>> make[4]: Entering directory
>> `/work/arm-linux/build/directfb-1.4.2/gfxdrivers/nvidia'
>> make[5]: Entering directory
>> `/work/arm-linux/build/directfb-1.4.2/gfxdrivers/nvidia'
>> make[5]: Nothing to be done for `install-exec-am'.
>> test -z "/usr/lib/directfb-1.4-0/gfxdrivers" || /bin/mkdir -p
>> "/work/arm-linux/target/usr/lib/directfb-1.4-0/gfxdrivers"
>> test -z "/usr/lib/directfb-1.4-0/gfxdrivers" || /bin/mkdir -p
>> "/work/arm-linux/target/usr/lib/directfb-1.4-0/gfxdrivers"
>>  /bin/bash ../../libtool   --mode=install /usr/bin/install -c -s '
>> libdirectfb_nvidia.la'
>> '/work/arm-linux/target/usr/lib/directfb-1.4-0/gfxdrivers/
>> libdirectfb_nvidia.la'
>> libtool: install: warning: relinking `libdirectfb_nvidia.la'
>> (cd /work/arm-linux/build/directfb-1.4.2/gfxdrivers/nvidia; /bin/bash
>> ../../libtool  --tag=CC --mode=relink
>> /data/omap_linux/a0919486/arm-unknown-linux-uclibcgnueabi/bin/arm-linux-gcc
>> -Os -pipe -Os --sysroot /work/arm-linux/staging/ -O3 -ffast-math -pipe -Os
>> -pipe -Os --sysroot /work/arm-linux/staging/ -D_GNU_SOURCE
>> -Werror-implicit-function-declaration -module -avoid-version --sysroot
>> /work/arm-linux/staging/ -lz --sysroot /work/arm-linux/staging/ -o
>> libdirectfb_nvidia.la -rpath /usr/lib/directfb-1.4-0/gfxdrivers nvidia.lo
>> nvidia_state.lo nvidia_2d.lo nvidia_3d.lo nvidia_primary.lo
>> nvidia_overlay.lo -lm ../../lib/direct/libdirect.la ../../lib/fusion/
>> libfusion.la ../../src/libdirectfb.la -ldl -lpthread -inst-prefix-dir
>> /work/arm-linux/target)
>> /data/omap_linux/a0919486/arm-unknown-linux-uclibcgnueabi/bin/arm-linux-gcc
>> -Os -pipe -Os  --sysroot /work/arm-linux/staging/ -shared  .libs/nvidia.o
>> .libs/nvidia_state.o .libs/nvidia_2d.o .libs/nvidia_3d.o
>> .libs/nvidia_primary.o .libs/nvidia_overlay.o  -lz -lm
>> -L/work/arm-linux/target/usr/lib -L/usr/lib -ldirect -lfusion -ldirectfb
>> -ldl -lpthread  -Wl,-soname -Wl,libdirectfb_nvidia.so -o
>> .libs/libdirectfb_nvidia.so
>> /usr/lib/libm.so: file not recognized: File format not recognized
>> collect2: ld returned 1 exit status
>> libtool: install: error: relink `libdirectfb_nvidia.la' with the above
>> command before installing it
>> make[5]: *** [install-nvidiaLTLIBRARIES] Error 1
>> Any help would be highly appreciated
>> Gilles.
>> _______________________________________________
>> buildroot mailing list
>> buildroot at busybox.net
>> http://lists.busybox.net/mailman/listinfo/buildroot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20100128/7ba8205b/attachment.html>

More information about the buildroot mailing list