[Numpy-discussion] f2py from numpy 1.0.5 on OSX 10.4.11/QuadPPC fails with undefined symbols

Harry Mangalam harry.mangalam@uci....
Fri Mar 28 10:52:44 CDT 2008

Also using g95, which is fairly new I guess, but is a downstream 
requirement for the application.

installed python 2.5 from darwin ports, installed most of rest of the 
python stuff from ports as well, numpy 1.0.4 failed repeatedly 
with 'too many options' error when processing cmdline options so 
installed 1.0.5 from svn. got same 'too many errors'. guessed and 
removed '--debug' from commandline:

f2py --opt="-O3" -c -m \ 
fd_rrt1d --fcompiler=g95 --debug --link-lapack_opt *.f

and that cured THAT problem. same version and same commandline worked 
fine on Linux, but now get the "Undefined symbols:" problem that I've 
seen posted elsewhere but not resolved (or not in a way that fixes my 

 Here's the last few lines of the command that was kicked off by:

f2py --opt="-O3" -c -m fd_rrt1d --fcompiler=g95  --link-lapack_opt *.f

(incidentally, this is the same final error from both the ports 
version (1.0.4) and the self-built one (1.0.5). It's obviously a link 
error, but to what lib and where to insert the -l specification?)

I originally ran this with the environment LDFLAGS set but then ran it 
also with LDFLAGS set to "" and then UNset ie:
$unset LDFLAGS

the result is the same in all cases (see below).  There's obviously a 
link error, but what are the missing libs and where are they?  Would 
this have been caused by running the port install with LDFLAGS set?

Thanks in advance.

the last lines of the build are:

g95:f77: CQZ.f
g95:f77: Umatrix1D.f
g95:f77: fd_rrt1d.f
g95:f77: /tmp/tmp28SqLa/src.macosx-10.3-ppc-2.5/fd_rrt1d-f2pywrappers.f
/usr/local/bin/g95 -L/Users/hjm/lib \
/tmp/tmp28SqLa/tmp/tmp28SqLa/src.macosx-10.3-ppc-2.5/fortranobject.o \
/tmp/tmp28SqLa/CQZ.o /tmp/tmp28SqLa/Umatrix1D.o \
/tmp/tmp28SqLa/fd_rrt1d.o \
-o ./fd_rrt1d.so -Wl,-framework -Wl,Accelerate
ld: Undefined symbols:

Harry Mangalam - Research Computing, NACS, E2148, Engineering Gateway, 
UC Irvine 92697  949 824 0084(o), 949 285 4487(c)
[A Nation of Sheep breeds a Government of Wolves.
Edward R. Murrow]

More information about the Numpy-discussion mailing list