Bug 2380 - Avoid recursive inclusion of .la files
Summary: Avoid recursive inclusion of .la files
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 1.3
Hardware: All Multiple
: Low enhancement
Target Milestone: Future
Assignee: Ross Burton
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2012-05-01 17:21 UTC by Khem Raj
Modified: 2016-02-03 09:27 UTC (History)
10 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Done (doc changes complete)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Khem Raj 2012-05-01 17:21:58 UTC
write a tool to fix the libtool .la files so that they do not call other .la files but are calling the real libraries that way we can avoid lot of overlinking.
Comment 1 Khem Raj 2014-02-21 03:11:30 UTC
Ross has a preliminary class here

https://github.com/rossburton/meta-ross/blob/master/classes/wipe-la.bbclass
Comment 2 Dmitry Rozhkov 2015-12-21 15:04:21 UTC
It would be good to prioritize this bug, because now overlinking is manifesting itself in misleading error messages of devtool (a part of extended SDK) like

NOTE: gupnp: compiling from external source tree /home/rojkov/files/repos/gupnp
ERROR: QA Issue: gssdp rdepends on libxml2, but it isn't a build dependency? [build-deps]
ERROR: QA Issue: gssdp rdepends on zlib, but it isn't a build dependency? [build-deps]
ERROR: QA Issue: gssdp rdepends on libsqlite3, but it isn't a build dependency? [build-deps]
ERROR: QA Issue: gssdp rdepends on libffi, but it isn't a build dependency? [build-deps]
Comment 3 Ross Burton 2015-12-22 22:20:40 UTC
Is something like wipe-la still a viable candidate here?
Comment 4 Paul Eggleton 2015-12-22 22:27:54 UTC
Do we want an optional class or should it just be an intrinsic part of our build process?
Comment 5 Ross Burton 2015-12-22 23:25:12 UTC
I'm tempted to say default to on but able to be disabled, just in case someone has a situation where they actually need .la files.
Comment 6 Ross Burton 2015-12-22 23:32:15 UTC
For what it's worth, gnome-continuous (yocto-based CI for GNOME) does this in it's bootstrap image generation:

	find ${IMAGE_ROOTFS}/usr/lib -name \*.la -delete

And then in each "recipe" build, just deletes every .la file after install.

Maybe we should try with just deleting them before packaging.
Comment 7 Ross Burton 2016-02-02 13:28:23 UTC
I just posted remove-libtool.bbclass to the list.  This isn't enabled by default but will remove *all* libtool .la files from both target packages and sysroot, so libtool can't go crazy.
Comment 8 Ross Burton 2016-02-02 17:48:32 UTC
Merged in oe-core da1219b5c48fe50d667bc72bd9ad0115b25d5558.
Comment 9 Scott Rifenbark 2016-02-03 01:04:36 UTC
Ross, 

I added this class to the ref manual: file:///home/scottrif/yocto-docs/documentation/ref-manual/ref-manual.html#ref-classes-remove-libtool.  Let me know if this is okay and I will reset the doc flag to "done."

Scott
Comment 10 Ross Burton 2016-02-03 09:27:13 UTC
Looks good to me, thanks Scott.  Setting flag to 'done'.