Hi,
I have a script (say a.py) which uses a function written in fortran 90.
Within the script I give the command to compile using -
os.system('f2py -c PD_evolve.f90 -m PD_evolve')
It works fine on my computer if I run the script using -
python a.py
However it doesn't work if I use -
sage -python a.py
and gives an error while compiling. The last lines of error message are -
/usr/bin/gfortran -Wall
/tmp/tmpBTbBKB/tmp/tmpBTbBKB/src.linux-i686-2.6/PD_evolvemodule.o
/tmp/tmpBTbBKB/tmp/tmpBTbBKB/src.linux-i686-2.6/fortranobject.o
/tmp/tmpBTbBKB/PD_evolve.o -L/home/rajeev/bin/sage/local/lib -lpython2.6
-lgfortran -o ./PD_evolve.so
/usr/lib/gcc/i486-linux-gnu/4.4.5/libgfortranbegin.a(fmain.o): In function
`main':
(.text+0x27): undefined reference to `MAIN__'
collect2: ld returned 1 exit status
/usr/lib/gcc/i486-linux-gnu/4.4.5/libgfortranbegin.a(fmain.o): In function
`main':
(.text+0x27): undefined reference to `MAIN__'
collect2: ld returned 1 exit status
error: Command "/usr/bin/gfortran -Wall
/tmp/tmpBTbBKB/tmp/tmpBTbBKB/src.linux-i686-2.6/PD_evolvemodule.o
/tmp/tmpBTbBKB/tmp/tmpBTbBKB/src.linux-i686-2.6/fortranobject.o
/tmp/tmpBTbBKB/PD_evolve.o -L/home/rajeev/bin/sage/local/lib -lpython2.6
-lgfortran -o ./PD_evolve.so" failed with exit status 1
I have compiled sage4.6.2 from source on Debian squeeze. I hope it makes
sense to ask this question here as the trouble is within sage.
Rajeev
--
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org