Hello modelers, I am new here and will like to ask for help as Cygwin is a new environment for me. I understand from
viewtopic.php?f=31&t=2766
that to install netcdf one has to install C followed by Fortran. So, I tried to compile the C but am getting error when I get to point 5
version=netcdf-c-4.7.4
1 cd ${HOME}/tmp
2 tar -xvzf netcdf/${version}.tar.gz
3 cd ${version}
4 nice ./configure --prefix=/usr/local --disable-shared --enable-netcdf-4 --enable-dap
# NetCDF C Configuration Summary
==============================
# General
-------
NetCDF Version: 4.7.4
Dispatch Version: 2
Configured On: Tue Feb 2 11:23:02 GMT 2021
Host System: x86_64-pc-cygwin
Build Directory: /home/Yayra/software/netcdf-c-4.7.4
Install Prefix: /usr/local
# Compiling Options
-----------------
C Compiler: /usr/bin/gcc
CFLAGS:
CPPFLAGS:
LDFLAGS:
AM_CFLAGS:
AM_CPPFLAGS:
AM_LDFLAGS:
Shared Library: no
Static Library: yes
Extra libraries: -lhdf5_hl -lhdf5 -lm -lz -lcurl
# Features
--------
NetCDF-2 API: yes
HDF4 Support: no
HDF5 Support: yes
NetCDF-4 API: yes
NC-4 Parallel Support: no
PnetCDF Support: no
DAP2 Support: yes
DAP4 Support: yes
Byte-Range Support: no
Diskless Support: yes
MMap Support: no
JNA Support: no
CDF5 Support: yes
ERANGE Fill Support: no
Relaxed Boundary Check: yes
SZIP Support: no
SZIP Write Support: no
Parallel Filters: yes
5 nice make
$ nice make
.
.
.
.
libtool: warning: undefined symbols not allowed in x86_64-pc-cygwin shared libraries; building static only
libtool: link: (cd .libs/libnetcdf.lax/libnetcdf2.a && ar x "/home/Yayra/software/netcdf-c-4.7.4/liblib/../libdispatch/.libs/libnetcdf2.a")
libtool: link: (cd .libs/libnetcdf.lax/libdispatch.a && ar x "/home/Yayra/software/netcdf-c-4.7.4/liblib/../libdispatch/.libs/libdispatch.a")
libtool: link: (cd .libs/libnetcdf.lax/libnetcdf3.a && ar x "/home/Yayra/software/netcdf-c-4.7.4/liblib/../libsrc/.libs/libnetcdf3.a")
libtool: link: (cd .libs/libnetcdf.lax/libnchdf5.a && ar x "/home/Yayra/software/netcdf-c-4.7.4/liblib/../libhdf5/.libs/libnchdf5.a")
libtool: link: (cd .libs/libnetcdf.lax/libdap2.a && ar x "/home/Yayra/software/netcdf-c-4.7.4/liblib/../libdap2/.libs/libdap2.a")
libtool: link: (cd .libs/libnetcdf.lax/liboc.a && ar x "/home/Yayra/software/netcdf-c-4.7.4/liblib/../oc2/.libs/liboc.a")
libtool: link: (cd .libs/libnetcdf.lax/libdap4.a && ar x "/home/Yayra/software/netcdf-c-4.7.4/liblib/../libdap4/.libs/libdap4.a")
libtool: link: (cd .libs/libnetcdf.lax/libnetcdf4.a && ar x "/home/Yayra/software/netcdf-c-4.7.4/liblib/../libsrc4/.libs/libnetcdf4.a")
libtool: link: ar cru .libs/libnetcdf.a libnetcdf_la-nc_initialize.o .libs/libnetcdf.lax/libnetcdf2.a/libnetcdf2_la-dv2i.o .libs/libnetcdf.lax/libdispatch.a/libdispatch_la-crc32.o .libs/libnetcdf.lax/libdispatch.a/libdispatch_la-datt.o .libs/libnetcdf.lax/libdispatch.a/libdispatch_la-dattget.o .libs/libnetcdf.lax/libdispatch.a/libdispatch_la-dattinq.o .libs/libnetcdf.lax/libdispatch.a/libdispatch_la-dattput.o .libs/libnetcdf.lax/libdispatch.a/libdispatch_la-dauth.o .libs/libnetcdf.lax/libdispatch.a/libdispatch_la-daux.o .libs/libnetcdf.lax/libdispatch.a/libdispatch_la-dcompound.o .libs/libnetcdf.lax/libdispatch.a/libdispatch_la-dcopy.o .libs/libnetcdf.lax/libdispatch.a/libdispatch_la-ddim.o .libs/libnetcdf.lax/libdispatch.a/libdispatch_la-ddispatch.o .libs/libnetcdf.lax/libdispatch.a/libdispatch_la-denum.o .libs/libnetcdf.lax/libdispatch.a/libdispatch_la-derror.o .libs/libnetcdf.lax/libdispatch.a/libdispatch_la-dfile.o .libs/libnetcdf.lax/libdispatch.a/libdispatch_la-dfilter.o .libs/libnetcdf.lax/libdispatch.a/libdispatch_la-dgroup.o .libs/libnetcdf.lax/libdispatch.a/libdispatch_la-dinfermodel.o .libs/libnetcdf.lax/libdispatch.a/libdispatch_la-dinternal.o .libs/libnetcdf.lax/libdispatch.a/libdispatch_la-dnotnc3.o .libs/libnetcdf.lax/libdispatch.a/libdispatch_la-dnotnc4.o .libs/libnetcdf.lax/libdispatch.a/libdispatch_la-doffsets.o .libs/libnetcdf.lax/libdispatch.a/libdispatch_la-dopaque.o .libs/libnetcdf.lax/libdispatch.a/libdispatch_la-dparallel.o .libs/libnetcdf.lax/libdispatch.a/libdispatch_la-drc.o .libs/libnetcdf.lax/libdispatch.a/libdispatch_la-dreadonly.o .libs/libnetcdf.lax/libdispatch.a/libdispatch_la-dstring.o .libs/libnetcdf.lax/libdispatch.a/libdispatch_la-dtype.o .libs/libnetcdf.lax/libdispatch.a/libdispatch_la-dutf8.o .libs/libnetcdf.lax/libdispatch.a/libdispatch_la-dutil.o .libs/libnetcdf.lax/libdispatch.a/libdispatch_la-dvar.o .libs/libnetcdf.lax/libdispatch.a/libdispatch_la-dvarget.o .libs/libnetcdf.lax/libdispatch.a/libdispatch_la-dvarinq.o .libs/libnetcdf.lax/libdispatch.a/libdispatch_la-dvarput.o .libs/libnetcdf.lax/libdispatch.a/libdispatch_la-dvlen.o .libs/libnetcdf.lax/libdispatch.a/libdispatch_la-dwinpath.o .libs/libnetcdf.lax/libdispatch.a/libdispatch_la-nc.o .libs/libnetcdf.lax/libdispatch.a/libdispatch_la-ncbytes.o .libs/libnetcdf.lax/libdispatch.a/libdispatch_la-nchashmap.o .libs/libnetcdf.lax/libdispatch.a/libdispatch_la-nclist.o .libs/libnetcdf.lax/libdispatch.a/libdispatch_la-nclistmgr.o .libs/libnetcdf.lax/libdispatch.a/libdispatch_la-nclog.o .libs/libnetcdf.lax/libdispatch.a/libdispatch_la-nctime.o .libs/libnetcdf.lax/libdispatch.a/libdispatch_la-ncuri.o .libs/libnetcdf.lax/libdispatch.a/libdispatch_la-utf8proc.o .libs/libnetcdf.lax/libnetcdf3.a/libnetcdf3_la-attr.o .libs/libnetcdf.lax/libnetcdf3.a/libnetcdf3_la-dim.o .libs/libnetcdf.lax/libnetcdf3.a/libnetcdf3_la-lookup3.o .libs/libnetcdf.lax/libnetcdf3.a/libnetcdf3_la-memio.o .libs/libnetcdf.lax/libnetcdf3.a/libnetcdf3_la-nc3dispatch.o .libs/libnetcdf.lax/libnetcdf3.a/libnetcdf3_la-nc3internal.o .libs/libnetcdf.lax/libnetcdf3.a/libnetcdf3_la-ncio.o .libs/libnetcdf.lax/libnetcdf3.a/libnetcdf3_la-ncx.o .libs/libnetcdf.lax/libnetcdf3.a/libnetcdf3_la-posixio.o .libs/libnetcdf.lax/libnetcdf3.a/libnetcdf3_la-putget.o .libs/libnetcdf.lax/libnetcdf3.a/libnetcdf3_la-v1hpg.o .libs/libnetcdf.lax/libnetcdf3.a/libnetcdf3_la-var.o .libs/libnetcdf.lax/libnchdf5.a/libnchdf5_la-hdf5attr.o .libs/libnetcdf.lax/libnchdf5.a/libnchdf5_la-hdf5cache.o .libs/libnetcdf.lax/libnchdf5.a/libnchdf5_la-hdf5create.o .libs/libnetcdf.lax/libnchdf5.a/libnchdf5_la-hdf5debug.o .libs/libnetcdf.lax/libnchdf5.a/libnchdf5_la-hdf5dim.o .libs/libnetcdf.lax/libnchdf5.a/libnchdf5_la-hdf5dispatch.o .libs/libnetcdf.lax/libnchdf5.a/libnchdf5_la-hdf5file.o .libs/libnetcdf.lax/libnchdf5.a/libnchdf5_la-hdf5filter.o .libs/libnetcdf.lax/libnchdf5.a/libnchdf5_la-hdf5grp.o .libs/libnetcdf.lax/libnchdf5.a/libnchdf5_la-hdf5internal.o .libs/libnetcdf.lax/libnchdf5.a/libnchdf5_la-hdf5open.o .libs/libnetcdf.lax/libnchdf5.a/libnchdf5_la-hdf5type.o .libs/libnetcdf.lax/libnchdf5.a/libnchdf5_la-hdf5var.o .libs/libnetcdf.lax/libnchdf5.a/libnchdf5_la-nc4hdf.o .libs/libnetcdf.lax/libnchdf5.a/libnchdf5_la-nc4info.o .libs/libnetcdf.lax/libnchdf5.a/libnchdf5_la-nc4mem.o .libs/libnetcdf.lax/libnchdf5.a/libnchdf5_la-nc4memcb.o .libs/libnetcdf.lax/libdap2.a/libdap2_la-cache.o .libs/libnetcdf.lax/libdap2.a/libdap2_la-cdf.o .libs/libnetcdf.lax/libdap2.a/libdap2_la-constraints.o .libs/libnetcdf.lax/libdap2.a/libdap2_la-dapattr.o .libs/libnetcdf.lax/libdap2.a/libdap2_la-dapcvt.o .libs/libnetcdf.lax/libdap2.a/libdap2_la-dapdebug.o .libs/libnetcdf.lax/libdap2.a/libdap2_la-dapdump.o .libs/libnetcdf.lax/libdap2.a/libdap2_la-dapodom.o .libs/libnetcdf.lax/libdap2.a/libdap2_la-daputil.o .libs/libnetcdf.lax/libdap2.a/libdap2_la-dceconstraints.o .libs/libnetcdf.lax/libdap2.a/libdap2_la-dcelex.o .libs/libnetcdf.lax/libdap2.a/libdap2_la-dceparse.o .libs/libnetcdf.lax/libdap2.a/libdap2_la-dcetab.o .libs/libnetcdf.lax/libdap2.a/libdap2_la-getvara.o .libs/libnetcdf.lax/libdap2.a/libdap2_la-ncd2dispatch.o .libs/libnetcdf.lax/libdap2.a/libdap2_la-ncdaperr.o .libs/libnetcdf.lax/liboc.a/liboc_la-daplex.o .libs/libnetcdf.lax/liboc.a/liboc_la-dapparse.o .libs/libnetcdf.lax/liboc.a/liboc_la-dapy.o .libs/libnetcdf.lax/liboc.a/liboc_la-oc.o .libs/libnetcdf.lax/liboc.a/liboc_la-occompile.o .libs/libnetcdf.lax/liboc.a/liboc_la-occurlfunctions.o .libs/libnetcdf.lax/liboc.a/liboc_la-ocdata.o .libs/libnetcdf.lax/liboc.a/liboc_la-ocdebug.o .libs/libnetcdf.lax/liboc.a/liboc_la-ocdump.o .libs/libnetcdf.lax/liboc.a/liboc_la-ochttp.o .libs/libnetcdf.lax/liboc.a/liboc_la-ocinternal.o .libs/libnetcdf.lax/liboc.a/liboc_la-ocnode.o .libs/libnetcdf.lax/liboc.a/liboc_la-ocread.o .libs/libnetcdf.lax/liboc.a/liboc_la-ocutil.o .libs/libnetcdf.lax/liboc.a/liboc_la-xxdr.o .libs/libnetcdf.lax/libdap4.a/libdap4_la-d4chunk.o .libs/libnetcdf.lax/libdap4.a/libdap4_la-d4crc32.o .libs/libnetcdf.lax/libdap4.a/libdap4_la-d4curlfunctions.o .libs/libnetcdf.lax/libdap4.a/libdap4_la-d4cvt.o .libs/libnetcdf.lax/libdap4.a/libdap4_la-d4data.o .libs/libnetcdf.lax/libdap4.a/libdap4_la-d4debug.o .libs/libnetcdf.lax/libdap4.a/libdap4_la-d4dump.o .libs/libnetcdf.lax/libdap4.a/libdap4_la-d4file.o .libs/libnetcdf.lax/libdap4.a/libdap4_la-d4fix.o .libs/libnetcdf.lax/libdap4.a/libdap4_la-d4http.o .libs/libnetcdf.lax/libdap4.a/libdap4_la-d4meta.o .libs/libnetcdf.lax/libdap4.a/libdap4_la-d4odom.o .libs/libnetcdf.lax/libdap4.a/libdap4_la-d4parser.o .libs/libnetcdf.lax/libdap4.a/libdap4_la-d4printer.o .libs/libnetcdf.lax/libdap4.a/libdap4_la-d4read.o .libs/libnetcdf.lax/libdap4.a/libdap4_la-d4swap.o .libs/libnetcdf.lax/libdap4.a/libdap4_la-d4util.o .libs/libnetcdf.lax/libdap4.a/libdap4_la-d4varx.o .libs/libnetcdf.lax/libdap4.a/libdap4_la-ezxml.o .libs/libnetcdf.lax/libdap4.a/libdap4_la-ezxml_extra.o .libs/libnetcdf.lax/libdap4.a/libdap4_la-ncd4dispatch.o .libs/libnetcdf.lax/libnetcdf4.a/libnetcdf4_la-error4.o .libs/libnetcdf.lax/libnetcdf4.a/libnetcdf4_la-nc4attr.o .libs/libnetcdf.lax/libnetcdf4.a/libnetcdf4_la-nc4dim.o .libs/libnetcdf.lax/libnetcdf4.a/libnetcdf4_la-nc4dispatch.o .libs/libnetcdf.lax/libnetcdf4.a/libnetcdf4_la-nc4grp.o .libs/libnetcdf.lax/libnetcdf4.a/libnetcdf4_la-nc4internal.o .libs/libnetcdf.lax/libnetcdf4.a/libnetcdf4_la-nc4printer.o .libs/libnetcdf.lax/libnetcdf4.a/libnetcdf4_la-nc4type.o .libs/libnetcdf.lax/libnetcdf4.a/libnetcdf4_la-nc4var.o .libs/libnetcdf.lax/libnetcdf4.a/libnetcdf4_la-ncfunc.o .libs/libnetcdf.lax/libnetcdf4.a/libnetcdf4_la-ncindex.o
libtool: link: ranlib .libs/libnetcdf.a
libtool: link: rm -fr .libs/libnetcdf.lax
libtool: link: ( cd ".libs" && rm -f "libnetcdf.la" && ln -s "../libnetcdf.la" "libnetcdf.la" )
make[2]: Leaving directory '/home/Yayra/software/netcdf-c-4.7.4/liblib'
Making all in ncgen3
make[2]: Entering directory '/home/Yayra/software/netcdf-c-4.7.4/ncgen3'
depbase=`echo main.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../oc2 -MT main.o -MD -MP -MF $depbase.Tpo -c -o main.o main.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo load.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../oc2 -MT load.o -MD -MP -MF $depbase.Tpo -c -o load.o load.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo escapes.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../oc2 -MT escapes.o -MD -MP -MF $depbase.Tpo -c -o escapes.o escapes.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo getfill.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../oc2 -MT getfill.o -MD -MP -MF $depbase.Tpo -c -o getfill.o getfill.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo init.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../oc2 -MT init.o -MD -MP -MF $depbase.Tpo -c -o init.o init.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo genlib.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../oc2 -MT genlib.o -MD -MP -MF $depbase.Tpo -c -o genlib.o genlib.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo ncgentab.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../oc2 -MT ncgentab.o -MD -MP -MF $depbase.Tpo -c -o ncgentab.o ncgentab.c &&\
mv -f $depbase.Tpo $depbase.Po
/bin/sh ../libtool --tag=CC --mode=link gcc -o ncgen3.exe main.o load.o escapes.o getfill.o init.o genlib.o ncgentab.o ../liblib/libnetcdf.la -lhdf5_hl -lhdf5 -lm -lz -lcurl
libtool: link: gcc -o ncgen3.exe main.o load.o escapes.o getfill.o init.o genlib.o ncgentab.o ../liblib/.libs/libnetcdf.a -lhdf5_hl -lhdf5 -lz -lcurl
make[2]: Leaving directory '/home/Yayra/software/netcdf-c-4.7.4/ncgen3'
Making all in ncgen
make[2]: Entering directory '/home/Yayra/software/netcdf-c-4.7.4/ncgen'
depbase=`echo generate.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../oc2 -MT generate.o -MD -MP -MF $depbase.Tpo -c -o generate.o generate.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo main.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../oc2 -MT main.o -MD -MP -MF $depbase.Tpo -c -o main.o main.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo cdata.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../oc2 -MT cdata.o -MD -MP -MF $depbase.Tpo -c -o cdata.o cdata.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo bindata.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../oc2 -MT bindata.o -MD -MP -MF $depbase.Tpo -c -o bindata.o bindata.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo genchar.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../oc2 -MT genchar.o -MD -MP -MF $depbase.Tpo -c -o genchar.o genchar.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo cvt.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../oc2 -MT cvt.o -MD -MP -MF $depbase.Tpo -c -o cvt.o cvt.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo data.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../oc2 -MT data.o -MD -MP -MF $depbase.Tpo -c -o data.o data.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo debug.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../oc2 -MT debug.o -MD -MP -MF $depbase.Tpo -c -o debug.o debug.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo escapes.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../oc2 -MT escapes.o -MD -MP -MF $depbase.Tpo -c -o escapes.o escapes.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo genc.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../oc2 -MT genc.o -MD -MP -MF $depbase.Tpo -c -o genc.o genc.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo genbin.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../oc2 -MT genbin.o -MD -MP -MF $depbase.Tpo -c -o genbin.o genbin.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo generr.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../oc2 -MT generr.o -MD -MP -MF $depbase.Tpo -c -o generr.o generr.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo genlib.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../oc2 -MT genlib.o -MD -MP -MF $depbase.Tpo -c -o genlib.o genlib.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo getfill.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../oc2 -MT getfill.o -MD -MP -MF $depbase.Tpo -c -o getfill.o getfill.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo odom.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../oc2 -MT odom.o -MD -MP -MF $depbase.Tpo -c -o odom.o odom.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo semantics.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../oc2 -MT semantics.o -MD -MP -MF $depbase.Tpo -c -o semantics.o semantics.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo dump.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../oc2 -MT dump.o -MD -MP -MF $depbase.Tpo -c -o dump.o dump.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo util.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../oc2 -MT util.o -MD -MP -MF $depbase.Tpo -c -o util.o util.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo bytebuffer.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../oc2 -MT bytebuffer.o -MD -MP -MF $depbase.Tpo -c -o bytebuffer.o bytebuffer.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo list.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../oc2 -MT list.o -MD -MP -MF $depbase.Tpo -c -o list.o list.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo genf77.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../oc2 -MT genf77.o -MD -MP -MF $depbase.Tpo -c -o genf77.o genf77.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo f77data.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../oc2 -MT f77data.o -MD -MP -MF $depbase.Tpo -c -o f77data.o f77data.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo genj.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../oc2 -MT genj.o -MD -MP -MF $depbase.Tpo -c -o genj.o genj.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo jdata.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../oc2 -MT jdata.o -MD -MP -MF $depbase.Tpo -c -o jdata.o jdata.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo nc_iter.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../oc2 -MT nc_iter.o -MD -MP -MF $depbase.Tpo -c -o nc_iter.o nc_iter.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo ncgeny.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../oc2 -MT ncgeny.o -MD -MP -MF $depbase.Tpo -c -o ncgeny.o ncgeny.c &&\
mv -f $depbase.Tpo $depbase.Po
/bin/sh ../libtool --tag=CC --mode=link gcc -o ncgen.exe generate.o main.o cdata.o bindata.o genchar.o cvt.o data.o debug.o escapes.o genc.o genbin.o generr.o genlib.o getfill.o odom.o semantics.o dump.o util.o bytebuffer.o list.o genf77.o f77data.o genj.o jdata.o nc_iter.o ncgeny.o ../liblib/libnetcdf.la -lhdf5_hl -lhdf5 -lm -lz -lcurl
libtool: link: gcc -o ncgen.exe generate.o main.o cdata.o bindata.o genchar.o cvt.o data.o debug.o escapes.o genc.o genbin.o generr.o genlib.o getfill.o odom.o semantics.o dump.o util.o bytebuffer.o list.o genf77.o f77data.o genj.o jdata.o nc_iter.o ncgeny.o ../liblib/.libs/libnetcdf.a -lhdf5_hl -lhdf5 -lz -lcurl
make[2]: Leaving directory '/home/Yayra/software/netcdf-c-4.7.4/ncgen'
Making all in ncdump
make[2]: Entering directory '/home/Yayra/software/netcdf-c-4.7.4/ncdump'
Making all in cdl
make[3]: Entering directory '/home/Yayra/software/netcdf-c-4.7.4/ncdump/cdl'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/home/Yayra/software/netcdf-c-4.7.4/ncdump/cdl'
Making all in expected
make[3]: Entering directory '/home/Yayra/software/netcdf-c-4.7.4/ncdump/expected'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/home/Yayra/software/netcdf-c-4.7.4/ncdump/expected'
make[3]: Entering directory '/home/Yayra/software/netcdf-c-4.7.4/ncdump'
depbase=`echo ncdump.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../oc2 -MT ncdump.o -MD -MP -MF $depbase.Tpo -c -o ncdump.o ncdump.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo vardata.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../oc2 -MT vardata.o -MD -MP -MF $depbase.Tpo -c -o vardata.o vardata.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo dumplib.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../oc2 -MT dumplib.o -MD -MP -MF $depbase.Tpo -c -o dumplib.o dumplib.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo indent.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../oc2 -MT indent.o -MD -MP -MF $depbase.Tpo -c -o indent.o indent.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo nctime0.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../oc2 -MT nctime0.o -MD -MP -MF $depbase.Tpo -c -o nctime0.o nctime0.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo utils.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../oc2 -MT utils.o -MD -MP -MF $depbase.Tpo -c -o utils.o utils.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo nciter.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../oc2 -MT nciter.o -MD -MP -MF $depbase.Tpo -c -o nciter.o nciter.c &&\
mv -f $depbase.Tpo $depbase.Po
/bin/sh ../libtool --tag=CC --mode=link gcc -o ncdump.exe ncdump.o vardata.o dumplib.o indent.o nctime0.o utils.o nciter.o ../liblib/libnetcdf.la -lhdf5_hl -lhdf5 -lm -lz -lcurl
libtool: link: gcc -o ncdump.exe ncdump.o vardata.o dumplib.o indent.o nctime0.o utils.o nciter.o ../liblib/.libs/libnetcdf.a -lhdf5_hl -lhdf5 -lz -lcurl
depbase=`echo nccopy.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../oc2 -MT nccopy.o -MD -MP -MF $depbase.Tpo -c -o nccopy.o nccopy.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo chunkspec.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../oc2 -MT chunkspec.o -MD -MP -MF $depbase.Tpo -c -o chunkspec.o chunkspec.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo dimmap.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../oc2 -MT dimmap.o -MD -MP -MF $depbase.Tpo -c -o dimmap.o dimmap.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo list.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../oc2 -MT list.o -MD -MP -MF $depbase.Tpo -c -o list.o list.c &&\
mv -f $depbase.Tpo $depbase.Po
/bin/sh ../libtool --tag=CC --mode=link gcc -o nccopy.exe nccopy.o nciter.o chunkspec.o utils.o dimmap.o list.o ../liblib/libnetcdf.la -lhdf5_hl -lhdf5 -lm -lz -lcurl
libtool: link: gcc -o nccopy.exe nccopy.o nciter.o chunkspec.o utils.o dimmap.o list.o ../liblib/.libs/libnetcdf.a -lhdf5_hl -lhdf5 -lz -lcurl
depbase=`echo ncvalidator.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../oc2 -MT ncvalidator.o -MD -MP -MF $depbase.Tpo -c -o ncvalidator.o ncvalidator.c &&\
mv -f $depbase.Tpo $depbase.Po
/bin/sh ../libtool --tag=CC --mode=link gcc -o ncvalidator.exe ncvalidator.o ../liblib/libnetcdf.la -lhdf5_hl -lhdf5 -lm -lz -lcurl
libtool: link: gcc -o ncvalidator.exe ncvalidator.o ../liblib/.libs/libnetcdf.a -lhdf5_hl -lhdf5 -lz -lcurl
depbase=`echo nc4print.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../oc2 -MT nc4print.o -MD -MP -MF $depbase.Tpo -c -o nc4print.o nc4print.c &&\
mv -f $depbase.Tpo $depbase.Po
/bin/sh ../libtool --tag=CC --mode=link gcc -o nc4print.exe nc4print.o ../liblib/libnetcdf.la -lhdf5_hl -lhdf5 -lm -lz -lcurl
libtool: link: gcc -o nc4print.exe nc4print.o ../liblib/.libs/libnetcdf.a -lhdf5_hl -lhdf5 -lz -lcurl
depbase=`echo ocprint.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../oc2 -MT ocprint.o -MD -MP -MF $depbase.Tpo -c -o ocprint.o ocprint.c &&\
mv -f $depbase.Tpo $depbase.Po
/bin/sh ../libtool --tag=CC --mode=link gcc -o ocprint.exe ocprint.o ../liblib/libnetcdf.la -lhdf5_hl -lhdf5 -lm -lz -lcurl
libtool: link: gcc -o ocprint.exe ocprint.o ../liblib/.libs/libnetcdf.a -lhdf5_hl -lhdf5 -lz -lcurl
/usr/lib/gcc/x86_64-pc-cygwin/10/../../../../x86_64-pc-cygwin/bin/ld: ../liblib/.libs/libnetcdf.a(liboc_la-ocdebug.o):ocdebug.c:(.bss+0x0): multiple definition of `ocdebug'; ocprint.o:ocprint.c:(.bss+0x0): first defined here
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile ocprint.exe] Error 1
make[3]: Leaving directory '/home/Yayra/software/netcdf-c-4.7.4/ncdump'
make[2]: *** [Makefile all-recursive] Error 1
make[2]: Leaving directory '/home/Yayra/software/netcdf-c-4.7.4/ncdump'
make[1]: *** [Makefile:707: all-recursive] Error 1
make[1]: Leaving directory '/home/Yayra/software/netcdf-c-4.7.4'
make: *** [Makefile:552: all] Error 2
6 nice make check
7 nice make install
Compilation error for netcdf-c-4.7.4
Re: Compilation error for netcdf-c-4.7.4
As noted near the end of the topic you referenced, we recommend against compiling your own NetCDF when working in Cygwin. The Cygwin installer includes binary packages NetCDF and also includes OpenMPI if you would like to run the model in parallel.
-
- Posts: 2
- Joined: Tue Jan 12, 2021 2:05 pm
- Location: University of Energy and Natural Resources
Re: Compilation error for netcdf-c-4.7.4
the netcdf was successfully added from the cygwin installing package, But got a problem. My build.bash is rather build_roms.sh which does not contain all the information that the tutorial asked for changes,
https://www.myroms.org/wiki/ROMS_Cygwin
the location of the line
.......................................................................................
else
export NETCDF_INCDIR=/opt/gfortransoft/serial/netcdf3/include
export NETCDF_LIBDIR=/opt/gfortransoft/serial/netcdf3/lib
fi
.....................................................................................
was not captured in the build_roms.sh files
please what roms version is appropriate and how can one get old versions of roms
https://www.myroms.org/wiki/ROMS_Cygwin
the location of the line
.......................................................................................
else
export NETCDF_INCDIR=/opt/gfortransoft/serial/netcdf3/include
export NETCDF_LIBDIR=/opt/gfortransoft/serial/netcdf3/lib
fi
.....................................................................................
was not captured in the build_roms.sh files
please what roms version is appropriate and how can one get old versions of roms
- Attachments
-
- build_roms.sh
- (10.95 KiB) Downloaded 365 times
Re: Compilation error for netcdf-c-4.7.4
When you installed NetCDF, which packages did you choose? I believe if you choose "libnetcdf-fortran-devel" that should, as long as you allow the dependencies to install, get you everything you need as far as NetCDF is concerned. However, I have not tried this in many years so I could be missing something.
The section you are looking for with the NETCDF_LIBDIR has moved to a separate file for several reasons (see Trac ticket #794). That said, you don't need this section because you will want to leave "USE_MY_LIBS" off since you shouldn't need custom paths when you use Cygwin binary packages.
You will also need to set "USE_NETCDF4" to on so the build system knows to use nf-config to figure out the necessary libraries to link.
The section you are looking for with the NETCDF_LIBDIR has moved to a separate file for several reasons (see Trac ticket #794). That said, you don't need this section because you will want to leave "USE_MY_LIBS" off since you shouldn't need custom paths when you use Cygwin binary packages.
You will also need to set "USE_NETCDF4" to on so the build system knows to use nf-config to figure out the necessary libraries to link.