--enable-all-static Build completely static (standalone)
binaries.
I'm ./configure-ing with "--disable-shared" (because this must mean
"enable static", right?), and (based on some other posts here) tried
adding "*static*" near the top of Modules/Setup. I'd like to see ldd
tell me "not a dynamic executable", but alas, it's presently:
$ ldd /path/to/new/bin/python
libpthread.so.0 => /lib/tls/libpthread.so.0 (0x008e9000)
libdl.so.2 => /lib/libdl.so.2 (0x007f0000)
libutil.so.1 => /lib/libutil.so.1 (0x00df6000)
libm.so.6 => /lib/tls/libm.so.6 (0x007cb000)
libc.so.6 => /lib/tls/libc.so.6 (0x0069f000)
/lib/ld-linux.so.2 (0x00682000)
Do I just need to be passing something like LDFLAGS="-static ???" to
configure? I just tried that and got a bunch of "symbol rename"
warnings during the compilation, and then "make install" mysteriously
failed.
Thanks for any pointers.
--
Micah
--disabled-shared is the default value. It does not mean that the Python
interpreter is a static linked executable. --enable-shared builds a
libpython??.so and --disable-shared links libpython into the python binary.
Christian
I think you can just add -static to the gcc Flag line in the
makefile. "man gcc" should also be helpful but that is a pile of docs
to wade through.
> I think you can just add -static to the gcc Flag line in the
> makefile.
Doing that (or CFLAGS=-static, or LDFLAGS=-static, or other Makefile
tweaks) gets me linker errors. Sounds like there's not a simple
prescribed means to do this (that anyone has documented). So now I'm
open to hearing about other hacks people have done to get this to
work. (Hopefully a config weenie heard my plea for --enable-all-
static)
--
Micah
Can you work on the topic and write a small howto for your wiki
(http://wiki.python.org/moin/)? You have to modify Modules/Setup.local,
too. Read Modules/Setup for more information.
Christian
Can you work on the topic and write a small howto for your wiki
> Can you work on the topic and write a small howto for your wiki
> (http://wiki.python.org/moin/)?
Good idea. I've created a placeholder (with what I know so far, not
much) to track this:
http://wiki.python.org/moin/BuildStatically
I'll plan to be updating it today if I can get it working. Anyone
else is welcome to add their knowledge/experience.