There exists too many GNU/Linux distributions - vendors - and any produced binary is not compatible with all of them due to the shared libraries and configuration files dependencies. Due to many hardcoded shared libraries it is no longer possible to just use gcc -static. These patches provide the functionality you would expect from: gcc -static
|Summary||Fully static binaries build - GNU/Linux vendor independence|
|License||GNU General Public License|
|State||Ready to use. Maintained.|
|Download source patches||staticbuild-2006-01-26-00.tar.gz (27.3KB)|
|Download Fedora Core 4 i386 binaries||staticbuild-2006-01-26-00-bin.tar.gz (7.8MB)|
This static build framework is based on Fedora Core 4 (SRPMS and SRPMS updates). In fact it is not important which distribution the static build is based on as the final binaries should run on any GNU/Linux system vendor/version. Just I decided for Fedora Core.
You must use the same package versions on the main (dynamic) build system as the static libraries are built for! Therefore you must use Fedora Core 4 if using the unchanged sources or even the binaries provided here.
This static build does not provide threading - neither POSIX threads nor LinuxThreads. I did not need it anywhere and it gets everything simpler and smaller this way.
You should build your sources statically (using automake(1) --enable-static) although without gcc -static. As the last step you should relink the binaries against this staticbuild libraries by hand - it is not much possible to convince automake(1) to properly relink it the minized way for you. Check the 'build-static' script for an example.
This package has been used in its current or former versions for my projects:
|Patched Package||Patches Submitted as Bugs|
|glibc-2.3.5-10.3||Bug 1043 - --enable-static-nss false warnings|
|Bug 1044 - --enable-static-nss nsswitch "compat"|
|Bug 1045 - --disable-shared / --enable-static-nss build fix|
|Bug 1050 - new --enable-static-gconv|
|gnome-vfs2-2.10.0-5||Bug 47053 - new --with-included-filesystems|
|libbonobo-2.8.1-1||Bug 309504 - new --disable-threads|