Hi Irv,
It sounds like you are trying to use some precompiled NCAR Graphics
binaries for your MacBook? If so, these binaries were built with g95
and that's why "ncargex" is trying to use g95 ("ncargex" itself
doesn't use g95, but it calls "ncargf77" which does).
You can do one of two things here: you can try to modify "ncargf77"
(which is in $NCARG_ROOT/bin) so that it uses the compiler you want,
and to remove the reference to "-L/sw/lib". Or, you can try to build
NCAR Graphics from source code using the Absoft compiler.
If you go with the first option, you will need to get your Absoft
compiler to correctly link with gcc/g95-compiled NCAR Graphics
libraries. If I remember correctly, the Absoft compiler does things a
little differently with regard to how it stores Fortran routine names
in a library, so you have to include special options in order for it
to look for symbols as the g95 compiler would expect them to be. This
is why you are getting the undefined symbols like "_CPGETI". The g95
compiler stores this symbol as "cpgeti_" in the libncarg.a library,
whereas the Absoft compiler is apparently expecting it to be
"_CPGETI". This is known as "name mangling". Unfortunately, I can't
remember what the correct option is to fix this name mangling so that
the Absoft and g95 compilers are looking for the same internal
names. Does anybody else out there know?
As for compiling NCAR Graphics using the Absoft compiler: I have not
tried this on a Mac, so I don't know what kind of success you'll
have. Perhaps somebody else on this list can provide some tips.
--Mary
On Tue, 4 Sep 2007, Irv Lindemuth wrote:
> Even though I am far from being a UNIX expert, I have used NCAR graphics and
> Absoft Fortran successfully on OSX for five years. I am now trying to
> install the latest version of NCAR (4.4.2) and the lastest version of Absoft
> (10.0.7) on a new MacBook 2.16 GHz Intel Core 2 Duo. A TERMINAL dialog
> appears below.
>
> (1) when I try to run the example
>
> ncargex cpex08
>
> I get a
>
> g95: Command not found.
>
> error message.
>
> (2) So I change the g95 to an f95 and I get a big list of undefined symbols
> and an error message
>
> directory name (/sw/lib) does not exist
>
> I have absolutely no idea what is supposed to be in the /sw/lib and where it
> is supposed to come from.
>
> I believe my environment is set up correctly (printed out below)
>
> Please help.
>
> (3) when I try to compile one of my standard programs using my usual compile
> line for Absoft, I also get a big list of undefined symbols. See list below.
> What's going on here?
>
> Thanks.
>
> --IL
>
>
>
> NCAR EXAMPLE:
>
> [Irv-2:codes/07_bigger-grid/working_files] irvinlin% ncargex cpex08
>
> NCAR Graphics Fortran Example <cpex08>
>
> Copying cpex08.f
>
> Copying cpexcc.f
>
> Compiling and linking...
> g95 -O -o cpex08 cpexcc.f cpex08.f -L/applications/ncarg/lib -L/usr/X11R6/lib
> -L/sw/lib -lncarg -lncarg_gks -lncarg_c -lXpm -lX11 -lXext
> csh: g95: Command not found.
>
> The compile and link failed.
>
> [Irv-2:codes/07_bigger-grid/working_files] irvinlin% f95 -O -o cpex08
> cpexcc.f cpex08.f -L/applications/ncarg/lib -L/usr/X11R6/lib -L/sw/lib
> -lncarg -lncarg_gks -lncarg_c -lXpm -lX11 -lXext
> This demonstration copy of Absoft Fortran 95 expires 09/29/07.
> /usr/bin/ld: warning -L: directory name (/sw/lib) does not exist
> /usr/bin/ld: Undefined symbols:
> _CPGETI
> _GETSET
> _GSCR
> _PCGETI
> _PCGETR
> _PCSETI
> _PLCHHQ
> _PLOTIF
> _SET
> _ARINAM
> _ARSCAM
> _CPCLAM
> _CPCLDM
> _CPRECT
> _CPSETI
> _CPSETR
> _FRAME
> _GACWK
> _GCLKS
> _GCLWK
> _GDAWK
> _GFA
> _GOPKS
> _GOPWK
> _GPL
> _GSCLIP
> _GSFACI
> _GSFAIS
> _GSPLCI
> _LBLBAR
> _LBSETI
> _MAPACI
> _MAPBLA
> _MAPGRM
> _MAPINT
> _MAPIQA
> _MAPITA
> _MAPLOT
> _MAPPOS
> _MAPROJ
> _MAPSET
> _MAPSTC
> _MAPSTI
> _MDIPAN
> _MDLNAM
> _MDLNDR
> /tmp/NuM9SY/cpexcc.o reference to undefined _CPGETI
> /tmp/NuM9SY/cpexcc.o reference to undefined _GETSET
> /tmp/NuM9SY/cpexcc.o reference to undefined _GSCR
> /tmp/NuM9SY/cpexcc.o reference to undefined _PCGETI
> /tmp/NuM9SY/cpexcc.o reference to undefined _PCGETR
> /tmp/NuM9SY/cpexcc.o reference to undefined _PCSETI
> /tmp/NuM9SY/cpexcc.o reference to undefined _PLCHHQ
> /tmp/NuM9SY/cpexcc.o reference to undefined _PLOTIF
> /tmp/NuM9SY/cpexcc.o reference to undefined _SET
> /tmp/NuM9SY/cpex08.o reference to undefined _ARINAM
> more references to undefined symbols ...
> collect2: ld returned 1 exit status
> link failed.
> [Irv-2:codes/07_bigger-grid/working_files] irvinlin% cd /sw
> tcsh: /sw: No such file or directory.
> [Irv-2:codes/07_bigger-grid/working_files] irvinlin% env
> PATH=/usr/local/bin:.:/Users/irvinlindemuth/bin:/Users/irvinlindemuth/documents/mhrdrhome/codes:/applications/Absoft/bin:/applications/ncarg/bin:/bin:/sbin:/usr/bin:/usr/sbin
> SECURITYSESSIONID=4a1360
> HOME=/Users/irvinlindemuth
> SHELL=/bin/tcsh
> USER=irvinlindemuth
> __CF_USER_TEXT_ENCODING=0x1F5:0:0
> TERM_PROGRAM=Apple_Terminal
> TERM_PROGRAM_VERSION=133
> TERM=xterm-color
> LOGNAME=irvinlindemuth
> HOSTTYPE=intel-pc
> VENDOR=apple
> OSTYPE=darwin
> MACHTYPE=i386
> SHLVL=1
> PWD=/Users/irvinlindemuth/documents/mhrdrhome/codes/07_bigger-grid/working_files
> GROUP=staff
> HOST=Irv-2.local
> NCARG_ROOT=/applications/ncarg
> FC=f95
> ABSOFT=/Applications/Absoft
>
> STANDARD PROGRAM
>
> _GACWK_
> _GESC_
> _GETSET_
> _GETUSV_
> _GOPKS_
> _GOPWK_
> _GQCHH_
> _GQCHUP_
> _GQCLIP_
> _GQTXAL_
> _GQTXFP_
> _GSCHH_
> _GSCHUP_
> _GSCLIP_
> _GSCR_
> _GSELNT_
> _GSTXAL_
> _GSTXCI_
> _GSTXFP_
> _GTX_
> _SETUSV_
> _SET_
> _AGBACK_
> _AGCURV_
> _AGSETC_
> _AGSETF_
> _AGSETI_
> _AGSETP_
> _AGSETR_
> _AGSTUP_
> _ANOTAT_
> _CLSGKS_
> _DASHDC_
> _DPSETI_
> _FRAME_
> _PLCHLQ_
> /tmp/I2xf5Y/libmac.o reference to undefined _GACWK_
> /tmp/I2xf5Y/libmac.o reference to undefined _GESC_
> /tmp/I2xf5Y/libmac.o reference to undefined _GETSET_
> /tmp/I2xf5Y/libmac.o reference to undefined _GETUSV_
> /tmp/I2xf5Y/libmac.o reference to undefined _GOPKS_
> /tmp/I2xf5Y/libmac.o reference to undefined _GOPWK_
> /tmp/I2xf5Y/libmac.o reference to undefined _GQCHH_
> /tmp/I2xf5Y/libmac.o reference to undefined _GQCHUP_
> /tmp/I2xf5Y/libmac.o reference to undefined _GQCLIP_
> /tmp/I2xf5Y/libmac.o reference to undefined _GQTXAL_
> more references to undefined symbols ...
> collect2: ld returned 1 exit status
> link failed.
>
> _______________________________________________
> ncarg-talk mailing list
> ncarg-talk_at_ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncarg-talk
>
_______________________________________________
ncarg-talk mailing list
ncarg-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncarg-talk
Received on Tue Sep 04 2007 - 13:54:05 MDT
This archive was generated by hypermail 2.2.0 : Fri Sep 07 2007 - 11:03:57 MDT