On 1 June, 14:45, 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/ftrackingmodule.o
> build/temp.macosx-10.6-i386-2.6/build/src.macosx-10.6-i386-2.6/fortranobject.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-f2pywrappers.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/ftrackingmodule.o
> build/temp.macosx-10.6-i386-2.6/build/src.macosx-10.6-i386-2.6/fortranobject.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-f2pywrappers.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

sage_fortran is a shell script, which calls the fortran compiler. I
assume it resides in $SAGE_LOCAL/bin. That has the patch to the real
Fortran compiler, along with an option or two. You might try editing
that script and adding what option you think is needed.

I'm personally not keen how Sage handles Fortran, as that sage_fortran
script hides what options are passed. But I suspect you can get around
it by editing the script manually.

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