From: Alan W. I. <ir...@be...> - 2006-01-29 03:18:57
|
I have just cvs committed the latest version of ac_python_devel.m4 which provides an interesting extra macro called PYTHON_EXTRA_LDFLAGS. It appears this is the flag used when python itself is linked. Anyhow, the current CVS HEAD status is the value of PYTHON_EXTRA_LDFLAGS is completely ignored after it is determined. However, it is possible that macro telling how python was linked might prove important on other platforms. For example, I believe at one point Koen van der Drift was having difficulties getting python to dynamically load our PLplot python extension module on Mac OS X. The problem was missing python symbols. I am not sure whether that was ever resolved or whether Koen abandoned python for his fink package. Anyhow, I encourage those developers with access to Mac OS X, Cygwin, or MinGW to try the python interface to PLplot, and if it doesn't dynamically load properly from python because of missing symbols, then you might want to try relinking that module by hand with extra linker flags determined by the following python command: python -c "import distutils.sysconfig; \ conf = distutils.sysconfig.get_config_var; \ print conf('LINKFORSHARED')" That's copied right from the new ac_python.m4 file and returns the string "-Xlinker -export-dynamic" on my python-2.3.5 Linux system. (As expected, that's also the result for PYTHON_EXTRA_LDFLAGS on my platform.) Of course, other platforms will have different results depending on how python was linked. Obviously, the extra linking flags aren't needed on Linux, but it might be worth experimenting with them on other platforms (and also seeing what the linker man page says about the flags) if there are currently any linking troubles for python. Alan __________________________ Alan W. Irwin email: ir...@be... phone: 250-727-2902 Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); PLplot scientific plotting software package (plplot.org); the Yorick front-end to PLplot (yplot.sf.net); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ |