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.
Daniel, > To: address@hidden > From: address@hidden (Dan codiga) > Subject: installing netcdf > Organization: France/Coriolis/LEGI-IMG > Keywords: 199701301104.EAA29511 In the above message you wrote: > I am interested in installing netcdf. I found errors on using the > default configure operations. Can you make suggestions for my > next attempt? Here are the particular specs and information, in > groups numbered 1-4. > > 1. uname -a gives me: > HP-UX corio720 A.09.05 A 9000/720 56924132 two-user license > > 2. env gives me: > DISPLAY=corio720:0.0 > EDITOR=/usr/vue/bin/vuepad > HOME=/users/codiga > LOGNAME=codiga > MAIL=/users/mail/codiga > PATH=.:/bin:/etc:/usr/bin:/dev:/usr/local/matlab/bin:/usr/local/bin > SHELL=/bin/csh > TERM=hpterm > TZ=WET0WETDST > USER=codiga > PWD=/users/codiga > WINDOWID=37748753 > COLUMNS=80 > LINES=24 > > 3. output from configure script (no special flags set): > This file contains any messages produced by compilers while > running configure, to aid debugging if configure makes a mistake. ... I actually wanted a different output from the configure script. The script generates three files (config.cache, config.log, & config.status) and writes to standard output. The standard output is the most useful for diagnosing problems. Sorry I wasn't more explicit. > > configure:1156: cc -E -D_HPUX_SOURCE -D_POSIX_SOURCE conftest.c >/dev/null > 2>co > nftest.out > configure:1197: cc -E -D_HPUX_SOURCE -D_POSIX_SOURCE conftest.c >/dev/null > 2>co > nftest.out > configure:1684: cc -c -O +z -D_HPUX_SOURCE -D_POSIX_SOURCE conftest.c 1>&5 > cc: warning 422: Unknown option "O" ignored. > cc: warning 422: Unknown option "c" ignored. Nevertheless, the above warnings are interesting. The only `cc' utility on our HP-UX A.09.05 A system is /bin/cc. This utility understands both of the `-c' and `-O' options. Every C compiler I've encountered has understood these options. Perhaps you're not using the C compiler that you think you are -- or perhaps something is wrong with the C compiler. > configure:1712: cc -o conftest -O -D_HPUX_SOURCE -D_POSIX_SOURCE conftest.c > 1 > >&5 > cc: warning 422: Unknown option "O" ignored. > configure:1745: cc -o conftest -O -D_HPUX_SOURCE -D_POSIX_SOURCE conftest.c > 1 > >&5 > cc: warning 422: Unknown option "O" ignored. > configure:1781: cc -o conftest -O -D_HPUX_SOURCE -D_POSIX_SOURCE conftest.c > 1 > >&5 > cc: warning 422: Unknown option "O" ignored. > configure:1845: cc -o conftest -O -D_HPUX_SOURCE -D_POSIX_SOURCE conftest.c > 1 > >&5 > cc: warning 422: Unknown option "O" ignored. > configure:1875: cc -o conftest -O -D_HPUX_SOURCE -D_POSIX_SOURCE conftest.c > 1>&5 > cc: warning 422: Unknown option "O" ignored. > configure:1960: cc -o conftest -O -D_HPUX_SOURCE -D_POSIX_SOURCE conftest.c > 1>&5 > cc: warning 422: Unknown option "O" ignored. > configure:2169: cc -o conftest -O -D_HPUX_SOURCE -D_POSIX_SOURCE conftest.c > 1>&5 > cc: warning 422: Unknown option "O" ignored. > configure:2218: cc -c -O -D_HPUX_SOURCE -D_POSIX_SOURCE conftest.c 1>&5 > cc: warning 422: Unknown option "O" ignored. > cc: "configure", line 2213: error 1588: "x_getint" undefined. > cc: "configure", line 2213: error 1531: Invalid member of struct or union. > cc: "configure", line 2213: error 1549: Modifiable lvalue required for > assignment operator. > configure:2259: cc -c -O -D_HPUX_SOURCE -D_POSIX_SOURCE conftest.c 1>&5 > cc: warning 422: Unknown option "O" ignored. > cc: "configure", line 2255: error 1705: Function prototypes are an ANSI > feature. > configure:2292: cc -c -O -D_HPUX_SOURCE -D_POSIX_SOURCE -DNO_HAVE_PROTOTYPES > conftest.c 1>&5 > cc: warning 422: Unknown option "O" ignored. > cc: "configure", line 2287: warning 5: "const" will become a keyword. > cc: "configure", line 2287: error 1000: Unexpected symbol: "charset". > cc: "configure", line 2287: error 1588: "const" undefined. > configure:2332: cc -c -O -D_HPUX_SOURCE -D_POSIX_SOURCE -DNO_HAVE_PROTOTYPES > -Dconst= conftest.c 1>&5 > cc: warning 422: Unknown option "O" ignored. > cc: "configure", line 2323: error 1705: Function prototypes are an ANSI > feature. > configure:2378: cc -o conftest -O -D_HPUX_SOURCE -D_POSIX_SOURCE > -DNO_HAVE_PROTOTYPES -Dconst= -DNO_STDARG conft > est.c 1>&5 > cc: warning 422: Unknown option "O" ignored. > configure:2450: cc -E -D_HPUX_SOURCE -D_POSIX_SOURCE -DNO_HAVE_PROTOTYPES > -Dconst= -DNO_STDARG conftest.c >/dev/n > ull 2>conftest.out > > > configure:2484: cc -E -D_HPUX_SOURCE -D_POSIX_SOURCE -DNO_HAVE_PROTOTYPES > -Dconst= -DNO_STDARG conftest.c >/dev/n > ull 2>conftest.out > configure:2510: cc -c -O -D_HPUX_SOURCE -D_POSIX_SOURCE -DNO_HAVE_PROTOTYPES > -Dconst= -DNO_STDARG conftest.c 1>&5 > cc: warning 422: Unknown option "O" ignored. > cc: "configure", line 2502: error 1584: Inconsistent type declaration: > "malloc". > > 4. output from make: > > > making `all' in directory /users/codiga/utils/netcdf/netcdf-2.4.3/src/port > > > returning to directory /users/codiga/utils/netcdf/netcdf-2.4.3/src > > > making `all' in directory /users/codiga/utils/netcdf/netcdf-2.4.3/src/xdr > > > returning to directory /users/codiga/utils/netcdf/netcdf-2.4.3/src > making `all' in directory /users/codiga/utils/netcdf/netcdf-2.4.3/src/libsrc > > cc -c +z -O -D_HPUX_SOURCE -D_POSIX_SOURCE -DNO_HAVE_PROTOTYPES > -Dconst= -DNO_STDARG attr.c > cc: warning 422: Unknown option "O" ignored. > cc: warning 422: Unknown option "c" ignored. > cc -c +z -O -D_HPUX_SOURCE -D_POSIX_SOURCE -DNO_HAVE_PROTOTYPES > -Dconst= -DNO_STDARG cdf.c > cc: warning 422: Unknown option "O" ignored. > cc: warning 422: Unknown option "c" ignored. > cc -c +z -O -D_HPUX_SOURCE -D_POSIX_SOURCE -DNO_HAVE_PROTOTYPES > -Dconst= -DNO_STDARG dim.c > cc: warning 422: Unknown option "O" ignored. > cc: warning 422: Unknown option "c" ignored. > cc -c +z -O -D_HPUX_SOURCE -D_POSIX_SOURCE -DNO_HAVE_PROTOTYPES > -Dconst= -DNO_STDARG file.c > cc: warning 422: Unknown option "O" ignored. > cc: warning 422: Unknown option "c" ignored. > cc -c +z -O -D_HPUX_SOURCE -D_POSIX_SOURCE -DNO_HAVE_PROTOTYPES > -Dconst= -DNO_STDARG iarray.c > cc: warning 422: Unknown option "O" ignored. > cc: warning 422: Unknown option "c" ignored. > cc -c +z -O -D_HPUX_SOURCE -D_POSIX_SOURCE -DNO_HAVE_PROTOTYPES > -Dconst= -DNO_STDARG error.c > cc: warning 422: Unknown option "O" ignored. > cc: warning 422: Unknown option "c" ignored. > cc -c +z -O -D_HPUX_SOURCE -D_POSIX_SOURCE -DNO_HAVE_PROTOTYPES > -Dconst= -DNO_STDARG globdef.c > cc: warning 422: Unknown option "O" ignored. > cc: warning 422: Unknown option "c" ignored. > cc -c +z -O -D_HPUX_SOURCE -D_POSIX_SOURCE -DNO_HAVE_PROTOTYPES > -Dconst= -DNO_STDARG putget.c > cc: warning 422: Unknown option "O" ignored. > cc: warning 422: Unknown option "c" ignored. > cc -c +z -O -D_HPUX_SOURCE -D_POSIX_SOURCE -DNO_HAVE_PROTOTYPES > -Dconst= -DNO_STDARG putgetg.c > cc: warning 422: Unknown option "O" ignored. > cc: warning 422: Unknown option "c" ignored. > cc -c +z -O -D_HPUX_SOURCE -D_POSIX_SOURCE -DNO_HAVE_PROTOTYPES > -Dconst= -DNO_STDARG sharray.c > cc: warning 422: Unknown option "O" ignored. > cc: warning 422: Unknown option "c" ignored. > case `uname -sv` in \ > 'AIX 3') \ > CFLAGS=`echo +z -O | sed 's/-O[23]//g;s/-O//g'`; \ > cc -c $CFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE > -DNO_HAVE_PROTOTYPES -Dconst= -DNO_STDARG string.c; \ > > ;; \ > *) \ > cc -c +z -O -D_HPUX_SOURCE -D_POSIX_SOURCE > -DNO_HAVE_PROTOTYPES -Dconst= -DNO_STDARG string.c; \ > ;; \ > esac > cc: warning 422: Unknown option "O" ignored. > cc: warning 422: Unknown option "c" ignored. > cc -c +z -O -D_HPUX_SOURCE -D_POSIX_SOURCE -DNO_HAVE_PROTOTYPES > -Dconst= -DNO_STDARG var.c > cc: warning 422: Unknown option "O" ignored. > cc: warning 422: Unknown option "c" ignored. > cc -c +z -O -D_HPUX_SOURCE -D_POSIX_SOURCE -DNO_HAVE_PROTOTYPES > -Dconst= -DNO_STDARG xdrposix.c > cc: warning 422: Unknown option "O" ignored. > cc: warning 422: Unknown option "c" ignored. > ar rcuv libnetcdf.a array.o attr.o cdf.o dim.o file.o iarray.o > error.o globdef.o putget.o putgetg.o sharr > ay.o string.o var.o xdrposix.o > a - array.o > a - attr.o > a - cdf.o > a - dim.o > a - file.o > a - iarray.o > a - error.o > a - globdef.o > a - putget.o > a - putgetg.o > a - sharray.o > a - string.o > a - var.o > a - xdrposix.o Odd. The C compiler said that the `-c' option is unknown but then it did the right thing and only compiled the files. > case "" in \ > '') ;; \ > *) ar rucv libnetcdf.a ;; \ > esac > ranlib libnetcdf.a > ranlib: ar already did it for you, see ar(1). > > returning to directory /users/codiga/utils/netcdf/netcdf-2.4.3/src > > > making `all' in directory /users/codiga/utils/netcdf/netcdf-2.4.3/src/fortran > > ./fortc -L . -O hpux9 common.inc > netcdf.inc > ./fortc -L . -O hpux9 jackets.src > jackets.c > cc -c +z -O -I../libsrc -D_HPUX_SOURCE -D_POSIX_SOURCE > -DNO_HAVE_PROTOTYPES -Dconst= -DNO_STDARG jackets. > c > cc: warning 422: Unknown option "O" ignored. > cc: warning 422: Unknown option "c" ignored. > ar rcuv ../libsrc/libnetcdf.a jackets.o > a - jackets.o > ranlib ../libsrc/libnetcdf.a > ranlib: ar already did it for you, see ar(1). > > returning to directory /users/codiga/utils/netcdf/netcdf-2.4.3/src > > > making `all' in directory /users/codiga/utils/netcdf/netcdf-2.4.3/src/ncdump > > cc -c -O -I../libsrc -D_HPUX_SOURCE -D_POSIX_SOURCE > -DNO_HAVE_PROTOTYP > ES -Dconst= -DNO_STDARG ncdump.c > cc: warning 422: Unknown option "O" ignored. > cc -c -O -I../libsrc -D_HPUX_SOURCE -D_POSIX_SOURCE > -DNO_HAVE_PROTOTYP > ES -Dconst= -DNO_STDARG vardata.c > cc: warning 422: Unknown option "O" ignored. > cc -c -O -I../libsrc -D_HPUX_SOURCE -D_POSIX_SOURCE > -DNO_HAVE_PROTOTYP > ES -Dconst= -DNO_STDARG dumplib.c > cc: warning 422: Unknown option "O" ignored. > cc -o ncdump -O ncdump.o vardata.o dumplib.o ../libsrc/libnetcdf.a > cc: warning 422: Unknown option "O" ignored. > /bin/ld: Unsatisfied symbols: > NC_free_array (code) > NC_copy_arrayvals (code) > nctypelen (code) > NC_xlen_array (code) > xdr_NC_array (code) > NC_typelen (code) > NC_re_array (code) > NC_incr_array (code) > NC_arrayfill (code) > NC_xtypelen (code) > NC_new_array (code) > *** Error code 1 The above, unsatisfied symbols are in the netCDF library ../libsrc/libnetcdf.a. It would appear that the C compiler didn't do the right thing when it compiled the files. I'm not sure what to tell you. I've never encountered this particular problem with a C compiler before. I have encountered other, major problems with C compilers, howerver. In all cases so far, the problem has been that the compiler was installed incorrectly. Can you verify that your compiler is working correctly? -------- Steve Emmerson <address@hidden>