[poky] Is the grammar of .la files changed in new libtool 2.4?

Lu, Lianhao lianhao.lu at intel.com
Tue Jan 25 22:39:59 PST 2011


Garman, Scott A wrote on 2011-01-26:
> On 01/25/2011 09:56 PM, Lu, Lianhao wrote:
>> Hi Scott,
>> 
>> I'm wondering whether the grammar of the .la files generated by new
>> libtool 2.4 is different from the old ones. Take the file
>> libxcb-res.la generated by libxcb for example, it contains a line:
>> 
>> dependency_libs=' =/usr/lib/libxcb.la =/usr/lib/libXau.la'
>> 
>> While in the old libxcb.la file, this line appeared to be
>> 
>> dependency_libs=' /usr/lib/libxcb.la /usr/lib/libxcb.la'
>> 
>> Is the "=" a new grammar for liblool 2.4? Because in meta-toolchain,
>> it needs to fix these .la files by replacing all the "/usr/lib" to
>> "${SDKTARGETSYSROOT}/usr/lib", etc. This new "=" causes the original
>> regular expression not work.
> 
> Hi Lianhao,
> 
> I'm not sure if the "=" grammar changed with Libtool 2.4 or not, as I
> haven't spent any time digging into Libtool when we used 2.2 a while ago.
> 
> I do believe you will run into problems if you try to set
> dependency_libs to =/usr/lib. The reason is that you should not be
> adding system default directories to dependency_libs.
> =${SDKTARGETSYSROOT}/usr/lib should be fine.
> 
> Where is the regular expression you're referring to above? Since Poky
> has been using Libtool 2.4 for a while now (I simply enabled sysroot
> support), I would think this error would have cropped up much earlier.
> 
>> b.t.w. Do we still need the code in meta-toolchain to fix broken .la
>> files? According to my understanding, the new sysroot support in
>> libtool 2.4 should solve this problem, right? Thanks!
> 
> Again, which code snippet are you referring to (file and line #,
> please)? There are some changes I made to remove .la munging code, and
> I'm pretty sure Richard reviewed it giving consideration to how it
> would impact the meta-toolchain builds.

The code snippet I mentioned about fixing broken .la files is in function do_populate_sdk() in file meta/recipies-core/meta/meta-toolchina.bb, you might search for "# Fix or remove broken .la files" to locate the code.

> Once I have the code sections to examine we should be able to iron
> this out more clearly.
> 

I have one more question about how to use the new libtool (sysroot enabled libroot 2.4) in meta-toolchain. Is there anything missing in the following sequence(takes mips as example)? Thank you!

$libtoolize --automake
$aclocal -I <m4 dir containing m4 files from libtool 2.4> 
$autoconf
$autoheader
$automake -a
$./configure --host=mips-poky-linux --target=mips-poky-linux --with-libtool-sysroot=<mips sysroot dir>

Best Regards,
Lianhao





More information about the poky mailing list