Clodoaldo
clodoaldo.pinto.neto at gmail.com
Wed Mar 21 07:39:49 EST 2007
2007/3/20, Graham Dumpleton <graham.dumpleton at gmail.com>: > On 21/03/07, Roberto C. Sánchez <roberto at connexer.com> wrote: > > On Tue, Mar 20, 2007 at 09:27:45PM +1100, Graham Dumpleton wrote: > > > > > > One reason for recompiling Python is because the prepackaged binary > > > distributions of Python are generally never built with the > > > --enabled-shared option. This means you only have a static libpython.a > > > > This is not the case on Debian. From a stock Sarge install: > > > > ldd /usr/lib/apache2/modules/mod_python.so > > libpython2.3.so.1.0 => /usr/lib/libpython2.3.so.1.0 (0x4001b000) > > libpthread.so.0 => /lib/libpthread.so.0 (0x40124000) > > libdl.so.2 => /lib/libdl.so.2 (0x40175000) > > libutil.so.1 => /lib/libutil.so.1 (0x40179000) > > libm.so.6 => /lib/libm.so.6 (0x4017c000) > > libc.so.6 => /lib/libc.so.6 (0x4019e000) > > /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000) > > Then we can only assume then that OP compiled his Python from source > code as his doesn't use a shared library. Quoting his original email: > > ... > /config -Xlinker -export-dynamic -lm -lpython2.5 -lpthread -ldl - > lutil -lm > /usr/bin/ld: /usr/local/lib/python2.5/config/libpython2.5.a > (abstract.o): relocation R_X86_64_32 against `a local symbol' can not > be used when making a shared object; recompile with -fPIC > /usr/local/lib/python2.5/config/libpython2.5.a: could not read > symbols: Bad value > collect2: ld returned 1 exit status > apxs:Error: Command failed with rc=65536 > > As can be seen, trying to use libpython2.5.a. Therefore suggestion > still stands if for some reason he wants to continue to use version of > Python compiled from source code. > > As far as debian binaries using --enable-shared that is good to hear. > If others can comment on whether binary distributions for other Linux > distributions use --enable-shared for Python build, would love to hear > so I know how common a practice it may or may not be across > distributions. If it is common, I can stop grumbling about it. ;-) FC5: # uname -a Linux dkt.localdomain 2.6.20-1.2300.fc5 #1 Sun Mar 11 19:29:11 EDT 2007 i686 athlon i386 GNU/Linux # ldd /usr/lib/httpd/modules/mod_python.so linux-gate.so.1 => (0x00e3c000) libpthread.so.0 => /lib/libpthread.so.0 (0x00384000) libdl.so.2 => /lib/libdl.so.2 (0x00250000) libutil.so.1 => /lib/libutil.so.1 (0x00110000) libm.so.6 => /lib/libm.so.6 (0x004ee000) libc.so.6 => /lib/libc.so.6 (0x00114000) /lib/ld-linux.so.2 (0x80000000) FC6: # uname -a Linux s0.localdomain 2.6.20-1.2925.fc6 #1 SMP Sat Mar 10 18:20:58 EST 2007 i686 athlon i386 GNU/Linux # ldd /usr/lib/httpd/modules/mod_python.so linux-gate.so.1 => (0x00d70000) libpthread.so.0 => /lib/libpthread.so.0 (0x00771000) libdl.so.2 => /lib/libdl.so.2 (0x00ea5000) libutil.so.1 => /lib/libutil.so.1 (0x00110000) libm.so.6 => /lib/libm.so.6 (0x00df1000) libc.so.6 => /lib/libc.so.6 (0x00396000) /lib/ld-linux.so.2 (0x80000000) FC6 x86_64: # uname -a Linux fc621199.aspadmin.net 2.6.18-1.2849.fc6 #1 SMP Fri Nov 10 12:34:46 EST 2006 x86_64 x86_64 x86_64 GNU/Linux ldd /usr/lib/httpd/modules/mod_python.so linux-gate.so.1 => (0x004f6000) libpthread.so.0 => /lib/libpthread.so.0 (0x00d67000) libdl.so.2 => /lib/libdl.so.2 (0x00823000) libutil.so.1 => /lib/libutil.so.1 (0x00110000) libm.so.6 => /lib/libm.so.6 (0x00f9e000) libc.so.6 => /lib/libc.so.6 (0x00ab2000) /lib/ld-linux.so.2 (0x80000000) Regards, -- Clodoaldo Pinto Neto
|