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

Harry Mangalam harry.mangalam at uci.edu
Sun Mar 30 22:20:15 EDT 2008


On Sunday 30 March 2008, Robert Kern wrote:
> On Sun, Mar 30, 2008 at 8:16 PM, Harry Mangalam 
<harry.mangalam at uci.edu> wrote:
> > Answering part of my own question, one missing lib is (not
> >  surprisingly) libpython2.5 (add -lpython2.5) so that the link
> > command is:
>
> No, it isn't. They are "-undefined dynamic_lookup -bundle", most
> likely. This is a deficiency of the g95 FCompiler implementation.
> No one has bothered to get it to work on OS X; I'm not sure if g95
> even supports these flags. They were added to gcc (and accordingly
> gfortran) by Apple; I don't know if the g95 guy has kept up.

Hi Robert,

I don't understand the "No, it isn't." part.  Adding '-lpython2.5' 
certainly removed that long list of undefined symbols - are you 
saying it really had no effect and that should be:
"-undefined dynamic_lookup -bundle"

That had little effect, so I think I've misunderstood you.

  The link command that has come closest to working is:
/usr/local/bin/g95 \
-L/opt/local/lib/ \
-L/Developer/SDKs/MacOSX10.4u.sdk/usr/lib \
 /tmp/tmp5Ef8uL/tmp/tmp5Ef8uL/src.macosx-10.3-ppc-2.5/fd_rrt1dmodule.o\
 /tmp/tmp5Ef8uL/tmp/tmp5Ef8uL/src.macosx-10.3-ppc-2.5/fortranobject.o\
 /tmp/tmp5Ef8uL/CQZ.o /tmp/tmp5Ef8uL/Umatrix1D.o\
 /tmp/tmp5Ef8uL/fd_rrt1d.o\
 /tmp/tmp5Ef8uL/tmp/tmp5Ef8uL/src.macosx-10.3-ppc-2.5/fd_rrt1d-f2pywrappers.o\
 -lpython2.5 \
 -lSystemStubs\
  -llapack\
  -lblas\
  -o ./fd_rrt1d.so\
  -Wl,-framework -Wl,Accelerate
ld: Undefined symbols:
_MAIN_

Altho there is a requirement for g95 to support the other platforms, 
I'm willing to try another free compiler - do you have a 
recommendation?

Harry

-- 
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