This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Hi Ted, I do have an idea; I will describe what I think is going on. If you provide the full config.log, I can confirm or reject my idea. Lately, when this has cropped up, it is a result of the `conftest` executable failing because of a "missing" .so, typically libnetcdf. This is often the case on modern Linux systems when libnetcdf lives outside of '/usr'. Specifically, the location of the shared library needs to live in the 'LD_LIBRARY_PATH' variable. The fix is to run configure as follows: $ LD_LIBRARY_PATH="/custom/location/lib" CPPFLAGS=<...> LDFLAGS=<...> ./configure If you provide the config.log file, I can probably figure out the exact way you would need to invoke configure. Although it may also be self-evident if you take a look yourself. If config.log doesn't reveal any symptom of a missing shared library, I will admit I'm wrong and figure out a new cause from there! I hope this helps, -Ward > > Hi, > > I got no response on this from the netcdfgroup mailing list, and I've run > into it again on a system that I really need it get it working. Somehow the > configure script (or autoconf or something else) is putting extra parentheses > around the test variable in the conftest program: it should have (sizeof > (off_t)), not (sizeof ((off_t))). The compilation then fails: > > configure:21173: mpicc -c -fPIC -I/usr/local/include > -I/home/emansell/opt/pnetcdf161/include > -I/home/emansell/local/netcdf4331mpi/include -fPIC conftest.c >&5 > conftest.c(101): error: expected an expression > if (sizeof ((off_t))) > ^ > > compilation aborted for conftest.c (code 2) > configure:21173: $? = 2 > configure: failed program was: > > Some more info from config.log is attached at the end. The netcdf-c works > fine, obviously, since I got to this step. The hdf5 (1.8.13) files are also > in /home/emansell/local/netcdf4331mpi. I have compile this successfully on > other systems, but I have no clue on this issue. > > Any ideas? > > Thanks, > > -- Ted > > __________________________________________________________ > | Edward Mansell <address@hidden> > | National Severe Storms Laboratory > |-------------------------------------------------------------- > | "The contents of this message are mine personally and > | do not reflect any position of the U.S. Government or NOAA." > |-------------------------------------------------------------- > > > Begin forwarded message: > > > From: Ted Mansell <address@hidden> > > Subject: netcdf fortran configure fail on sizeof > > Date: August 8, 2015 at 4:03:48 PM CDT > > To: "netcdfgroup (address@hidden)" <address@hidden> > > > > I'm trying to configure/compile the netcdf-fortran-4 on an AMD/Redhat Linux > > system, and 4.2, 4.4.0, 4.4.2 all are having a problem with configure. No > > problem with the netcdf-c (e.g., netcdf-c-4.3.1.1). It is failing on the > > "sizeof" tests, where an extra set of parentheses is getting put around the > > test variable (e.g., _Bool, off_t, etc.) so that the compile of conftest.c > > fails because it has > > > > if (sizeof ((_Bool))) > > > > when it should be > > > > if (sizeof (_Bool)) > > > > The netcdf-c does exactly the same test, but apparently does not add the > > extraneous parentheses. I'm using Portland Group 10.8 (it's an older AMD > > system: Linux alpha 2.6.18-398.el5 #1 SMP Tue Aug 12 06:26:17 EDT 2014 > > x86_64 x86_64 x86_64 GNU/Linux). > > > > I suppose this is some kind of autoconf issue? > > > > -- Ted > > > > __________________________________________________________ > > | Edward Mansell <address@hidden> > > | National Severe Storms Laboratory > > |-------------------------------------------------------------- > > | "The contents of this message are mine personally and > > | do not reflect any position of the U.S. Government or NOAA." > > |-------------------------------------------------------------- > > > > This file contains any messages produced by compilers while > running configure, to aid debugging if configure makes a mistake. > > It was created by netCDF-Fortran configure 4.4.0, which was > generated by GNU Autoconf 2.69. Invocation command line was > > $ ./configure --prefix=/home/emansell/local/netcdf4331mpi FC=mpif90 > F90=mpif90 CC=mpicc F77=mpif90 LDFLAGS=-L/home/emansell/opt/pnetcdf161/lib > -L/home/emansell/local/netcdf4331mpi/lib -L/usr/local/lib > CPPFLAGS=-I/home/emansell/opt/pnetcdf161/include > -I/home/emansell/local/netcdf4331mpi/include -fPIC CFLAGS=-fPIC > -I/usr/local/include FCFLAGS=-fPIC --enable-parallel-tests > > ## --------- ## > ## Platform. ## > ## --------- ## > > hostname = hrothgar.hpcc.ttu.edu > uname -m = x86_64 > uname -r = 2.6.32-431.5.1.el6.x86_64 > uname -s = Linux > uname -v = #1 SMP Wed Feb 12 00:41:43 UTC 2014 > > /usr/bin/uname -p = unknown > /bin/uname -X = unknown > > /bin/arch = x86_64 > /usr/bin/arch -k = unknown > /usr/convex/getsysinfo = unknown > /usr/bin/hostinfo = unknown > /bin/machine = unknown > /usr/bin/oslevel = unknown > /bin/universe = unknown > > PATH: /lustre/work/apps/intel/composer_xe_2013.1.117/bin/intel64 > PATH: /lustre/work/apps/intel/composer_xe_2013.1.117/mpirt/bin/intel64 > PATH: /lustre/work/apps/intel/composer_xe_2013.1.117/bin/intel64 > PATH: /lustre/work/apps/intel/composer_xe_2013.1.117/bin/intel64_mic > PATH: /lustre/work/apps/intel/composer_xe_2013.1.117/debugger/gui/intel64 > PATH: /opt/gridengine/bin/lx26-amd64 > PATH: /lustre/work/apps/openmpi/bin > PATH: /lustre/work/apps/svn/bin > PATH: /sbin > PATH: /usr/sbin > PATH: /bin > PATH: /usr/local/bin > PATH: /usr/bin > PATH: /usr/X11R6/bin > PATH: /lustre/work/apps/bin > PATH: /home/emansell/bin > > > > > Ticket Details =================== Ticket ID: JCT-681222 Department: Support netCDF Priority: Normal Status: Closed