
I have a suite of fortran code that I compile with f2py and use as a plugin to a python package. I am using Python v2.7 from Anaconda. When compiled using numpy v1.11.3 or lower, everything works fine, but if I upgrade to any more recent version I begin running into a runtime error. Presumably I am just not linking something that needs to be linked, but I'm not sure what library that would be.
The error:
ImportError: .../libstddev_kernel.so: undefined symbol: _gfortran_stop_numeric_f08
Where libestddev_kernel.so is built using this command: f2py --fcompiler=gnu95 --quiet --opt="-O3" -L. -L/usr/lib -I. -I.../include -I/usr/include -m libstddev_kernel -c stddev_kernel/stddev_kernel.f90 config.o
Is there something additional I should be linking to within numpy or my anaconda installation?
Thank you,
Jeremy
Jeremy Solbrig
Research Associate
Cooperative Institute for Research in the Atmosphere
Colorado State University
jeremy.solbrig@colostate.edu
(970) 491-8805

Hi,
On Mon, Jan 29, 2018 at 10:16 AM, Solbrig,Jeremy Jeremy.Solbrig@colostate.edu wrote:
I have a suite of fortran code that I compile with f2py and use as a plugin to a python package. I am using Python v2.7 from Anaconda. When compiled using numpy v1.11.3 or lower, everything works fine, but if I upgrade to any more recent version I begin running into a runtime error. Presumably I am just not linking something that needs to be linked, but I'm not sure what library that would be.
The error:
ImportError: .../libstddev_kernel.so: undefined symbol: _gfortran_stop_numeric_f08
Where libestddev_kernel.so is built using this command: f2py --fcompiler=gnu95 --quiet --opt="-O3" -L. -L/usr/lib -I. -I.../include -I/usr/include -m libstddev_kernel -c stddev_kernel/stddev_kernel.f90 config.o
Is there something additional I should be linking to within numpy or my anaconda installation?
Do you get the same problem with a pip install of numpy? If not, this may be an Anaconda packaging bug rather than a numpy bug ...
Cheers,
Matthew

I think that I actually may have this solved now. It seems that I can resolve the issue by running "conda install gcc" then linking against the anaconda gfortran libraries rather than my system install. The only problem is that installing gcc through anaconda causes anaconda's version of gcc to supersede the system version...
Anyway, not a numpy issue it seems, just an Anaconda packaging issue as you both said.
________________________________ From: NumPy-Discussion numpy-discussion-bounces+jeremy.solbrig=colostate.edu@python.org on behalf of Andrew Nelson andyfaff@gmail.com Sent: Monday, January 29, 2018 2:02:02 PM To: Discussion of Numerical Python Subject: Re: [Numpy-discussion] f2py bug in numpy v1.12.0 and above?
Something similar was mentioned at https://github.com/scipy/scipy/issues/8325.

Hi,
On Mon, Jan 29, 2018 at 1:02 PM, Andrew Nelson andyfaff@gmail.com wrote:
Something similar was mentioned at https://github.com/scipy/scipy/issues/8325.
Yes, that one was also for Anaconda...
Cheers,
Matthew
participants (3)
-
Andrew Nelson
-
Matthew Brett
-
Solbrig,Jeremy