
Floris Bruynooghe wrote:
Hi Dave
On Mon, Jan 26, 2009 at 06:48:06PM -0600, Dave Peterson wrote:
I am trying to build a number of projects that use Python extensions on Solaris 10 and I've discovered that nothing with extensions will link unless I explicitly pass in a '-L/path/to/python/lib/dir' because libpython2.5.so is not otherwise found when the '-lpython2.5' argument is specified during linking.
[...]
If that all seems correct, then it appears the issue is the finalize_options() source in lib/distutils/commands/build_ext.py. There are a number of "if" blocks that explicitly append the value of distutils.sysconfig.get_config_vars('LIBDIR') to the list of library_dirs used to link built extensions with. However, there doesn't seem to be one of these for Solaris / sunos.
Could you point to one of the projects you're having trouble with? I haven't had any such problems with Python 2.5 on Solaris 10, distutils always finds the right things when I'm building extension modules.
Pretty much everything I've tried that uses an extension has this problem. Cython, Numpy, Traits, etc. As Robert Kern pointed out, I'm using a custom built Python (Python 2.5.4) built and installed into a custom location via '--prefix'. What Python are you using? Just for grins, I've tried building Python with a number of other compilers, but all with a --prefix setting, and they've all exhibited this problem. I'm leaning more and more toward this is actually a bug with the distutils source on Solaris. -- Dave