libtool
[Top][All Lists]
Advanced

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

RE: libtool is not wanting to play nicely with cross compiler


From: Andy Falanga (afalanga)
Subject: RE: libtool is not wanting to play nicely with cross compiler
Date: Tue, 7 Apr 2015 14:53:28 +0000

> -----Original Message-----
> From: Bob Friesenhahn [mailto:address@hidden
> Sent: Tuesday, April 07, 2015 7:26 AM
> To: Andy Falanga (afalanga)
> Cc: address@hidden
> Subject: Re: libtool is not wanting to play nicely with cross compiler
> 
> On Mon, 6 Apr 2015, Andy Falanga (afalanga) wrote:
> 
> > I'm working on compiling some code for an ARM processor on a Xilinx
> > board.  I did not do the work of configuring the cross compiler and
> so
> > am ignorant about some parts of this process.
> 
> I recommend reading the Autoconf manual as pertains to cross-
> compilation.
> 
> How are your cross-tools named?  Tool naming is important.
> 
> What are the arguments that you passed to configure?

Sorry, I should have supplied them in the email.  Here they are:

CPPFLAGS=-I/src/afalanga/crisscross/tmp/sysroots/zc706-zynq7/usr/include/python2.7
 LDFLAGS=-L/src/afalanga/crisscross/tmp/sysroots/zc706-zynq7/usr/lib 
LIBS=-lpython2.7 ./configure --build=x86_64-linux --host=arm-poky-linux-gnueabi

The extra stuff in CPPFLAGS, LDFLAGS and LIBS is needed in order for the 
boost.m4 macro 
system I'm using for finding Boost libraries to find python which was built by 
yocto.


> 
> > I've finally gotten my configure script to complete and was running
> > the main compilation when I ran into this error:
> >
> > libtool: link: warning:
> > `/src/afalanga/crisscross/tmp/sysroots/zc706-
> zynq7/usr/lib/libstdc++.l
> > a' seems to be moved
> > libtool: link: warning:
> > `/src/afalanga/crisscross/tmp/sysroots/zc706-
> zynq7/usr/lib/libstdc++.l
> > a' seems to be moved
> > libtool: link: warning:
> > `/src/afalanga/crisscross/tmp/sysroots/zc706-
> zynq7/usr/lib/libstdc++.l
> > a' seems to be moved
> > /bin/grep: /usr/lib/libstdc++.la: No such file or directory
> > /bin/sed: can't read /usr/lib/libstdc++.la: No such file or directory
> > libtool: link: `/usr/lib/libstdc++.la' is not a valid libtool archive
> 
> The .la files are just text files which libtool uses to remember build
> information to be re-used when using the associated library.  The
> complaint about being moved is because these files are located in a
> different place than when they were originally installed (by whoever
> built/packaged them).  The .la file contains paths which are not
> correct for your current library installation.

I had read other posts about this problem, or warning message, and that
this is the reason for why.  I figured that the path as specified in
libstdc++.la was fine because that path is what's put into the image put
on the Xilinx board.  In other words, I know the path isn't correct for
the build system, but it correct for the host system.  Perhaps my
understanding is incorrect.

> 
> >
> > However, it seems that libtool decides that it will look in
> '/uar/lib'
> > for libstdc++.la anyway and ignore that it found the file where it
> was
> > told it would.  Well, just as is indicated, there isn't a
> libstdc++.la
> > file in '/usr/lib'.  How do I make libtool happy with the la archive
> > (is that what they're called) that it should be using?
> 
> Libtool does work for cross-compilation mode but tools must be named
> appropriately, autoconf arguments must be supplied appropriately, and
> the build toolchain needs to be smart enough to use its own sysroot for
> cross-compilation rather than accidentally using host system
> libraries/headers.

I do question if this is the case.  As the build is scrolling by, I see
paths to the local, build, system root rather than the sysroot as you
stated.

> 
> Not every configure script is appropriately prepared for cross-
> compilation since some tests are impossible when cross-compiling and so
> appropriate defaults need to be supplied.

What is it that I must ensure is done properly?

Andy



reply via email to

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