Netcdf-3.6.3 issue when compiling in folder "cxx"

Dear all,
I was installing netcdf-3.6.3. When I executed “make” in folder netcdf-3.6.3, there were errors.

Making all in cxx
make[2]: Entering directory `/disk2/public/usr_local/LIBRARIES/netcdf-3.6.3/cxx'
depbase=`echo netcdf.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
/bin/sh ../libtool --tag=CXX   --mode=compile icpc -DHAVE_CONFIG_H -I. -I.. -I../fortran      -I../libsrc   -g -O2 -MT netcdf.lo -MD -MP -MF $depbase.Tpo -c -o netcdf.lo netcdf.cpp &&\
mv -f $depbase.Tpo $depbase.Plo
libtool: compile:  icpc -DHAVE_CONFIG_H -I. -I.. -I../fortran -I../libsrc -g -O2 -MT netcdf.lo -MD -MP -MF .deps/netcdf.Tpo -c netcdf.cpp -o netcdf.o
/usr/include/c++/4.8.5/ext/atomicity.h(49): error: identifier "__ATOMIC_ACQ_REL" is undefined
    { return __atomic_fetch_add(__mem, __val, __ATOMIC_ACQ_REL); }

/usr/include/c++/4.8.5/ext/atomicity.h(49): error: identifier "__atomic_fetch_add" is undefined
    { return __atomic_fetch_add(__mem, __val, __ATOMIC_ACQ_REL); }

/usr/include/c++/4.8.5/ext/atomicity.h(53): error: identifier "__ATOMIC_ACQ_REL" is undefined
    { __atomic_fetch_add(__mem, __val, __ATOMIC_ACQ_REL); }

/usr/include/c++/4.8.5/ext/atomicity.h(53): error: identifier "__atomic_fetch_add" is undefined
    { __atomic_fetch_add(__mem, __val, __ATOMIC_ACQ_REL); }

compilation aborted for netcdf.cpp (code 2)
make[2]: *** [netcdf.lo] Error 1
make[2]: Leaving directory `/disk2/public/usr_local/LIBRARIES/netcdf-3.6.3/cxx'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/disk2/public/usr_local/LIBRARIES/netcdf-3.6.3'
make: *** [all] Error 2

other information:

  1. Linux 3.10.0-1062.el7.x86_64 #1 SMP x86_64 x86_64 x86_64 GNU/Linux
  2. I have successfully installed zlib-1.2.3, hdf5-1.10.4, jasper-1.701.0 and libpng-1.2.12 in folder netcdf.
  3. compilation process: see “m.log”
  4. the compiler is intel-11.1.072 (icc and ifort)
  5. the global variables are:
# Intel Compiler 11.1
source /opt/intel/Compiler/11.1/072/bin/intel64/ intel64
source /opt/intel/Compiler/11.1/072/bin/intel64/ intel64
export LD_LIBRARY_PATH=/opt/intel/Compiler/11.1/072/lib/intel64/:$LD_LIBRARY_PATH

#module load
export CC=icc
export CXX=icpc
export FC=ifort
export CFLAGS=-m64
export F77=ifort
export FFLAGS=-m64
export F90=ifort

I would appreciate it if you would take the time out of your busy schedule to check out my posts and give suggestions.
Best regards,
m.log.txt (21.9 KB)

Now it is solved.