Summary: | System libraries lacking static build options | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Robert Bradbury <robert.bradbury> |
Component: | [OLD] Library | Assignee: | Gentoo Linux bug wranglers <bug-wranglers> |
Status: | RESOLVED CANTFIX | ||
Severity: | normal | CC: | orzel |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | N/A | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Robert Bradbury
2009-08-23 22:03:00 UTC
I think this is best discussed on the gentoo-dev mailinglist. We had this discussion in the spring. IIRC, it was resolved that USE=static-libs should be used for static libraries, if a good case could be made for enabling them. I suggest you start filing bugs with patches for each of these packages. Usually, as you've said, it's as easy as padding IUSE with static-libs and adding $(use_enable static-libs static) to the econf line. Start on the bottom of the depgraph and work your way up with bugs+patches. Make sure you test them or people will get annoyed. Peter, I would suggest that the list I proposed is such a list. They are the libraries at the bottom of any robust X application, in my case firefox, that one wants to build as a static executable. Most of them are near the bottom of a "depgraph" for system libraries, and I have built and tested them (as .a files) with older versions of the libraries to produce a quasi-static Firefox which worked properly. This was done outside of the Gentoo build system due to the problematic layering of ebuilds on top of library configure files and the lack of a one-to-one mapping between USE flags and library configure options (as well as the fact that various library package developers seem be rather sloppy with respect to what --enable/disable-static/shared actually do.) Now, lets assess the "problem" as it currently exists. I've got ~1100 ".a" (static) libraries in /usr/lib. I've got ~1500 shared libraries (.so) libraries in /usr/lib. Most of these files, due to the fact that this is the default way many configure and intall scripts work, are the static/shared reflections of each other. For a majority of them, probably 70-80%, I would guess that you could do away with the static libraries entirely because they are used in building a single set of executables (often times only one) or the executables only require the shared library. Normally these packages could be configured with --disable-static in the configuration step of the build and it would make zero difference to the functioning of the installed system (except for freeing up space on /usr). I've only got *20* packages, mostly sys-apps/*, which are compiled using the "static" flag (primarily I because I want a stable system where system utilities don't fail when I upgrade a library). I have no explicit uses of the static-libs flag because it is in effect (by default) for most packages at this point (even though it isn't generally needed). There are only about a dozen packages, mostly XXX-libs, that make use of the "static-libs" flag in the ebuild files. I could probably come up with the ebuilds to fix the problem for the cited libraries, but am not a gentoo developer and have no knowledge about the modifications would be integrated into the development/release system. Fixing the subset I cite (which solves this bug) doesn't resolve the general problem that most of the static libraries produced by the various packages are never used and should presumably be removed (by making the default configuration for all packages be "--disable-static"). I would agree with Patrick that this is a topic for discussion/planning perhaps on the gentoo-dev mailing list. But the primary focus of this bug is to get changes made to a handful of specific libraries to allow the static building of packages like Firefox, Galeon, etc. Moving that forward would allow the long term stress testing of bugs (of which there are several in Firefox) that were/are primarily libgtk/libglib bugs (which were/are nasty bugs because they generally resulted in crashing Firefox). I'd too like to have a USE option to be able to install static libs. Unfortunately i'm not able to hack ebuilds by myself. Though, my needs seem different, and i'm most importantly concerned with not-core libraries. Static linking is one solution today if you want to distribute a single binary that should work on different distribution... Thinks like libc or libm are available and mostly compatible accross distribution, but it would help to have static libs for other less mainstream libraries such as qt, gtk, qwt, png, libz.... (yes, libz.a is already available). |