[SciPy-dev] Segfault problems on Mandrake 8.2 -- Python2.2

pearu at scipy.org pearu at scipy.org
Mon Apr 8 16:56:53 CDT 2002


On 8 Apr 2002, Travis Oliphant wrote:

> I've had a broken SciPy installation for the past couple of days due to
> a pretty obnoxious bug.  I'm not sure which package is to blame (could
> be the Mandrake 8.2 toolchain???
> 
> But, I've finally isolated the problem to an -fPIC flag given when
> compiling _minpackmodule.c

Is minpack the only module with this problem? If you disable it, will
scipy load without segfault? Can you send the output when minpack
extension is build?

> If I don't add this flag and compile the module manually then I get a
> module that loads and seems to work fine.  The default SciPy install
> adds this flag and results in a module that segfaults when Python tries
> to open it.

This flag is added by Python distutils.

> I have no idea what is going on, and at this point would much rather get
> back to doing useful work.
> 
> My question to those who designed the scipy_distutils is (can I specify
> whether or not to include this -fPIC flag and how?)

This flag -fPIC is generally needed for shared objects. In principle, it
is possible to change this flag using similar hack as weave uses for 
changing gcc  to g++ in LDSHARED (see weave build_tools.py). -fPIC is
defined by CCSHARED variable, I believe.

Now I see that scipy_distutils uses -fpic instead of -fPIC when compiling
Fortran sources. I am not sure if it matters but you can try changing
-fpic to -fPIC in scipy_distutils/command/build_flib.py (look for gnu
compiler switches).


 Pearu




More information about the Scipy-dev mailing list