Hi Chris,

Are you on a 64-bit mac, i.e. core 2 duo or newer?  I believe Sage's
implementation of f2py is broken on 64-bit macs - certainly it is
broken on mine too.

There is a simple patch that fixes this problem at
http://trac.sagemath.org/sage_trac/ticket/8010 , if anyone wants to
review it.

Unfortunately it's a little complicated to apply the patch manually,
since the change is to the numpy spkg - you'll have to follow the
instructions at http://sagemath.org/doc/developer/patching_spkgs.html
.  If you don't want this hassle, then you'll have to wait for someone
else to review the patch before it gets included in a new version of
sage.

Cheers,
Felix


On Jun 1, 11:45 pm, Chris Kees <cek...@gmail.com> wrote:
> Hi,
>
> I'm trying to build a fortran extension module with f2py using and spkg I've
> built for sage 4.4.2 on Mac OS X 10.6. When I just run 'python setup.py
> install' from the commandline (with SAGE_LOCAL at the front of my path,
> etc.) The module build/installs fine, but when in installing as an spkg I
> get
>
> gfortran:f77: build/src.macosx-10.6-i386-2.6/ftracking-f2pywrappers.f
> sage_fortran -Wall -shared
> build/temp.macosx-10.6-i386-2.6/build/src.macosx-10.6-i386-2.6/ftrackingmod 
> ule.o
> build/temp.macosx-10.6-i386-2.6/build/src.macosx-10.6-i386-2.6/fortranobjec 
> t.o
> build/temp.macosx-10.6-i386-2.6/proteus/ftracking.o
> build/temp.macosx-10.6-i386-2.6/build/src.macosx-10.6-i386-2.6/ftracking-f2 
> pywrappers.o
> -L/Applications/sage/local/bin/../lib/gcc/i686-apple-darwin8/4.2.3/x86_64
> -lm -lgfortran -o build/lib.macosx-10.6-i386-2.6/proteus/ftracking.so -g
> -lblas
> i686-apple-darwin8-gfortran-4.2: unrecognized option '-shared'
> Undefined symbols:
>   "_PyErr_Occurred", referenced from:
>       _int_from_pyobj in ftrackingmodule.o
>       _create_cb_arglist in ftrackingmodule.o
>       _double_from_pyobj in ftrackingmodule.o
>       _f2py_rout_ftracking_foo in ftrackingmodule.o
> ...(and more undefined  refs)
>
> It seems to be missing the -undefined dynamic_lookup option that is added
> when I do 'python setup.py install' from the command line:
>
> sage_fortran -Wall -shared -Wall -shared -undefined dynamic_lookup -bundle
> build/temp.macosx-10.6-i386-2.6/build/src.macosx-10.6-i386-2.6/ftrackingmod 
> ule.o
> build/temp.macosx-10.6-i386-2.6/build/src.macosx-10.6-i386-2.6/fortranobjec 
> t.o
> build/temp.macosx-10.6-i386-2.6/proteus/ftracking.o
> build/temp.macosx-10.6-i386-2.6/build/src.macosx-10.6-i386-2.6/ftracking-f2 
> pywrappers.o
> -L/Applications/sage/local/bin/../lib/gcc/i686-apple-darwin8/4.2.3/x86_64
> -lm -lgfortran -o build/lib.macosx-10.6-i386-2.6/proteus/ftracking.so -g
> -lblas
>
> Any idea what I'm going wrong?
>
> Thanks,
> Chris

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to