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.
Susana, > To: address@hidden > cc: Susana Pires Vilanova <address@hidden> > From: Susana Pires Vilanova <address@hidden> > Subject: Re: 960531: NetCDF installation, Linux > Organization: . > Keywords: 199605241503.AA18983 In the above message you wrote: > I've started the installation from the begining so that you understand > better what is happening. I will descrive you what I did and the error > messages. > > 1- I have changed my CUSTOMIZE file to > > CC=gcc > CFLAGS='-m486 -O2 -fomit-frame-pointer -pipe' > CXX=g++ > CXXFLAGS=-O -I/usr/include/g++ > ude-directory > FC="" > OS=linux > > 2-I have run the 'configure' in src directory > > $configure > > and I have not received any error message. > > 3-I have 'make all' using tcsh > > %make all > & ! log & > %tail -f log > > and I have got an error message about ncgen. The error part was > > ... > lex ncgen.l > yacc -d ncgen.y > make: /usr/bin/make: cannot execute binary file > make(1): *** (ncgentab.c) Error 126 > make(1): Leaving directory '/disk2/GMT/netcdf-2.4.2/src/ncgen' > make: *** (ncgen/all) Error 1 > > 4- I went to the ncgen directory and I type > > $make clean > $make -n all > logn > > The 'logn' file is > > gcc -c -m486 -O2 -fomit-frame-pointer -pipe -I../libsrc main.c > gcc -c -m486 -O2 -fomit-frame-pointer -pipe -I../libsrc load.c > lex ncgen.l > mv lex.yy.c ncgenyy.c > yacc -d ncgen.y > mv y.tab.c ncgentab.c > mv y.tab.h ncgentab.h > gcc -c -m486 -O2 -fomit-frame-pointer -pipe -I../libsrc ncgentab.c > gcc -c -m486 -O2 -fomit-frame-pointer -pipe -I../libsrc escapes.c > gcc -c -m486 -O2 -fomit-frame-pointer -pipe -I../libsrc getfill.c > gcc -c -m486 -O2 -fomit-frame-pointer -pipe -I../libsrc init.c > gcc -c -m486 -O2 -fomit-frame-pointer -pipe -I../libsrc close.c > gcc -c -m486 -O2 -fomit-frame-pointer -pipe -I../libsrc genlib.c > if [ -r ncgen.f -o -r ncgen.F ]; then \ > ld=' -o ncgen '; \ > elif [ -r ncgen.cc -o -r ncgen.C ]; then \ > ld='g++ -o ncgen '; \ > else \ > ld='gcc -o ncgen -m486 -O2 -fomit-frame-pointer -pipe'; \ > fi; \ > cmd="$ld main.o load.o ncgentab.o escapes.o getfill.o init.o close.o > genlib.o ../libsrc/libnetcdf.a "; \ > echo $cmd; \ > $cmd \ > || (rm -f ncgen; exit 1) > > 5- Then I've typed in ncgen directory > > $make all (and the error message was the one in log) > $yacc -d ncgen.y > $mv y.tab.c ncgentab.c > $mv y.tab.h ncgentab.h > $make all > > and no error messages apear. > > 6- Then, I went to src directory and did > > $make all > $make test > > I had no error messages. > > 7-I did the install in two diferent ways > > 7a)- I did 'make install' using tcsh: > > %make install > & ! loginst & > %tail -f loginst > > The error part in 'loginst' is > > ... > making `install' in directory /disk2/GMT/netcdf-2.4.2/src/ncdump > > make[1]: Entering directory `/disk2/GMT/netcdf-2.4.2/src/ncdump' > Makefile:354: warning: overriding commands for target > `/disk2/GMT/netcdf-2.4.2/bin' > Makefile:351: warning: ignoring old commands for target > `/disk2/GMT/netcdf-2.4.2/bin' > make: *** [ncdump/install] Error 1 > > And then I tried to make the install in the semi-manual way executing > > $(cd libsrc && make install) > $(cd fortran && make install) > $(cd ncdump && make install) > $(cd ncgen && make install) > > and I had no error messages (just the two usual warnings). > > 7b)- I just atempted the semi-manual way: > > $(cd libsrc && make install) > $(cd fortran && make install) > $(cd ncdump && make install) > $(cd ncgen && make install) > > The first command was OK but the three last commands send me the message > > Makefile:354: warning overriding commands for target > 'disk2/GMT/netcdf-2.4.2/bin' > Makefile:351. warning ignoring old commands for target > 'disk2/GMT/netcdf-2.4.2/bin' > IOT trap/Abort > 9- The results of 7a) and 7b) were the same. Tiping > > $ls -lR bin include lib man > > I get > > /bin/ls: bin: No such file or directory > /bin/ls: man: No such file or directory > include: > total 17 > -rw-r--r-- 1 root root 16117 Jun 4 17:30 netcdf.h > > lib: > total 62 > -rw-r--r-- 1 root root 62162 Jun 4 17:30 libnetcdf.a > > I hope this can help you to understand whats happening. Thank you for the very clear exposition. It does help me understand your problem. I suggest the following: 1. Go to the `port/' subdirectory. 2. Apply the enclosed patch to the file `master.mk.in'. 3. Go to the top-level, netCDF source directory (i.e. up one level). 4. Execute the command `./config.status'. This will regenerate the makefiles using the patched master makefile. 5. Execute the command `make install'. Trap the output and send it to me if a problem occurs. Please let me know if this helps. -------- Steve Emmerson <address@hidden> --------Begin patch for port/master.mk.in Index: master.mk.in =================================================================== RCS file: /upc/share/CVS/udport/master.mk.in,v retrieving revision 1.30 retrieving revision 1.31 diff -c -r1.30 -r1.31 *** 1.30 1996/05/02 15:46:22 --- 1.31 1996/05/07 15:14:13 *************** *** 1,6 **** # This is the master makefile. It contains general rules. # ! # $Id: master.mk.in,v 1.30 1996/05/02 15:46:22 steve Exp $ .SUFFIXES: --- 1,6 ---- # This is the master makefile. It contains general rules. # ! # $Id: master.mk.in,v 1.31 1996/05/07 15:14:13 steve Exp $ .SUFFIXES: *************** *** 16,22 **** CPP = @CPP@ CC_MAKEDEPEND = @CC_MAKEDEPEND@ CXX = @CXX@ - INCDIR = $(prefix)/include FC = @FC@ LINT = lint LINTFLAGS = -u --- 16,21 ---- *************** *** 147,152 **** --- 146,152 ---- RANLIB = @RANLIB@ LIBDIR = $(exec_prefix)/lib LIB_A = lib$(LIBRARY).a + LIBFILE = dummy-libfile # to silence GNU make(1) library: $(LIB_A) *************** *** 251,256 **** --- 251,257 ---- # Programs: ############################################################################ BINDIR = $(exec_prefix)/bin + BINFILE = dummy-binfile programs: $(PROGRAMS) program: *************** *** 319,324 **** --- 320,328 ---- ############################################################################ # Header files: ############################################################################ + INCDIR = $(prefix)/include + HEADER = dummy-header # to silence GNU make(1) + installed_headers: FORCE @if [ -n "$(HEADERS)" ]; then \ headers="$(HEADERS)"; \ *************** *** 348,353 **** --- 352,358 ---- # `etc/' files: ############################################################################ ETCDIR = $(prefix)/etc + ETCFILE = dummy-etcfile # to silence GNU make(1) installed_etcfiles: @if [ -n "$(ETCFILES)" ]; then \ *************** *** 379,384 **** --- 384,390 ---- ############################################################################ MANDIR = $(prefix)/man CATMAN = @CATMAN@ + MANUAL = dummy-manual # to slience GNU make installed_manuals: FORCE @if [ -n "$(MANUALS)" ]; then \ *************** *** 461,467 **** ############################################################################ # Documents: ############################################################################ ! DOCDIR = $(prefix)/doc installed_documents: FORCE case "$(DOCUMENTS)" in \ --- 467,474 ---- ############################################################################ # Documents: ############################################################################ ! DOCDIR = $(prefix)/doc ! DOCUMENT = dummy-document # to silence GNU make(1) installed_documents: FORCE case "$(DOCUMENTS)" in \ *************** *** 492,497 **** --- 499,505 ---- # TeX-Info Pages: ############################################################################ INFODIR = $(prefix)/info + INFO = dummy-info # to silence GNU make(1) installed_infos: FORCE if [ -z "$(MAKEINFO)" ]; then \