This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
>To: address@hidden >From: "Misrak Fisseha" <address@hidden> >Subject: Help on Netcdf!! >Organization: . >Keywords: 199702101501.IAA26012 Hi Misrak, > I have problems in installing netcdf software. > The installation process seems ok until I made a test. > The command 'make test' results in the following error messages. > > - --------------------------------------------------------------------- > # make test > ar rcuv ../libsrc/libnetcdf.a jackets.o > ranlib ../libsrc/libnetcdf.a > f77 -o ftest ftest.o -L../libsrc -lnetcdf > Undefined first referenced > symbol in file > xdr_enum ../libsrc/libnetcdf.a(array.o) > xdr_float ../libsrc/libnetcdf.a(cdf.o) > xdr_int ../libsrc/libnetcdf.a(array.o) > xdr_vector ../libsrc/libnetcdf.a(sharray.o) > xdr_u_long ../libsrc/libnetcdf.a(array.o) > xdr_double ../libsrc/libnetcdf.a(cdf.o) > xdr_long ../libsrc/libnetcdf.a(dim.o) > xdr_opaque ../libsrc/libnetcdf.a(array.o) > ld: fatal: Symbol referencing errors. No output written to ftest What should have been invoked is: f77 -o ftest ftest.o -L../libsrc -lnetcdf -lnsl where the "-lnsl" is necessary to get the xdr library functions. This should have set in the Makefile by the configure script, but it wasn't because of the problem described below. > > - ------------------------------------------------------------------------ > I will include the following information if it help: > > 1. Output from the command `uname -a'. > > SunOS banqpal 5.5 Generic sun4u sparc SUNW,Ultra-1 OK, we also have a SunOS 5.5 system, but the problem doesn't occur on ours. I think the difference is you have /usr/ucb/ in your PATH environment variable ahead of the /opt/SUNWspro/SC4.0/bin directory, so you are getting some old /usr/ucb/cc non-ANSI C compiler and libraries (or make or f77 or ...?) instead of the Sun ANSI C compiler and libraries: > 2. Output from the command `env'. ... > PATH=/bin:/usr/bin:/usr/ccs/bin:/usr/ucb:/etc:.:/usr/openwin/bin:/opt/SUNWsp > ro/SC4.0/bin:/opt/SUNWspro/bin:/export/NetScape:/export/grassland/bin:/usr/x > pg4/bin:/usr/include:/export/gzip Try moving /usr/ucb to the end of your PATH environment variable instead of near the beginning. Then run "make clean", delete the file "config.cache", and try making netCDF again, starting with running the "configure" script. > 4. Output from the `configure' script. > > configure > creating cache ./config.cache > checking for catman... catman > checking for fill-value usage... new usage > checking the installation prefix... /export/NET/netcdf-2.4.3 > checking the installation exec-prefix... /export/NET/netcdf-2.4.3 > checking for cc... cc > checking type of operating system... sunos5 > checking for ranlib... ranlib > checking how to run the C preprocessor... cc -E > checking the C preprocessor... works > checking for f77... f77 > checking for CC... no > checking for CC... no > checking for cxx... no > checking for c++... no > checking for g++... no > checking for gcc... no > checking for yacc... yacc > checking for neqn... neqn > checking for tbl... tbl > checking for ar... ar > checking for makeinfo... no > checking for tar flags... -chof > checking for dependency generation mechanism... cc -xM > checking for C position-independent-code compile-option... -Kpic > checking whether cross-compiling... no > checking size of int... 4 > checking size of long... 4 > checking type of nclong... long > checking endianess... big endian > checking type of netlong... long > checking type of internal netlong... long > checking for XDR header-file... -I/usr/include/rpc > checking for XDR library... > checking for xdr_long in default library... yes I think this indicates the problem. On our Solaris system, we get: checking for xdr_long in default library... no checking for xdr_long in -lrpc... no checking for xdr_long in -lnsl... yes checking XDR implementation... ok ... Please let me know if changing the position of /usr/ucb in your PATH doesn't fix the problem. --Russ _____________________________________________________________________ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu