Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] Libraries built with buildroot can only be used by buildroot itself.
@ 2013-07-30  4:40 Woody Wu
  2013-07-30  4:54 ` Alexander Lukichev
  2013-07-30  6:22 ` Thomas De Schampheleire
  0 siblings, 2 replies; 7+ messages in thread
From: Woody Wu @ 2013-07-30  4:40 UTC (permalink / raw)
  To: buildroot

Hi,

** In below example, I will talk directfb libraries, but I am afraid it it
   not specific to directfb but a more general case.

Using buildroot and BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM201203, I got
build with some graphics libraries (in my case, these are direct frame
buffer libraries, i.e., BR2_PACKAGE_DIRECTFB). Then I want to use these
cross compiled libraries to cross compile my own written very simple
directfb application code.


What I did is:

    crossroot=/home/woody/buildroot-2013.05/ 
        output/host/usr/arm-buildroot-linux-gnueabi/sysroot
    rm -f *.o hline
    arm-none-linux-gnueabi-gcc -I ${crossroot}/usr/include/directfb \
        -D_GNU_SOURCE -o hline.o -c hline.c
    arm-none-linux-gnueabi-gcc -I ${crossroot}/usr/include/directfb \
        -D_GNU_SOURCE -o hline hline.o -ldirectfb -L ${crossroot}/usr/lib

In case one, I set my path to use the gcc from my own Codesourcery
installation, which is the same version as that buildroot is using.
Actually, this Codesourcery installation is a direct uncompress from the
tarball that buildroot downloaded from net to its download directory.

In case two, I set my path to use the gcc directly in buildroot, i.e,
under /home/woody/buildroot-2013.05/host/usr/bin

In case two, it built with success. But case one, it did not:

/home/woody/arm-2012.03/bin/../lib/gcc/arm-none-linux-gnueabi/4.6.3/../../../../arm-none-linux-gnueabi/bin/ld: skipping incompatible /lib/libc.so.6 when searching for /lib/libc.so.6
/home/woody/arm-2012.03/bin/../lib/gcc/arm-none-linux-gnueabi/4.6.3/../../../../arm-none-linux-gnueabi/bin/ld: cannot find /lib/libc.so.6
/home/woody/arm-2012.03/bin/../lib/gcc/arm-none-linux-gnueabi/4.6.3/../../../../arm-none-linux-gnueabi/bin/ld: skipping incompatible /usr/lib/libc_nonshared.a when searching for /usr/lib/libc_nonshared.a
/home/woody/arm-2012.03/bin/../lib/gcc/arm-none-linux-gnueabi/4.6.3/../../../../arm-none-linux-gnueabi/bin/ld: cannot find /usr/lib/libc_nonshared.a
/home/woody/arm-2012.03/bin/../lib/gcc/arm-none-linux-gnueabi/4.6.3/../../../../arm-none-linux-gnueabi/bin/ld: cannot find /lib/ld-linux.so.3
collect2: ld returned 1 exit status


I don't understand why the error happened.  It seems the cross compiler
of buildroot understood things correctly, but the same cross compiler
install by myself did not.

Can anyone please give me hint?

-- 
I can't go back to yesterday - because I was a different person then

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-07-31  8:57 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-30  4:40 [Buildroot] Libraries built with buildroot can only be used by buildroot itself Woody Wu
2013-07-30  4:54 ` Alexander Lukichev
2013-07-30  9:00   ` Woody Wu
2013-07-30  6:22 ` Thomas De Schampheleire
2013-07-30  8:57   ` Woody Wu
2013-07-30  9:19     ` Thomas Petazzoni
2013-07-31  8:57       ` Woody Wu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox