WRAPIT gives "A syntax error occurred while parsing:"

From: Jonathan Vigh <vigh_at_nyahnyahspammersnyahnyah>
Date: Tue, 06 Oct 2009 23:04:19 +0000

Hi NCL'ers
    I'm trying to compile a fairly simple f77 file (attached) with
WRAPIT and get the following error message:

>WRAPIT aland.f
 
WRAPIT Version: 091416
A syntax error occurred while parsing:
COMPILING aland.f
LINKING
END WRAPIT

A .so file is created, but when I try to call the routine from within
NCL, I get:
warning:Could not find Init() in external file ./aland.so, file not loaded

I'm able to compile the fortran code itself into an object file without
problems. The fortran code did have a couple 'stop' statements which I
commented out, but this doesn't change the behavior. It seems like this
should be a simple task, but maybe I've missed something. Regardless,
I'm stumped by the error message - is this being generated from WRAPIT?
Any suggestions are appreciated.

Jonathan

Here's more debugging info produced using the -d option of WRAPIT:
[vigh_at_andrew source]$ WRAPIT -d aland.f
 
WRAPIT Version: 091416
OPERATING SYSTEM: Linux
FORTRAN COMPILER (f90c): gfortran
FORTRAN COMPILER OPTIONS (fopts): -fPIC -v -c -fno-second-underscore
A syntax error occurred while parsing:
gcc -fPIC -c -I/usr/local/ncarg/include WRAPIT.c
COMPILING aland.f
gfortran -fPIC -v -c -fno-second-underscore aland.f
Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--enable-checking=release --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-libgcj-multifile
--enable-languages=c,c++,objc,obj-c++,java,fortran,ada
--enable-java-awt=gtk --disable-dssi --enable-plugin
--with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre
--with-cpu=generic --host=x86_64-redhat-linux
Thread model: posix
gcc version 4.1.2 20080704 (Red Hat 4.1.2-44)
 /usr/libexec/gcc/x86_64-redhat-linux/4.1.2/f951 aland.f -ffixed-form
-quiet -dumpbase aland.f -mtune=generic -auxbase aland -version -fPIC
-fno-second-underscore -I
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/finclude -o /tmp/ccAdoP49.s
GNU F95 version 4.1.2 20080704 (Red Hat 4.1.2-44) (x86_64-redhat-linux)
        compiled by GNU C version 4.1.2 20080704 (Red Hat 4.1.2-44).
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
 as -V -Qy -o aland.o /tmp/ccAdoP49.s
GNU assembler version 2.17.50.0.6-9.el5 (x86_64-redhat-linux) using BFD
version 2.17.50.0.6-9.el5 20061020
SHARED OBJECT NAME (SharedObj): aland.so
LINKER SUFFIX (ld_suffix): WRAPIT.o aland.o -o aland.so
 
LINKING
gcc -fPIC -shared WRAPIT.o aland.o -o aland.so -lgfortran
END WRAPIT

 external ALAND "./aland.so"

; main program
begin
 
  lat = 25.0
  lon = -90.0

  result = ALAND::alandjv(lon,lat)
   
  print(result)
  
end

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk

Received on Tue Oct 06 2009 - 17:04:19 MDT

This archive was generated by hypermail 2.2.0 : Fri Oct 09 2009 - 08:29:22 MDT