Skip to content

Issue building ocprint with GCC 10.1...maybe? #1725

@mathomp4

Description

@mathomp4

Prelims

  • the version of the software with which you are encountering an issue
    • netCDF-C 4.7.4
  • environmental information (i.e. Operating System, compiler info, java version, python version, etc.)
    • macOS 10.15.4
    • GCC 9.3.0 and 10.1.0
    • Open MPI 4.0.3
  • a description of the issue with the steps needed to reproduce it
    • see below

The Issue

This is an odd one, mainly because this might be the second or third time ocprint and I have had issues. To wit, I recently built GCC 10.1.0 and am trying to build netCDF-c with it. Now, I have also built (and usually use) GCC 9.3.0 and with it, I can build netCDF-C just fine and ocprint seems to build. I don't know what it does, but it builds.

In each case, I am compiling using Open MPI wrappers as CC, CXX, and FC as I built HDF5 with parallel support. Each compiler is using Open MPI 4.0.3.

In each case, netcdf were configured within a framework as, essentially:

  $ ./configure --prefix=/Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin --includedir=/Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/include/netcdf --enable-hdf4 --disable-dap --enable-parallel-tests --disable-shared --disable-examples --enable-netcdf-4 CC=mpicc FC=mpifort CXX=mpic++ F77=mpifort

This is actually a lot of FC=$(FC) and --prefix=$(prefix), etc. in my overarching Base Library framework make system, but the configure line for each is nigh-identical save for the changes in prefix/includedir.

I've never seen this error with GCC 9.3.0 (though I'm not saying I can't), but I occasionally see it with GCC 10.1.0...and it seems weirdly non-deterministic.

First, with GCC 9.3.0. I search the log for nc4print.o and get to:

depbase=`echo nc4print.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
mpicc -DHAVE_CONFIG_H -I. -I..  -I../include -I../oc2 -I/Users/mathomp4/installed/MPI/gcc-gfortran-9.3.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/include/    -I/Users/mathomp4/installed/MPI/gcc-gfortran-9.3.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/include/zlib    -I/Users/mathomp4/installed/MPI/gcc-gfortran-9.3.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/include/szlib    -I/Users/mathomp4/installed/MPI/gcc-gfortran-9.3.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/include/jpeg    -I/Users/mathomp4/installed/MPI/gcc-gfortran-9.3.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/include/hdf5    -I/Users/mathomp4/installed/MPI/gcc-gfortran-9.3.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/include/hdf    -I/Users/mathomp4/installed/MPI/gcc-gfortran-9.3.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/include/netcdf    -I/Users/mathomp4/installed/MPI/gcc-gfortran-9.3.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/include/udunits2    -I/Users/mathomp4/installed/MPI/gcc-gfortran-9.3.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/include/gsl    -I/Users/mathomp4/installed/MPI/gcc-gfortran-9.3.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/include/antlr     -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 mpicc     -o nc4print nc4print.o ../liblib/libnetcdf.la -ljpeg -lmfhdf -ldf -ljpeg -lhdf5_hl -lhdf5 -lm -L/Users/mathomp4/installed/MPI/gcc-gfortran-9.3.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/lib -lmfhdf -ldf -lsz -ljpeg  -L/Users/mathomp4/installed/MPI/gcc-gfortran-9.3.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/lib -lcurl -lz -lm        -ldl -lm
libtool: link: mpicc -o nc4print nc4print.o  ../liblib/.libs/libnetcdf.a -L/Users/mathomp4/installed/MPI/gcc-gfortran-9.3.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/lib /Users/mathomp4/installed/MPI/gcc-gfortran-9.3.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/lib/libhdf5_hl.a /Users/mathomp4/installed/MPI/gcc-gfortran-9.3.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/lib/libhdf5.a /Users/mathomp4/installed/MPI/gcc-gfortran-9.3.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/lib/libmfhdf.a /Users/mathomp4/installed/MPI/gcc-gfortran-9.3.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/lib/libdf.a /Users/mathomp4/installed/MPI/gcc-gfortran-9.3.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/lib/libsz.a /Users/mathomp4/installed/MPI/gcc-gfortran-9.3.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/lib/libjpeg.a /Users/mathomp4/installed/MPI/gcc-gfortran-9.3.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/lib/libcurl.a -lz -ldl -lm
depbase=`echo ocprint.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
mpicc -DHAVE_CONFIG_H -I. -I..  -I../include -I../oc2 -I/Users/mathomp4/installed/MPI/gcc-gfortran-9.3.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/include/    -I/Users/mathomp4/installed/MPI/gcc-gfortran-9.3.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/include/zlib    -I/Users/mathomp4/installed/MPI/gcc-gfortran-9.3.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/include/szlib    -I/Users/mathomp4/installed/MPI/gcc-gfortran-9.3.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/include/jpeg    -I/Users/mathomp4/installed/MPI/gcc-gfortran-9.3.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/include/hdf5    -I/Users/mathomp4/installed/MPI/gcc-gfortran-9.3.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/include/hdf    -I/Users/mathomp4/installed/MPI/gcc-gfortran-9.3.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/include/netcdf    -I/Users/mathomp4/installed/MPI/gcc-gfortran-9.3.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/include/udunits2    -I/Users/mathomp4/installed/MPI/gcc-gfortran-9.3.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/include/gsl    -I/Users/mathomp4/installed/MPI/gcc-gfortran-9.3.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/include/antlr     -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 mpicc     -o ocprint ocprint.o ../liblib/libnetcdf.la -ljpeg -lmfhdf -ldf -ljpeg -lhdf5_hl -lhdf5 -lm -L/Users/mathomp4/installed/MPI/gcc-gfortran-9.3.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/lib -lmfhdf -ldf -lsz -ljpeg  -L/Users/mathomp4/installed/MPI/gcc-gfortran-9.3.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/lib -lcurl -lz -lm  -ldl -lm
libtool: link: mpicc -o ocprint ocprint.o  ../liblib/.libs/libnetcdf.a -L/Users/mathomp4/installed/MPI/gcc-gfortran-9.3.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/lib /Users/mathomp4/installed/MPI/gcc-gfortran-9.3.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/lib/libhdf5_hl.a /Users/mathomp4/installed/MPI/gcc-gfortran-9.3.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/lib/libhdf5.a /Users/mathomp4/installed/MPI/gcc-gfortran-9.3.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/lib/libmfhdf.a /Users/mathomp4/installed/MPI/gcc-gfortran-9.3.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/lib/libdf.a /Users/mathomp4/installed/MPI/gcc-gfortran-9.3.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/lib/libsz.a /Users/mathomp4/installed/MPI/gcc-gfortran-9.3.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/lib/libjpeg.a /Users/mathomp4/installed/MPI/gcc-gfortran-9.3.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/lib/libcurl.a -lz -ldl -lm
make[5]: Entering directory '/Users/mathomp4/Baselibs/ESMA-Baselibs-6.0.12-Snap13/src/netcdf/ncdump'
 /Users/mathomp4/.homebrew/brew/bin/gmkdir -p '/Users/mathomp4/installed/MPI/gcc-gfortran-9.3.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/bin'
  /bin/sh ../libtool   --mode=install /Users/mathomp4/.homebrew/brew/bin/ginstall -c ncdump nccopy '/Users/mathomp4/installed/MPI/gcc-gfortran-9.3.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/bin'
libtool: install: /Users/mathomp4/.homebrew/brew/bin/ginstall -c ncdump /Users/mathomp4/installed/MPI/gcc-gfortran-9.3.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/bin/ncdump
libtool: install: /Users/mathomp4/.homebrew/brew/bin/ginstall -c nccopy /Users/mathomp4/installed/MPI/gcc-gfortran-9.3.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/bin/nccopy
 /Users/mathomp4/.homebrew/brew/bin/gmkdir -p '/Users/mathomp4/installed/MPI/gcc-gfortran-9.3.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/share/man/man1'
 /Users/mathomp4/.homebrew/brew/bin/ginstall -c -m 644 ncdump.1 nccopy.1 '/Users/mathomp4/installed/MPI/gcc-gfortran-9.3.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/share/man/man1'
make[5]: Leaving directory '/Users/mathomp4/Baselibs/ESMA-Baselibs-6.0.12-Snap13/src/netcdf/ncdump'
make[4]: Leaving directory '/Users/mathomp4/Baselibs/ESMA-Baselibs-6.0.12-Snap13/src/netcdf/ncdump'
make[3]: Leaving directory '/Users/mathomp4/Baselibs/ESMA-Baselibs-6.0.12-Snap13/src/netcdf/ncdump'
Making install in unit_test

You can see we build nc4print then ocprint and then eventually install ncdump and nccopy.

Now, sometimes with netCDF-C, using GCC 10.1, I get:

depbase=`echo nc4print.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
mpicc -DHAVE_CONFIG_H -I. -I..  -I../include  -I/Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/include/    -I/Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/include/zlib    -I/Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/include/szlib    -I/Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/include/jpeg    -I/Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/include/hdf5    -I/Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/include/hdf    -I/Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/include/netcdf    -I/Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/include/udunits2    -I/Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/include/gsl    -I/Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/include/antlr     -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 mpicc     -o nc4print nc4print.o ../liblib/libnetcdf.la -ljpeg -lmfhdf -ldf -ljpeg -lhdf5_hl -lhdf5 -lm -lz -L/Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/lib -lmfhdf -ldf -lsz -ljpeg   -ldl -lm
libtool: link: mpicc -o nc4print nc4print.o  ../liblib/.libs/libnetcdf.a -L/Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/lib /Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/lib/libhdf5_hl.a /Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/lib/libhdf5.a /Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/lib/libmfhdf.a /Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/lib/libdf.a -lz /Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/lib/libsz.a /Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/lib/libjpeg.a -ldl -lm
make[5]: Entering directory '/Users/mathomp4/Baselibs/ESMA-Baselibs-6.0.12-Snap13/src/netcdf/ncdump'
 /Users/mathomp4/.homebrew/brew/bin/gmkdir -p '/Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/bin'
  /bin/sh ../libtool   --mode=install /Users/mathomp4/.homebrew/brew/bin/ginstall -c ncdump nccopy '/Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/bin'
libtool: install: /Users/mathomp4/.homebrew/brew/bin/ginstall -c ncdump /Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/bin/ncdump
libtool: install: /Users/mathomp4/.homebrew/brew/bin/ginstall -c nccopy /Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/bin/nccopy
 /Users/mathomp4/.homebrew/brew/bin/gmkdir -p '/Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/share/man/man1'
 /Users/mathomp4/.homebrew/brew/bin/ginstall -c -m 644 ncdump.1 nccopy.1 '/Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/share/man/man1'
make[5]: Leaving directory '/Users/mathomp4/Baselibs/ESMA-Baselibs-6.0.12-Snap13/src/netcdf/ncdump'
make[4]: Leaving directory '/Users/mathomp4/Baselibs/ESMA-Baselibs-6.0.12-Snap13/src/netcdf/ncdump'
make[3]: Leaving directory '/Users/mathomp4/Baselibs/ESMA-Baselibs-6.0.12-Snap13/src/netcdf/ncdump'
Making install in unit_test

Once again we make nc4print and then...skip over ocprint and go right to installing ncdump and nccopy! Thus, we avoid my possible issue. I've had this happen both with a netcdf where I've done make clean && make distclean and when I've done a complete new clone/checkout of netcdf (or my full base libraries).

But, other times, I compile with GCC 10.1 and I get:

depbase=`echo nc4print.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
mpicc -DHAVE_CONFIG_H -I. -I..  -I../include -I../oc2 -I/Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/include/    -I/Users/mathomp4/installed/
MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/include/zlib    -I/Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/include/sz
lib    -I/Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/include/jpeg    -I/Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Basel
ibs/6.0.12-Snap13/Darwin/include/hdf5    -I/Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/include/hdf    -I/Users/mathomp4/installed/MPI/gcc-gf
ortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/include/netcdf    -I/Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/include/udunits2
  -I/Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/include/gsl    -I/Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.
0.12-Snap13/Darwin/include/antlr     -MT nc4print.o -MD -MP -MF $depbase.Tpo -c -o nc4print.o nc4print.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo ocprint.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
mpicc -DHAVE_CONFIG_H -I. -I..  -I../include -I../oc2 -I/Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/include/    -I/Users/mathomp4/installed/
MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/include/zlib    -I/Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/include/sz
lib    -I/Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/include/jpeg    -I/Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Basel
ibs/6.0.12-Snap13/Darwin/include/hdf5    -I/Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/include/hdf    -I/Users/mathomp4/installed/MPI/gcc-gf
ortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/include/netcdf    -I/Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/include/udunits2
  -I/Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/include/gsl    -I/Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/include/antlr     -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 mpicc     -o ncdump ncdump.o vardata.o dumplib.o indent.o nctime0.o utils.o nciter.o ../liblib/libnetcdf.la -ljpeg -lmfhdf -ldf -ljpeg -lhdf5_hl -lhdf5 -lm -L/Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/lib -lmfhdf -ldf -lsz -ljpeg  -L/Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/lib -lcurl -lz -lm  -ldl -lm
/bin/sh ../libtool  --tag=CC   --mode=link mpicc     -o nccopy nccopy.o nciter.o chunkspec.o utils.o dimmap.o list.o ../liblib/libnetcdf.la -ljpeg -lmfhdf -ldf -ljpeg -lhdf5_hl -lhdf5 -lm -L/Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/lib -lmfhdf -ldf -lsz -ljpeg  -L/Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/lib -lcurl -lz -lm     -ldl -lm
/bin/sh ../libtool  --tag=CC   --mode=link mpicc     -o ncvalidator ncvalidator.o ../liblib/libnetcdf.la -ljpeg -lmfhdf -ldf -ljpeg -lhdf5_hl -lhdf5 -lm -L/Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/lib -lmfhdf -ldf -lsz -ljpeg  -L/Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/lib -lcurl -lz -lm        -ldl -lm
libtool: link: mpicc -o ncdump ncdump.o vardata.o dumplib.o indent.o nctime0.o utils.o nciter.o  ../liblib/.libs/libnetcdf.a -L/Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/lib /Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/lib/libhdf5_hl.a /Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/lib/libhdf5.a /Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/lib/libmfhdf.a /Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/lib/libdf.a /Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/lib/libsz.a /Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/lib/libjpeg.a /Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/lib/libcurl.a -lz -ldl -lm
libtool: link: mpicc -o nccopy nccopy.o nciter.o chunkspec.o utils.o dimmap.o list.o  ../liblib/.libs/libnetcdf.a -L/Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/lib /Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/lib/libhdf5_hl.a /Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/lib/libhdf5.a /Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/lib/libmfhdf.a /Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/lib/libdf.a /Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/lib/libsz.a /Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/lib/libjpeg.a /Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/lib/libcurl.a -lz -ldl -lm
libtool: link: mpicc -o ncvalidator ncvalidator.o  ../liblib/.libs/libnetcdf.a -L/Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/lib /Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/lib/libhdf5_hl.a /Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/lib/libhdf5.a /Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/lib/libmfhdf.a /Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/lib/libdf.a /Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/lib/libsz.a /Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/lib/libjpeg.a /Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/lib/libcurl.a -lz -ldl -lm
/bin/sh ../libtool  --tag=CC   --mode=link mpicc     -o nc4print nc4print.o ../liblib/libnetcdf.la -ljpeg -lmfhdf -ldf -ljpeg -lhdf5_hl -lhdf5 -lm -L/Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/lib -lmfhdf -ldf -lsz -ljpeg  -L/Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/lib -lcurl -lz -lm      -ldl -lm
/bin/sh ../libtool  --tag=CC   --mode=link mpicc     -o ocprint ocprint.o ../liblib/libnetcdf.la -ljpeg -lmfhdf -ldf -ljpeg -lhdf5_hl -lhdf5 -lm -L/Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/lib -lmfhdf -ldf -lsz -ljpeg  -L/Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/lib -lcurl -lz -lm        -ldl -lm
libtool: link: mpicc -o nc4print nc4print.o  ../liblib/.libs/libnetcdf.a -L/Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/lib /Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/lib/libhdf5_hl.a /Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/lib/libhdf5.a /Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/lib/libmfhdf.a /Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/lib/libdf.a /Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/lib/libsz.a /Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/lib/libjpeg.a /Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/lib/libcurl.a -lz -ldl -lm
libtool: link: mpicc -o ocprint ocprint.o  ../liblib/.libs/libnetcdf.a -L/Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/lib /Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/lib/libhdf5_hl.a /Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/lib/libhdf5.a /Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/lib/libmfhdf.a /Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/lib/libdf.a /Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/lib/libsz.a /Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/lib/libjpeg.a /Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin/lib/libcurl.a -lz -ldl -lm
duplicate symbol '_ocdebug' in:
    ocprint.o
    ../liblib/.libs/libnetcdf.a(liboc_la-ocdebug.o)
ld: 1 duplicate symbol for architecture x86_64
collect2: error: ld returned 1 exit status
make[4]: *** [Makefile:1106: ocprint] Error 1
make[4]: *** Waiting for unfinished jobs....
make[4]: Leaving directory '/Users/mathomp4/Baselibs/ESMA-Baselibs-6.0.12-Snap13/src/netcdf/ncdump'
make[3]: *** [Makefile:1332: install-recursive] Error 1
make[3]: Leaving directory '/Users/mathomp4/Baselibs/ESMA-Baselibs-6.0.12-Snap13/src/netcdf/ncdump'
make[2]: *** [Makefile:707: install-recursive] Error 1

I am so confused. Perhaps make distclean is not enough to clean netCDF-C? Why do I sometimes get ocprint building and other times I don't?

I also thought this is perhaps a race condition as I usually build make -j3 or make -j8. But, I hacked my build scripts to force make -j1 install when building netcdf, so it should be serial.

Are there any thoughts on what I might be doing wrong? As I said before, I did have ocprint issues on macOS before, but 4.6.2 solved it for me and I've never had issues since.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions