Summary: | Enable static python build with portage | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | infobox.oleg |
Component: | New packages | Assignee: | Python Gentoo Team <python> |
Status: | RESOLVED WONTFIX | ||
Severity: | enhancement | CC: | python |
Priority: | High | ||
Version: | 2005.1 | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 212178 |
Description
infobox.oleg
2006-03-12 15:22:47 UTC
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). |