[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GEMPAK #WFE-503351]: G77_getenv_0 referencing error when compiling wrf2gempak (f90 code)


  • Subject: [GEMPAK #WFE-503351]: G77_getenv_0 referencing error when compiling wrf2gempak (f90 code)
  • Date: Thu, 11 May 2006 13:02:07 -0600

Steve,

If the g77 was found on your system when pgf90 was installed, PGI says that
it will define the appropriate location of libg2c for the -g77libs flag
that you are specifying. The problem may be the -Mstandard flag you have
sincve the getenv is an f77 extension.

Steve Chiswell
Unidata User Support


> Hello,
> 
> I am trying to compile  code, a "wrf to gempak converter" by Steve Decker, 
> using gemlib.a generated for GEMPAK5.9.1 - Have it down to just these errors 
> now:
> 
> =============================================================
> pgf90 -o wrf2gem -fast -Mstandard -g77libs  dateutil.o diagnostics.o gempak.o 
> registry.o wrf2gem.o wrf2gemsubs.o  /home/skirby/netcdf-3.5.0/lib/libnetcdf.a 
> /home/skirby/wrf-gempak/GEMPAK5.9.1/os/linux/lib/gemlib.a 
> /home/skirby/wrf-gempak/GEMPAK5.9.1/os/linux/lib/cgemlib.a
> /usr/lib/libf2c.a(endfile.o): In function `t_runc':
> endfile.o(.text+0x208): the use of `tmpnam' is dangerous, better use `mkstemp'
> /home/skirby/wrf-gempak/GEMPAK5.9.1/os/linux/lib/gemlib.a(ssgsym.o): In 
> function `ss_gsym_':
> ssgsym.o(.text+0x4e): undefined reference to `G77_getenv_0'
> ssgsym.o(.text+0x8d): undefined reference to `G77_getenv_0'
> gmake: *** [wrf2gem] Error 2
> ==============================================================
> 
> I saw in the unidata mail archives, somebody was seeing a similar error when 
> compiling a mm5togem code.  In response, Steve Chiswell of Unidata support, 
> said you have to use the same linker in your program as you do for GEMPAK.  
> Therefore I tried using g77 in the linking portion of the wrf2gempak Makefile 
> but get lots of errors referencing pgf90.  Trying the reverse strategy, I 
> tried to compile GEMPAK with pgf90 but got slews of errors. Maybe there is an 
> easier workaround?  Thanks..
> 
> Regards,
> Steve
> 
> 

Ticket Details
===================
Ticket ID: WFE-503351
Department: Support GEMPAK
Priority: Normal
Status: Closed