Matteo Settenvini, le Tue 13 Mar 2007 14:13:36 +0100, a écrit : > If that doesn't fix it, afaik it's a problem packaging python, or a bug > in python's distutils itself. If you want to fix it as Samuel purposed, > the real fix would be to try looking for a the library in both the > result of get_python_lib(0,1), w/ (1,1) and then in get_python_lib(...) > + "/config", and picking the first match. That would be more platform > independent.
I've just tried to compile & install a plain upstream python this way: ./configure --prefix=/usr --exec-prefix=/usr/my-arch --enable-shared (/usr/my-arch is in the ld and ld.so default search path) libpython2.4.so got installed in /usr/my-arch/lib, libpython2.4.a in /usr/my-arch/lib/python2.4/config/, get_python_lib(0,1) returns "/usr/lib/python2.4" and get_python_lib(1,1) returns "/usr/my-arch/lib/python2.4". To sum it up, it looks like upstream python considers that shared libpython library should go into the system's usual library path (/usr/my-arch/lib) and the static libpython library should go into get_python_lib(1,1)+"/config". That would mean that for dynamically linking with libpython, there is no need for -L, and for static libraries, one needs to use "-L"+get_python_lib(1,1)+"/config". Samuel

