Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

Error when install NCO

Dear all,

Is there anyone installed the NetCDF Operator (NCO) successfully?
I tried to install NCO on my HP PC, when enter the command line "make", an error turned up, as shown bellow. Any help will be greatly appreciated. Thanks in advance !

Leo


#####################################
[root@MODEL nco-4.0.2]# CPPFLAGS='-DNEED_NC_INQ_FORMAT=0' ./configure --prefix='/usr/local/nco'
--disable-shared CFLAGS='-fPIC'
NETCDF_INC=/usr/local/netcdf/include
NETCDF_LIB=/usr/local/netcdf/lib
.........
.........
.........
*******************************************************************
Configuration complete. You are now ready to run 'make'.
Ensure 'make' points to GNU Make (AT&T Make chokes on GNU syntax).
If the build fails, please examine the file 'configure.eg'
in the top-level NCO directory. It contains examples known to
build NCO for various platforms and compilers.
*******************************************************************
[root@MODEL nco-4.0.2]# make
make all-recursive
make[1]: Entering directory `/home/jean/NCO/nco-4.0.2'
Making all in data
make[2]: Entering directory `/home/jean/NCO/nco-4.0.2/data'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/jean/NCO/nco-4.0.2/data'
Making all in src
make[2]: Entering directory `/home/jean/NCO/nco-4.0.2/src'
Making all in nco
make[3]: Entering directory `/home/jean/NCO/nco-4.0.2/src/nco'
/bin/sh ../../libtool --tag=CXX --tag=CC --mode=link gcc -std=gnu99 -fPIC -std=c99 -D_BSD_SOURCE -D_POSIX_SOURCE -L/usr/local/netcdf/lib -o ncap ncap_utl.o ncap.o ncap_yacc.o ncap_lex.o libnco.la -lgsl -lgsl -lgslcblas -lm -lm -lnetcdf
libtool: link: gcc -std=gnu99 -fPIC -std=c99 -D_BSD_SOURCE -D_POSIX_SOURCE -o ncap ncap_utl.o ncap.o ncap_yacc.o ncap_lex.o -L/usr/local/netcdf/lib ./.libs/libnco.a -lgsl -lgslcblas -lm /usr/local/netcdf/lib/libnetcdf.a
/usr/local/netcdf/lib/libnetcdf.a(nc.o): In function `nc_inq_format':
/home/mm5/netcdf-3.6.2/libsrc/nc.c:1613: multiple definition of `nc_inq_format'
./.libs/libnco.a(nco_netcdf.o):nco_netcdf.c:(.text+0xafb): first defined here
/usr/bin/ld: Warning: size of symbol `nc_inq_format' changed from 19 in ./.libs/libnco.a(nco_netcdf.o) to 58 in /usr/local/netcdf/lib/libnetcdf.a(nc.o)
collect2: ld returned 1 exit status
make[3]: *** [ncap] error 1
make[3]: Leaving directory `/home/jean/NCO/nco-4.0.2/src/nco'
make[2]: *** [all-recursive] error 1
make[2]: Leaving directory `/home/jean/NCO/nco-4.0.2/src'
make[1]: *** [all-recursive] error 1
make[1]: Leaving directory `/home/jean/NCO/nco-4.0.2'
make: *** [all] error 2
 

eaton

CSEG and Liaisons
The error seems to be related to nc_inq_format. Do you need to define NEED_NC_INQ_FORMAT=0 ? Maybe just removing that definition would work.
 
Dear NCO users:

I have installed NCO with out any error message but I am not sure if it is being installed correctly. I tried to run the NCO commands in command prompt but the commands are not recognized so I am not sure if there are some other ways to run NCO or I need to change environment settings. I am quite new to NCO and I am totally lost. I would really appreciate your help with this regard. Any documentation on NCO for beginners like me would be much appreciated. Thanks!

Cheers,
Sami
 

hannay

Cecile Hannay
AMWG Liaison
Staff member
User friendly documentation on NCO at:http://nco.sourceforge.net/
 
Top