[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: libtool/make and sysroot

From: Daniel Herring
Subject: Re: libtool/make and sysroot
Date: Sun, 21 Mar 2010 14:56:33 -0400 (EDT)
User-agent: Alpine 2.00 (LNX 1167 2008-08-23)

On Sun, 21 Mar 2010, Ersin Akinci wrote:
I've been trying to build DirectFB, and I think that I've narrowed down a bug 
in the build process to what might be a confusing
make or libtool behavior.  I've been cross-compiling using --sysroot for gcc so 
that everything will link against a custom set
of libraries that I've built.  Here's my full configure line (the important 
part is to note that
DirectFB chokes, however, when it starts to build a certain tool, 
directfb-csource, that requires libpng.  Here's the relevant
part from the build:

address@hidden DirectFB-1.4.3]$ make directfb-csource
make -C tools directfb-csource                      
make[1]: Entering directory `/home/ersin/vorpo/build/DirectFB-1.4.3/tools'
i386-linux-gcc --sysroot=/home/ersin/vorpo/toolchain -DHAVE_CONFIG_H -I. -I.. 
-I../lib -I../include -I../include -I../lib
-I../src -DDATADIR=\"/usr/share/directfb-1.4.3\" -D_REENTRANT  
-I/usr/include/freetype2   -O3 -ffast-math -pipe -Os
-D_GNU_SOURCE  -Werror-implicit-function-declaration -MT directfb-csource.o -MD 
-MP -MF .deps/directfb-csource.Tpo -c -o
directfb-csource.o directfb-csource.c                                   
mv -f .deps/directfb-csource.Tpo .deps/directfb-csource.Po                      
/bin/sh ../libtool --tag=CC   --mode=link i386-linux-gcc 
--sysroot=/home/ersin/vorpo/toolchain -I/usr/include/freetype2   -O3
-ffast-math -pipe -Os -D_GNU_SOURCE  -Werror-implicit-function-declaration   -o 
directfb-csource directfb-csource.o -lpng12 -ldl
mkdir .libs                                                                     
i386-linux-gcc --sysroot=/home/ersin/vorpo/toolchain -I/usr/include/freetype2 
-O3 -ffast-math -pipe -Os -D_GNU_SOURCE
-Werror-implicit-function-declaration -o directfb-csource directfb-csource.o  
/usr/lib/ -ldl -lpthread
ux-uclibc/bin/ld: warning:, needed by /usr/lib/, not found 
(try using -rpath or -rpath-link)
ux-uclibc/bin/ld: warning:, needed by /usr/lib/, not found 
(try using -rpath or -rpath-link)
/usr/lib/ undefined reference to address@hidden'
collect2: ld returned 1 exit status
make[1]: *** [directfb-csource] Error 1
make[1]: Leaving directory `/home/ersin/vorpo/build/DirectFB-1.4.3/tools'
make: *** [directfb-csource] Error 2
address@hidden DirectFB-1.4.3]$

Something strange is going on here.  Look at the lines after "mkdir .libs" 

It looks like libtool is reading the wrong .la file and changing paths on you. The output of `libtool --version` might be useful. For proper debugging,

# cd /home/ersin/vorpo/build/DirectFB-1.4.3/tools
# /bin/sh ../libtool --debug --tag=CC   --mode=link i386-linux-gcc --sysroot=/home/ersin/vorpo/toolchain -I/usr/include/freetype2 -O3 -ffast-math -pipe -Os -D_GNU_SOURCE -Werror-implicit-function-declaration  -o directfb-csource directfb-csource.o -lpng12 -ldl -lpthread > libtool-debug.txt

Search this for the first occurrance of /usr/lib/ and then look backwards for a .la. Or just grep the /usr/lib/ text file. If you find this path in an offending .la file, rename that file to .la-bak and try recompiling.

These .la files can be absolutely essential in some situations, and a complete nightmare in others.

The .la file problem is my first guess. If its not the issue, then upload the libtool-debug.txt file to a paste bin somewhere and submit a link to this list.

- Daniel

reply via email to

[Prev in Thread] Current Thread [Next in Thread]