[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[netCDF #HXN-801941]: Failure to configure NetCDF-4.2 CXX libraries
- Subject: [netCDF #HXN-801941]: Failure to configure NetCDF-4.2 CXX libraries
- Date: Sat, 07 Jul 2012 09:52:35 -0600
> Hello,
>
> I have successfully built the NetCDF 4.2 C and Fortran libraries on the Janus
> supercomputer, but I am now having difficulties configuring the CXX
> libraries. "./configure" exits with the following error: "configure: error:
> NetCDF must be built with netCDF-4 enabled." Nc-config confirms that I built
> the C libraries with --enable-netcdf4, and that they were successfully
> created. I have attached the configuration log, including the failing test:
>
> configure: failed program was:
> | /* confdefs.h */
> | #define PACKAGE_NAME "netCDF-cxx4"
> | #define PACKAGE_TARNAME "netcdf-cxx4"
> | #define PACKAGE_VERSION "4.2"
> | #define PACKAGE_STRING "netCDF-cxx4 4.2"
> | #define PACKAGE_BUGREPORT "address@hidden"
> | #define PACKAGE_URL ""
> | #define PACKAGE "netcdf-cxx4"
> | #define VERSION "4.2"
> | #define TEMP_LARGE "."
> | #define STDC_HEADERS 1
> | #define HAVE_SYS_TYPES_H 1
> | #define HAVE_SYS_STAT_H 1
> | #define HAVE_STDLIB_H 1
> | #define HAVE_STRING_H 1
> | #define HAVE_MEMORY_H 1
> | #define HAVE_STRINGS_H 1
> | #define HAVE_INTTYPES_H 1
> | #define HAVE_STDINT_H 1
> | #define HAVE_UNISTD_H 1
> | #define HAVE_DLFCN_H 1
> | #define LT_OBJDIR ".libs/"
> | #define HAVE_STDDEF_H 1
> | #define HAVE_STDLIB_H 1
> | #define HAVE_STRING_H 1
> | #define HAVE__BOOL 1
> | #define HAVE_STDBOOL_H 1
> | #define HAVE_PTRDIFF_T 1
> | #define HAVE_STDLIB_H 1
> | #define HAVE_MALLOC 1
> | #define HAVE_NETCDF_H 1
> | /* end confdefs.h. */
> | /* Define nc_use_parallel_enabled to an innocuous variant, in case
> <limits.h> declares nc_use_parallel_enabled.
> | For example, HP-UX 11i <limits.h> declares gettimeofday. */
> | #define nc_use_parallel_enabled innocuous_nc_use_parallel_enabled
> |
> | /* System header to define __stub macros and hopefully few prototypes,
> | which can conflict with char nc_use_parallel_enabled (); below.
> | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
> | <limits.h> exists even on freestanding compilers. */
> |
> | #ifdef __STDC__
> | # include <limits.h>
> | #else
> | # include <assert.h>
> | #endif
> |
> | #undef nc_use_parallel_enabled
> |
> | /* Override any GCC internal prototype to avoid an error.
> | Use char because int might match the return type of a GCC
> | builtin and then its argument prototype would still apply. */
> | #ifdef __cplusplus
> | extern "C"
> | #endif
> | char nc_use_parallel_enabled ();
> | /* The GNU C library defines this for functions which it implements
> | to always fail with ENOSYS. Some functions are actually named
> | something starting with __ and the normal name is an alias. */
> | #if defined __stub_nc_use_parallel_enabled || defined
> __stub___nc_use_parallel_enabled
> | choke me
> | #endif
> |
> | int
> | main ()
> | {
> | return nc_use_parallel_enabled ();
> | ;
> | return 0;
> | }
> configure:15731: result: no
> configure:15751: error: NetCDF must be built with netCDF-4 enabled.
It looks like the problem encountered before that is inability to find the HDF5
library on which the netCDF-4 library depends. Did you build the netCDF-4 C
library as shared or static? If static, then you need to set LDFLAGS to contain
the directories for both the netCDF-4 libary and the HDF5 libraries.
If you built the netCDF-4 C library as shared, this shouldn't be necessary, as
long as you have the location where it was installed correctly specified in the
LDFLAGS environment variable. However, you typically also need to include the
where shared libraries will be found in your LD_LIBRARY_PATH unless you have
installed them in standard places such as /usr/lib or /lib.
From the configure output you sent, I couldn't determine whether netCDF-4.2
libraries
were installed as shared or static, whether the HDF5 libraries were installed
in the
same or different directories, or whether those directories were included in
your
LD_LIBRARY_PATH, if needed.
Another question worth asking is whether you have a need for the netCDF-4 C++
library
at all? There aren't a lot of C++ applications that use netCDF, and most of
those use
the legacy netCDF-3 C++ library, rather than the new netCDF-4 C++ library,
which has
an incompatible API. We would naturally appreciate feedback on its usefulness
or bugs
encountered, but so far main use, as far as I know, has been in recording
fusion energy
experiment data ...
--Russ
Russ Rew UCAR Unidata Program
address@hidden http://www.unidata.ucar.edu
Ticket Details
===================
Ticket ID: HXN-801941
Department: Support netCDF
Priority: Normal
Status: Closed