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.
Graeme, > To: address@hidden > From: address@hidden (Graeme Potter) > Subject: netCDF and Linux > Organization: . In the above message you wrote: > I am having trouble installing netCDF on my system which is running Linux > using the umsdos (under MSDOS) option. > > As I am using bash I used :- > > CC=gcc CPPFLAGS= ./configure --prefix=/usr/local > > then > > make all > log 2>&1 & > > > -------------------------------------------------------------------- > > making `all' in directory /temp/netcdf-2.4.3/src/port > > make[1]: Entering directory `/temp/netcdf-2.4.3/src/port' > make[1]: Nothing to be done for `all'. > make[1]: Leaving directory `/temp/netcdf-2.4.3/src/port' > > returning to directory /temp/netcdf-2.4.3/src > > > making `all' in directory /temp/netcdf-2.4.3/src/xdr > > make[1]: Entering directory `/temp/netcdf-2.4.3/src/xdr' > make[2]: Entering directory `/temp/netcdf-2.4.3/src/xdr' > gcc -c -fpic -O -I/usr/include/rpc -DUD_NO_MALLOC_DECL xdr.c > In file included from /usr/include/stdlib.h:35, > from xdr.c:17: > /usr/include/errno.h:27: linux/errno.h: No such file or directory > In file included from types.h:42, > from xdr.c:20: > /usr/include/sys/types.h:4: linux/types.h: No such file or directory > make[2]: *** [xdr.o] Error 1 > make[2]: Leaving directory `/temp/netcdf-2.4.3/src/xdr' > make[1]: *** [all] Error 2 > make[1]: Leaving directory `/temp/netcdf-2.4.3/src/xdr' > make: *** [xdr/all] Error 127 > > -------------------------------------------------------------------- > > It would appear to me that make is trying to find files in a directory > called "linux" which is the msdos pseudo root for the Linux umsdos option > and isn't visable from within Linux? Perhaps I am doing something stupid or > misunderstanding the text but anyway I can't get it to work. > > Any suggestions that you could make would be most welcome. Though I haven't built the netCDF package on a Linux system and don't routinely use the gcc(1) compiler, I have built the package on many different systems. It appears to me that your gcc(1) installation is incorrect in some way: system header files are attempting to include linux-specific headers files which the compiler can't find. For example, the system header file `/usr/include/stdlib.h' appears to be trying to include the header file `linux/errno.h'. Does it? I suggest the following: 1. Verify that the system header files (in `/usr/include') are attempting to include header files in a `linux/' subdirectory. 2. If true, then attempt to locate the `linux/' subdirectory (is it under `/usr/include/'?). 3. Once you know where that directory is, try specifying it in the value of the CPPFLAGS variable before running the `configure' script. For example, say the the directory `/usr/local/gcc/linux' exists and contains the header files `errno.h' and `types.h', then re-invoke the `configure' script in the following way: $ CC=gcc CPPFLAGS=-I/usr/local/gcc ./configure --prefix=/usr/local 4. Then try a re-make(1). Please let me know if this helps. -------- Steve Emmerson <address@hidden>