All of lore.kernel.org
 help / color / mirror / Atom feed
* Is the grammar of .la files changed in new libtool 2.4?
@ 2011-01-26  5:56 Lu, Lianhao
  2011-01-26  6:18 ` Scott Garman
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Lu, Lianhao @ 2011-01-26  5:56 UTC (permalink / raw)
  To: Garman, Scott A; +Cc: poky@yoctoproject.org

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.

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!

Best Regards,
- Lianhao Lu


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

* Re: Is the grammar of .la files changed in new libtool 2.4?
  2011-01-26  5:56 Is the grammar of .la files changed in new libtool 2.4? Lu, Lianhao
@ 2011-01-26  6:18 ` Scott Garman
  2011-01-26  6:39   ` Lu, Lianhao
  2011-01-26  6:43 ` Khem Raj
  2011-01-26  9:40 ` Richard Purdie
  2 siblings, 1 reply; 6+ messages in thread
From: Scott Garman @ 2011-01-26  6:18 UTC (permalink / raw)
  To: Lu, Lianhao; +Cc: poky@yoctoproject.org

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.

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

Thanks,

Scott

-- 
Scott Garman
Embedded Linux Distro Engineer - Yocto Project
Intel Open Source Technology Center


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

* Re: Is the grammar of .la files changed in new libtool 2.4?
  2011-01-26  6:18 ` Scott Garman
@ 2011-01-26  6:39   ` Lu, Lianhao
  2011-01-26  9:42     ` Richard Purdie
  0 siblings, 1 reply; 6+ messages in thread
From: Lu, Lianhao @ 2011-01-26  6:39 UTC (permalink / raw)
  To: Garman, Scott A; +Cc: poky@yoctoproject.org


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




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

* Re: Is the grammar of .la files changed in new libtool 2.4?
  2011-01-26  5:56 Is the grammar of .la files changed in new libtool 2.4? Lu, Lianhao
  2011-01-26  6:18 ` Scott Garman
@ 2011-01-26  6:43 ` Khem Raj
  2011-01-26  9:40 ` Richard Purdie
  2 siblings, 0 replies; 6+ messages in thread
From: Khem Raj @ 2011-01-26  6:43 UTC (permalink / raw)
  To: Lu, Lianhao; +Cc: poky@yoctoproject.org

On (26/01/11 13:56), 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? 

yes its new and it means that sysroot will be prepended to this when
resolving

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.
> 
> 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!
> 
> Best Regards,
> - Lianhao Lu
> _______________________________________________
> poky mailing list
> poky@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/poky


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

* Re: Is the grammar of .la files changed in new libtool 2.4?
  2011-01-26  5:56 Is the grammar of .la files changed in new libtool 2.4? Lu, Lianhao
  2011-01-26  6:18 ` Scott Garman
  2011-01-26  6:43 ` Khem Raj
@ 2011-01-26  9:40 ` Richard Purdie
  2 siblings, 0 replies; 6+ messages in thread
From: Richard Purdie @ 2011-01-26  9:40 UTC (permalink / raw)
  To: Lu, Lianhao; +Cc: poky@yoctoproject.org

On Wed, 2011-01-26 at 13:56 +0800, Lu, Lianhao wrote:
> 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?

Its new, yes and means that the path needs to be prefixed by the
sysroot. Libtool will add that prefix itself automatically if there is a
sysroot set.

>  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.

The = should replace the need to make this replacement.

> 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!

Correct.

We just have to ensure that libtool 2.4 with fixed sysroot support is
being used (libtool-nativesdk has the fixes).

Cheers,

Richard



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

* Re: Is the grammar of .la files changed in new libtool 2.4?
  2011-01-26  6:39   ` Lu, Lianhao
@ 2011-01-26  9:42     ` Richard Purdie
  0 siblings, 0 replies; 6+ messages in thread
From: Richard Purdie @ 2011-01-26  9:42 UTC (permalink / raw)
  To: Lu, Lianhao; +Cc: poky@yoctoproject.org

On Wed, 2011-01-26 at 14:39 +0800, Lu, Lianhao wrote:
> Garman, Scott A wrote on 2011-01-26:
> 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.

We should just be able to drop that now.

> > 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>

This looks correct off the top of my head, the important bit is the
libtoolize call and the specification of the libtool sysroot to
configure. I'm assuming libtoolize is from libtool-nativesdk?

Cheers,

Richard



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

end of thread, other threads:[~2011-01-26  9:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-26  5:56 Is the grammar of .la files changed in new libtool 2.4? Lu, Lianhao
2011-01-26  6:18 ` Scott Garman
2011-01-26  6:39   ` Lu, Lianhao
2011-01-26  9:42     ` Richard Purdie
2011-01-26  6:43 ` Khem Raj
2011-01-26  9:40 ` Richard Purdie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.