[Numpy-discussion] f2py from numpy 1.0.5 on OSX 10.4.11/QuadPPC fails with undefined symbols
Sun Mar 30 20:16:34 CDT 2008
Answering part of my own question, one missing lib is (not
surprisingly) libpython2.5 (add -lpython2.5) so that the link command
/usr/local/bin/g95 -L/opt/local/lib/ \
/tmp/tmp1r96Q9/CQZ.o /tmp/tmp1r96Q9/Umatrix1D.o \
-o ./fd_rrt1d.so -Wl,-framework -Wl,Accelerate
ld: Undefined symbols:
You'd think that this would be added automatically, but this might be
due to my previous installation of python2.5 (via the ports system)
with the LDFLAGS set.
In order to fix this, I have to uninstall, then reinstall, the
entirety of the python 2.5 dependency tree. I'll set this to run
So the only remaining undefined symbol is _MAIN_ . ...? I don't know
at what level to attack this; the main fortran routine is
called 'fd_rrt1d', not 'main', but this was not a problem on Linux -
it compiled and linked just fine.
On Sunday 30 March 2008, Harry Mangalam wrote:
> Hi Robert,
> thanks very much for your help - responses inline below.
> On Friday 28 March 2008, Robert Kern wrote:
> > Can you triple-check that the "unset LDFLAGS" worked by using
> > env(1)? You still seem to have a -L/Users/hjm/lib flag that is
> > obviously not coming from the command line.
> $ env |grep LDFLAGS
> That LDFLAGS was coming from my .profile and I've commented it out.
> I just re-installed numpy (successfully, it seems) and re-tried the
> f2py command:
> f2py --opt="-O3" -c -m fd_rrt1d --fcompiler=g95 --link-lapack_opt
> which results in an otherwise successful run except that the last
> few lines are identical to the one I posted before:
>o /tmp/tmp9hmmi5/CQZ.o /tmp/tmp9hmmi5/Umatrix1D.o
>rappers.o -o ./fd_rrt1d.so -Wl,-framework -Wl,Accelerate ld:
> Undefined symbols:
> <many more but you get the idea>
> However, the LDFLAGS was set when I installed a numpy via the ports
> system previously- could that have 'poisoned' the install by
> setting some variable that prevents finding the appropriate lib?
> And do you know which lib is not being found? I could just insert
> it into the final link command.
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