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.
Dear Shuhei OKUBO, > To: address@hidden > From: address@hidden (Shuhei OKUBO) > Subject: Help installation, please > Organization: University of TOKYO/Earthquake Research Institute > Keywords: 199708010835.CAA07349 In the above message, you wrote: > Dear Sirs: > > I would greatly appreciate your help > of installing netCDF 3.3.1 on my WS. > > Problem is that > compilation of "ncdump.c" fails: > "_memmove" not found. > > a) I am using "gcc" , "g++" and "f77" ( SC1.0) > b) I chose enviroment variables as follows. > CPPFLAGS=-DNDEBUG > CC =gcc > CFLAGS='-O ' > FC=f77 > FFLAGS='-O -temp=.' > CXX=g++ > LIBS=/usr2/local/lib/gcc-lib/sparc-sun-sunos4.1.4_JL/2.7.2/libgcc.a > > > For your reference, I enclose > 1) out of "uname -a" > 2) VERSION > 3) output and error output of "configure" > 4) config.log > 5) output and error output of "make" > > Best regards, > > Dr. Shuhei OKUBO > Earthquake Research Institute > University of TOKYO > Fax:+81-3-5802-3317 > > ============== > 1) out of "uname -a ": SunOS gravity 4.1.4-JL 1 sun4m > ============== > 2) VERSION: 3.3.1 > ============== > 3) output and error output of "configure" > > creating cache ./config.cache > checking for m4... m4 > checking user-defined C compiler "gcc" > checking C compiler... works > checking how to make dependencies... cc -M > checking for g++... g++ > checking C++ compiler "g++"... works > checking how to run the C preprocessor... gcc -E > checking user-defined FORTRAN compiler "f77"... works > checking for FORTRAN .F compiler... > checking if FORTRAN compiler handles *.F files... yes > checking for C-equivalent to FORTRAN routine "SUB"... sub_ > checking for FORTRAN "byte"... yes > checking for FORTRAN "integer*2"... yes > checking if FORTRAN "byte" is C "signed char"... yes > checking if FORTRAN "byte" is C "short"... no > checking if FORTRAN "byte" is C "int"... no > checking if FORTRAN "integer*2" is C "short"... yes > checking if FORTRAN "integer*2" is C "int"... no > checking if FORTRAN "integer" is C "int"... yes > checking if FORTRAN "real" is C "float"... yes > checking if FORTRAN "doubleprecision" is C "double"... yes > checking for FORTRAN-equivalent to netCDF "byte"... byte > checking for FORTRAN-equivalent to netCDF "short"... integer*2 > checking for math library > checking for -lc... no > checking for -lm... yes > checking for ar... ar > checking for ranlib... ranlib > checking for stdlib.h... yes > checking for sys/types.h... yes > checking for strerror... no > checking for ftruncate... yes > checking for st_blksize in struct stat... yes > checking whether cross-compiling... no > checking for IEEE floating point format... yes > checking for ANSI C header files... no > checking for size_t... yes > checking for off_t... yes > checking for ssize_t... no > checking for ptrdiff_t... yes > checking for uchar... no > checking whether char is unsigned... no > checking whether byte ordering is bigendian... yes > checking size of short... 2 > checking size of int... 4 > checking size of long... 4 > checking size of float... 4 > checking size of double... 8 > checking size of off_t... 4 > checking size of size_t... 4 > checking for catman... catman > checking for manual-page index command... catman -w -M $(MANDIR) > checking binary distribution directory... /home/ftp/pub/binary/dummy_system > updating cache ./config.cache > creating ./config.status > creating macros.make > udcreating fortran/nfconfig.inc > fortran/nfconfig.inc is unchanged > creating libsrc/ncconfig.h > libsrc/ncconfig.h is unchanged > > > ============== > 4) config.log > This file contains any messages produced by compilers while > running configure, to aid debugging if configure makes a mistake. > > configure:1017: gcc -c -O -DNDEBUG conftest.c 1>&5 > configure:1150: g++ -c -DNDEBUG conftest.C 1>&5 > configure:1217: gcc -E -DNDEBUG conftest.c >/dev/null 2>conftest.out > configure:1316: f77 -c -O -temp=. conftest.f > conftest.f: > MAIN: > configure:1415: f77 -o conftest -O -temp=. conftest.F > ./cpp.22471.0.f: > MAIN: > "conftest.F", line 3: Warning: local variable "r" never used > configure:1456: f77 -c -O -temp=. conftest.f > conftest.f: > MAIN: > configure:1491: f77 -c -O -temp=. conftest.f > conftest.f: > sub: > configure:1514: f77 -c -O -temp=. conftest.f > conftest.f: > sub: > configure:1548: gcc -c -DNDEBUG -O conftest.c > configure:1550: f77 -o conftest -O -temp=. conftestf.f conftest.o > /usr2/local/lib/gcc-lib/sparc-sun-sunos4.1.4_JL/2.7.2/libgcc.a > conftestf.f: > MAIN: > configure:1552: ./conftest > configure:1590: gcc -c -DNDEBUG -O conftest.c > configure:1592: f77 -o conftest -O -temp=. conftestf.f conftest.o > /usr2/local/lib/gcc-lib/sparc-sun-sunos4.1.4_JL/2.7.2/libgcc.a > conftestf.f: > MAIN: > configure:1594: ./conftest > configure:1632: gcc -c -DNDEBUG -O conftest.c > configure:1634: f77 -o conftest -O -temp=. conftestf.f conftest.o > /usr2/local/lib/gcc-lib/sparc-sun-sunos4.1.4_JL/2.7.2/libgcc.a > conftestf.f: > MAIN: > configure:1636: ./conftest > configure:1678: gcc -c -DNDEBUG -O conftest.c > configure:1680: f77 -o conftest -O -temp=. conftestf.f conftest.o > /usr2/local/lib/gcc-lib/sparc-sun-sunos4.1.4_JL/2.7.2/libgcc.a > conftestf.f: > MAIN: > configure:1682: ./conftest > configure:1720: gcc -c -DNDEBUG -O conftest.c > configure:1722: f77 -o conftest -O -temp=. conftestf.f conftest.o > /usr2/local/lib/gcc-lib/sparc-sun-sunos4.1.4_JL/2.7.2/libgcc.a > conftestf.f: > MAIN: > configure:1724: ./conftest > configure:1764: gcc -c -DNDEBUG -O conftest.c > configure:1766: f77 -o conftest -O -temp=. conftestf.f conftest.o > /usr2/local/lib/gcc-lib/sparc-sun-sunos4.1.4_JL/2.7.2/libgcc.a > conftestf.f: > MAIN: > configure:1768: ./conftest > configure:1806: gcc -c -DNDEBUG -O conftest.c > configure:1808: f77 -o conftest -O -temp=. conftestf.f conftest.o > /usr2/local/lib/gcc-lib/sparc-sun-sunos4.1.4_JL/2.7.2/libgcc.a > conftestf.f: > MAIN: > configure:1810: ./conftest > configure:1848: gcc -c -DNDEBUG -O conftest.c > configure:1850: f77 -o conftest -O -temp=. conftestf.f conftest.o > /usr2/local/lib/gcc-lib/sparc-sun-sunos4.1.4_JL/2.7.2/libgcc.a > conftestf.f: > MAIN: > configure:1852: ./conftest > configure:1882: f77 -c -O -temp=. conftest.f > conftest.f: > MAIN: > "conftest.f", line 1: Warning: local variable "foo" never used > configure:1903: f77 -c -O -temp=. conftest.f > conftest.f: > MAIN: > "conftest.f", line 1: Warning: local variable "foo" never used > configure:1943: gcc -o conftest -O -DNDEBUG conftest.c -lc > /usr2/local/lib/gcc-lib/sparc-sun-sunos4.1.4_JL/2.7.2/libgcc.a 1>&5 > collect2: ld returned 2 exit status > ld: Undefined symbol > _tanh > configure:1977: gcc -o conftest -O -DNDEBUG conftest.c -lm > /usr2/local/lib/gcc-lib/sparc-sun-sunos4.1.4_JL/2.7.2/libgcc.a 1>&5 > configure:2072: gcc -E -DNDEBUG conftest.c >/dev/null 2>conftest.out > configure:2106: gcc -E -DNDEBUG conftest.c >/dev/null 2>conftest.out > configure:2156: gcc -o conftest -O -DNDEBUG conftest.c > /usr2/local/lib/gcc-lib/sparc-sun-sunos4.1.4_JL/2.7.2/libgcc.a 1>&5 > collect2: ld returned 2 exit status > ld: Undefined symbol > _strerror > configure:2204: gcc -o conftest -O -DNDEBUG conftest.c > /usr2/local/lib/gcc-lib/sparc-sun-sunos4.1.4_JL/2.7.2/libgcc.a 1>&5 > configure:2238: gcc -c -O -DNDEBUG conftest.c 1>&5 > configure:2270: gcc -o conftest -O -DNDEBUG conftest.c > /usr2/local/lib/gcc-lib/sparc-sun-sunos4.1.4_JL/2.7.2/libgcc.a 1>&5 > configure:2322: gcc -o conftest -O -DNDEBUG conftest.c > /usr2/local/lib/gcc-lib/sparc-sun-sunos4.1.4_JL/2.7.2/libgcc.a 1>&5 > configure:2351: gcc -E -DNDEBUG conftest.c >/dev/null 2>conftest.out > configure:2672: gcc -c -O -DNDEBUG conftest.c 1>&5 > configure: In function `t': > configure:2667: `bogus' undeclared (first use this function) > configure:2667: (Each undeclared identifier is reported only once > configure:2667: for each function it appears in.) > configure:2667: parse error before `endian' > configure:2718: gcc -o conftest -O -DNDEBUG conftest.c > /usr2/local/lib/gcc-lib/sparc-sun-sunos4.1.4_JL/2.7.2/libgcc.a 1>&5 > configure:2756: gcc -o conftest -O -DNDEBUG conftest.c > /usr2/local/lib/gcc-lib/sparc-sun-sunos4.1.4_JL/2.7.2/libgcc.a 1>&5 > configure:2790: gcc -o conftest -O -DNDEBUG conftest.c > /usr2/local/lib/gcc-lib/sparc-sun-sunos4.1.4_JL/2.7.2/libgcc.a 1>&5 > configure:2824: gcc -o conftest -O -DNDEBUG conftest.c > /usr2/local/lib/gcc-lib/sparc-sun-sunos4.1.4_JL/2.7.2/libgcc.a 1>&5 > configure:2858: gcc -o conftest -O -DNDEBUG conftest.c > /usr2/local/lib/gcc-lib/sparc-sun-sunos4.1.4_JL/2.7.2/libgcc.a 1>&5 > configure:2892: gcc -o conftest -O -DNDEBUG conftest.c > /usr2/local/lib/gcc-lib/sparc-sun-sunos4.1.4_JL/2.7.2/libgcc.a 1>&5 > configure:2930: gcc -o conftest -O -DNDEBUG conftest.c > /usr2/local/lib/gcc-lib/sparc-sun-sunos4.1.4_JL/2.7.2/libgcc.a 1>&5 > configure:2968: gcc -o conftest -O -DNDEBUG conftest.c > /usr2/local/lib/gcc-lib/sparc-sun-sunos4.1.4_JL/2.7.2/libgcc.a 1>&5 > > ============== > 5) output and error output of "make" > make[1]: Entering directory `/data2/netcdf/netcdf-3.3.1/src' > > Making `all' in directory /data2/netcdf/netcdf-3.3.1/src/libsrc > > make[2]: Entering directory `/data2/netcdf/netcdf-3.3.1/src/libsrc' > gcc -c -O -I. -DNDEBUG attr.c > gcc -c -O -I. -DNDEBUG dim.c > gcc -c -O -I. -DNDEBUG error.c > gcc -c -O -I. -DNDEBUG -DVERSION=`cat ../VERSION` libvers.c > gcc -c -O -I. -DNDEBUG nc.c > gcc -c -O -I. -DNDEBUG ncio.c > gcc -c -O -I. -DNDEBUG ncx.c > gcc -c -O -I. -DNDEBUG putget.c > gcc -c -O -I. -DNDEBUG string.c > gcc -c -O -I. -DNDEBUG v1hpg.c > gcc -c -O -I. -DNDEBUG v2i.c > gcc -c -O -I. -DNDEBUG var.c > ar cru libnetcdf.a attr.o dim.o error.o libvers.o nc.o ncio.o ncx.o > putget.o string.o v1hpg.o v2i.o var.o > ranlib libnetcdf.a > make[2]: Leaving directory `/data2/netcdf/netcdf-3.3.1/src/libsrc' > > Returning to directory /data2/netcdf/netcdf-3.3.1/src > > make[1]: Leaving directory `/data2/netcdf/netcdf-3.3.1/src' > make[1]: Entering directory `/data2/netcdf/netcdf-3.3.1/src' > > Making `all' in directory /data2/netcdf/netcdf-3.3.1/src/fortran > > make[2]: Entering directory `/data2/netcdf/netcdf-3.3.1/src/fortran' > gcc -c -O -I../libsrc -DNDEBUG fort-attio.c > gcc -c -O -I../libsrc -DNDEBUG fort-control.c > gcc -c -O -I../libsrc -DNDEBUG fort-dim.c > gcc -c -O -I../libsrc -DNDEBUG fort-genatt.c > gcc -c -O -I../libsrc -DNDEBUG fort-geninq.c > gcc -c -O -I../libsrc -DNDEBUG fort-genvar.c > gcc -c -O -I../libsrc -DNDEBUG fort-lib.c > gcc -c -O -I../libsrc -DNDEBUG fort-misc.c > gcc -c -O -I../libsrc -DNDEBUG fort-v2compat.c > gcc -c -O -I../libsrc -DNDEBUG fort-vario.c > gcc -c -O -I../libsrc -DNDEBUG fort-var1io.c > gcc -c -O -I../libsrc -DNDEBUG fort-varaio.c > gcc -c -O -I../libsrc -DNDEBUG fort-varmio.c > gcc -c -O -I../libsrc -DNDEBUG fort-varsio.c > ar cru ../libsrc/libnetcdf.a fort-attio.o fort-control.o fort-dim.o > fort-genatt.o fort-geninq.o fort-genvar.o fort-lib.o fort-misc.o > fort-v2compat.o fort-vario.o fort-var1io.o fort-varaio.o fort-varmio.o > fort-varsio.o > ranlib ../libsrc/libnetcdf.a > make[2]: Leaving directory `/data2/netcdf/netcdf-3.3.1/src/fortran' > > Returning to directory /data2/netcdf/netcdf-3.3.1/src > > make[1]: Leaving directory `/data2/netcdf/netcdf-3.3.1/src' > make[1]: Entering directory `/data2/netcdf/netcdf-3.3.1/src' > > Making `all' in directory /data2/netcdf/netcdf-3.3.1/src/ncdump > > make[2]: Entering directory `/data2/netcdf/netcdf-3.3.1/src/ncdump' > gcc -c -O -I../libsrc -DNDEBUG ncdump.c > gcc -c -O -I../libsrc -DNDEBUG vardata.c > gcc -c -O -I../libsrc -DNDEBUG dumplib.c > gcc -o ncdump -O ncdump.o vardata.o dumplib.o -L../libsrc -lnetcdf > /usr2/local/lib/gcc-lib/sparc-sun-sunos4.1.4_JL/2.7.2/libgcc.a > collect2: ld returned 2 exit status > ld: Undefined symbol > _memmove > make[2]: *** [ncdump] Error 1 > make[2]: Leaving directory `/data2/netcdf/netcdf-3.3.1/src/ncdump' > make[1]: *** [subdir_target] Error 1 > make[1]: Leaving directory `/data2/netcdf/netcdf-3.3.1/src' > make: *** [ncdump/all] Error 2 It appears that you are missing the Standard C function "memmove()". This is undoubtably due to the age of your vendor-supplied C compiler (SC1.0 is quite old). The GNU C compiler fixes some problems with the vendor-supplied C header files, but it can't create a function that doesn't exist. I see two possible solutions: A. Install the latest C compiler from Sun (SC4.2, I think); or B. Install the freely-available GNU C++ library. This *should* contain the memmove() function in the library "libiberty.a" that it installs. The GNU C++ library can be found at the following sites: ftp://tron.um.u-tokyo.ac.jp/pub/GNU/prep/ ftp://ftp.cs.titech.ac.jp/GNU/ Look for the file "libg++-2.7.2.tar.gz". When you then attempt to rebuild the netCDF package, do the following: 1. Go to the top-level source directory. 2. Execute the command "make distclean". 3. Remove the file "config.cache" if it exists. 4. Set your environment variables as before but add a reference to the install library "libiberty.a" to the LIBS variable, e.g. LIBS='/usr2/local/lib/gcc-lib/sparc-sun-sunos4.1.4_JL/2.7.2/libgcc.a -L/usr/local/gnu/lib -liberty' NOTE: The actual pathname might be different on your system -- depending on where you install it. 5. Re-execute the configure script. 6. Proceed normally from here. -------- Steve Emmerson <http://www.unidata.ucar.edu>