I didn't find such a request, but I'm sure somebody already asked about this: portage is written in python. If python is built with shared libraries and if some emerge breaks shared libraries (my favorite is glibc:(, there is no way to go back, because python is dead without shared libraries. So I propose a static USE flag, which would enable me to get static-linked python. Of course I can dig in the ebuild (oh, I did that) how python is compiled and try to compile it manually, but it is a no fun work (at least for me). Basicly there is a flag --enable-shared in the ebuild. This flag is passed to configure, which should create Makefile for shared-libraries python. If you replace that by --disable-share, that should configure to build a static-linked python. Actually I think, that gentoo should be shipped with static-linked python (see above for the reason) out of the box.
Ok... I tried: cd Python-2.4.2 ./configure --disable-shared make I was wrong about the flag --disable-shared, because ldd python doesn't tell, that "not a dynamic executable" (it gives standard dependencies, I can't copy paste here from MS VirtualPC:)
yeah, i've always thought about that, but no one has really done any work on figuring out how to package this up. do we have a sys-apps/portage bundle it or a new python-static package. this is low priority at the moment.
Well, passing CPPFLAGS="-static" LDFLAGS="-static -static-libgcc" creates a statically linked python executable. The problem is that also the standard _non_ pure python modules must be linked statically, which is probably also doable. But when trying to load a statically linked binary module from within the statically linked python interpreter, I get the following: Traceback (most recent call last): File "<string>", line 1, in <module> File "/usr/lib64/python2.5/site-packages/lcms.py", line 7, in <module> import _lcms ImportError: /usr/lib64/python2.5/site-packages/_lcms.so: undefined symbol: sem_init
Ok, to use a static python, all modules have to be built statically and extra linker-flags have to be passed to get the symbols resolved. Since we (portage-people and I) didn't find any use case where a statically linked python is of help (if glibc is broken then a lot of other tools are and you need a glibc-binpackage anyway, which in turn can be merged using qmerge (which in turn is written in C and statical linked and really independent of other stuff)), I'm closing this bug as WONTFIX. Please reopen if you think there actually _is_ a use case for this (not even the embedded people did want such a feature).