let me interject. We have discovered that on some systems, strdup() get defined as a macro. I suspect that is what is happening here and the macro expands to something containing the string "__extension__". This will be fixed in the next release, but in the meantime, you may be able to fix it by editing netcdf-c/include/ncconfigure.h as follows. Change this line: extern char* strdup(const char*); to this set of lines: #ifndef strdup extern char* strdup(const char*); #endif Let us know if that solves the problem. > > Can you provide the config.log file generated when you run 'configure'? > There is no '__extension__' found in ncconfigure.h; the config.log file will > help me try to duplicate this issue. > > Thanks! > > -Ward > > > > > Dear support, > > > > I'm trying to compile netcdf-c-4.7.0, but I have a repeatable error: > > > > libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../oc2 -O3 > > -mtune=skylake -march=native -fprefetch-loop-arrays -MT > > libdispatch_la-nctime.lo > > -MD -MP -MF .deps/libdispatch_la-nctime.Tpo -c nctime.c -fPIC -DPIC -o > > .libs/libdispatch_la-nctime.o > > In file included from /usr/include/string.h:633, > > from nctime.c:23: > > ../include/ncconfigure.h:29:14: error: expected identifier or â(â before > > â__extension__â > > extern char* strdup(const char*); > > ^~~~~~ > > make[1]: *** [Makefile:1049: libdispatch_la-nctime.lo] Error 1 > > make[1]: Leaving directory '/tmp/pj/test/netcdf-c-4.7.0/libdispatch' > > make: *** [Makefile:700: check-recursive] Error 1 > > > > My compiler is gcc 8.3.1 20190311 (Red Hat 8.3.1-3) installed by yum from > > devtoolset-8 and OS Centos7. > > > > # NetCDF C Configuration Summary > > ============================== > > > > # General > > ------- > > NetCDF Version: 4.7.0 > > Configured On: Tue Jul 23 10:45:18 EEST 2019 > > Host System: x86_64-pc-linux-gnu > > Build Directory: /tmp/pj/test/netcdf-c-4.7.0 > > Install Prefix: /opt/linux2.17-x86_64/hdf5/netcdf/4.7.0 > > > > # Compiling Options > > ----------------- > > C Compiler: /opt/rh/devtoolset-8/root/usr/bin/gcc > > CFLAGS: -O3 -mtune=skylake -march=native > > -fprefetch-loop-arrays > > CPPFLAGS: > > LDFLAGS: > > AM_CFLAGS: > > AM_CPPFLAGS: > > AM_LDFLAGS: > > Shared Library: yes > > Static Library: yes > > Extra libraries: -lsz -lhdf5_hl -lhdf5 -lm -ldl -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 > > address@hidden netcdf-c-4.7.0]$ make -j 4 check install > > ... > > > > > > Best Regards, > > > > > > > > =Dennis Heimbigner Unidata Ticket Details =================== Ticket ID: SHB-551287 Department: Support netCDF Priority: Normal Status: Open =================== NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.