SEGFAULT from importing _minpack.so (was Re: [SciPy-user] install problem on Mandrake-8.2)

Pearu Peterson pearu at cens.ioc.ee
Thu May 23 16:46:32 EDT 2002


On Thu, 23 May 2002, Gerard Vermeulen wrote:

> > > So, it looks like if there is something wrong with
> > > calling Fortran from C in this module.
> > >
> > > If there is nothing wrong with the compiler/linker flags
> > > produced by setup.py, there is something wrong with
> > > Mandrake's gcc/g77-2.96.
> >
> > If you do
> >
> >   f2py -c -m fun minpack/chkder.f minpack/dpmpar.f
> >   python -c 'import fun'
> >
> > what happens? SEGFAULT? Nothing?
> >
> SEGFAULT

This is very interesting. If you can succesfully import large number of
extension modules that wrap various Fortran functions but only this
function, chkder, is causing import failures, and when looking the chkder
code I cannot see anything special in it, then I would like to suggest it
is a compiler bug. But on the other hand, I am not an expert on compilers
and it could be easily something else, something so obvious that we
cannot see it. I am starting to be very curious what is going on here.

So, if you are willing to continue this bug tracking (I can easily
understand if you are not, then may be updating a compiler would be a
way to proceed), then the next step would be playing around
with minpack/chkder.f. Again, I would suggest commenting out various part
of it (the code itself is rather small) and run

  f2py -c -m fun minpack/chkder.f minpack/dpmpar.f
  python -c 'import fun'

until you can import succesfully.


Pearu




More information about the SciPy-User mailing list