Hi,
I am trying to install a plotting package for ROMS on a Sun station and I have a problem when am trying to link with the ncarg libraries. After compiling normally I have that message on the screen:
#################################################################
/opt/SUNWspro/bin/f95 -u -U -O3 \
cnt.o cpmpxy2d.o mapeod.o stumsl.o stumxy.o vvumxy.o -o /home/cdenamie/Plot_ROMS/bin/cnt \
libUTIL.a -L/usr/local/lib -lncarg -lncarg_gks -lncarg_c -L/usr/X11R6/lib/64 -lX11 -L/usr/local/netcdf/lib -lnetcdf -lnsl
Undefined first referenced
symbol in file
__do_l_out_pv /usr/local/lib/libncarg.a(pcffgd.o)
__do_f_out_pv /usr/local/lib/libncarg.a(cpgiws.o)
__f_malloc__ /usr/local/lib/libncarg.a(stutil.o)
__s_cat /usr/local/lib/libncarg.a(cpcldm.o)
__i_conv_c /usr/local/lib/libncarg.a(cpinrc.o)
__c_conv_i /usr/local/lib/libncarg.a(cpnumb.o)
__f_free__ /usr/local/lib/libncarg.a(stutil.o)
__s_copy /usr/local/lib/libncarg.a(cpcldm.o)
__s_stop /usr/local/lib/libncarg.a(cpgiws.o)
__s_rsFi_pv /usr/local/lib/libncarg_gks.a(gesc.o)
__e_rsfi_pv /usr/local/lib/libncarg_gks.a(gesc.o)
__do_f_in_pv /usr/local/lib/libncarg_gks.a(gesc.o)
__s_wsFi_pv /usr/local/lib/libncarg.a(pcfcls.o)
__s_wsFe_pv /usr/local/lib/libncarg.a(cpgiws.o)
__s_wsfi_pv /usr/local/lib/libncarg.a(cpnumb.o)
__e_wsfi_pv /usr/local/lib/libncarg.a(cpnumb.o)
__s_wsfe_pv /usr/local/lib/libncarg_gks.a(gerlog.o)
__e_wsfe_pv /usr/local/lib/libncarg.a(cpgiws.o)
__s_wsle_pv /usr/local/lib/libncarg.a(pcffgd.o)
__e_wsle_pv /usr/local/lib/libncarg.a(pcffgd.o)
ld: fatal: Symbol referencing errors. No output written to /home/cdenamie/Plot_ROMS/bin/cnt
make: *** [/home/cdenamie/Plot_ROMS/bin/cnt] Error 1
#########################################################################
My personal opinion is that the linker does not like __ and that is why the other programs are linked while the ones above are not. I had try to link with the option –fno-second-underscore but the error message was saying:
ld: fatal: option -f and building a dynamic executable are incompatible
ld: fatal: Flags processing errors
I think that I had probably reach the point where I have no more any clue of how to solve the problem. Do you think you can help? Is it a problem you had already faced? Do you think there is something wrong with my compiling options (find enclosed the makefile and the .mk files).
Thank you for your help.
Regards
Cléa
ROMS Plot package: Linking problem with the ncarg libraries
ROMS Plot package: Linking problem with the ncarg libraries
- Attachments
-
- makefile.txt
- (9.85 KiB) Downloaded 375 times
-
- SunOS-f95.mk
- (2.72 KiB) Downloaded 352 times
Re: ROMS Plot package: Linking problem with the ncarg libraries
Did you compile the ncarg libraries your self? or did you get them from a binary package? It's possible that the ncarg libraries you have on your machine are not compatible with your SUN f95 compiler. You may need to compile ncarg with the same compiler(s) you are compiling the ROMS plotting package with.
The -fno-second-underscore is a gfortran flag and refers to trailing underscores, not leading.
The -fno-second-underscore is a gfortran flag and refers to trailing underscores, not leading.
Re: ROMS Plot package: Linking problem with the ncarg libraries
Hi,
I did not install myself the ncarg package on the Sun station. I had check how it was installed and it seems to me that it was installed and compiled with f90.
Thank you very much for your help.
Clea
I did not install myself the ncarg package on the Sun station. I had check how it was installed and it seems to me that it was installed and compiled with f90.
Thank you very much for your help.
Clea