[Numpy-discussion] f2py with 4.1 under snow leopard
Wed Jun 16 13:17:39 CDT 2010
2010/6/16 Charles سمير Doutriaux <firstname.lastname@example.org>:
> Hi Robert,
> You're right. I finally figured out which flag was missing I'm posting it here as a reference for others:
> I needed to add:
> -undefined dynamic_lookup
> I also removed -fPIC
> Hope this helps somebody else.
> Do you think it would be possible to have LDFLAGS added to the default ones? Or is there a way to obtain this by setting something else (EXTRA_LDFLAGS) or something like that?
The reason that LDFLAGS replaces rather than adds when linking Fortran
extensions is because Fortran linkers frequently differ from the flags
the C linker expects. On top of that, updated versions of Fortran
compilers will often change their flags. In order to allow users to
work around these issues without having to modify numpy.distutils
source, we allow LDFLAGS to completely replace the link flags.
Obviously, this is a hack and is not ideal. But IIRC, no one has yet
put in the effort to implement ways to do both things.
"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
-- Umberto Eco
More information about the NumPy-Discussion