Unidata / netcdf-c

Official GitHub repository for netCDF-C libraries and utilities.
BSD 3-Clause "New" or "Revised" License
514 stars 262 forks source link

Autoconf build fails if libcurl isn't installed, --disable-byterange is ignored #1390

Closed WardF closed 5 years ago

WardF commented 5 years ago

As a followup to esupport question RZG-350418.

When libcurl isn't present on a system, configure errors out with

checking whether byte range support is enabled... no
configure: error: curl required for byte range support. Install curl or build without --enable-byterange.

This occurs even if --disable-byterange is passed to ./configure.

DennisHeimbigner commented 5 years ago

Code in configure.ac is this:

if test "x$found_curl" = xno ; then
  AC_MSG_ERROR([curl required for byte range support. Install curl or build without --enable-byterange.])
  enable_byterange=no
fi 

Instead, it needs to looks somthing like this:

if test "x$found_curl" = xno  && test "x$enable_byterange" = xyes ; then
  AC_MSG_ERROR([curl required for byte range support. Install curl or build without --enable-byterange.])
  enable_byterange=no
fi 
farzanehtaksibi commented 3 years ago

Hi. I face the same problem, Have you find any solution?

DennisHeimbigner commented 3 years ago

Supposedly this was fixed by PR https://github.com/Unidata/netcdf-c/pull/1392.

otaolafranc commented 9 months ago

Hello, I am trying to compile maob with netcdf (https://sigma.mcs.anl.gov/moab/building-moab/) and I am getting an error in respect to this issue (see end of message). eventhought this was supposed to be fixed already, for moab I have used ./configure --enable-rel --download-netcdf=https://github.com/Unidata/netcdf-c/archive/refs/tags/v4.9.2.tar.gz which should download the last version any idea/help to solve this?

Using configure command :==> cd /home/franco/Programs/moab/sandbox/netcdf/netcdf-c-4.9.2/build && CC=gcc CXX=g++ /home/franco/Programs/moab/sandbox/netcdf/netcdf-c-4.9.2/configure --prefix=/home/franco/Programs/moab/sandbox/x86_64-pc-linux-gnu --libdir=/home/franco/Programs/moab/sandbox/x86_64-pc-linux-gnu/lib --with-pic=1 --enable-shared=no --disable-netcdf-4 LDFLAGS=" " CPPFLAGS="" LIBS=" -lopenblas -ldl -lz -lm -lm -lm" > /home/franco/Programs/moab/sandbox/netcdf/netcdf-c-4.9.2/../config_netcdf.log configure: netCDF 4.9.2 checking build system type... x86_64-pc-linux-gnu checking host system type... x86_64-pc-linux-gnu checking target system type... x86_64-pc-linux-gnu checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether the compiler supports GNU C... yes checking whether gcc accepts -g... yes checking for gcc option to enable C11 features... none needed checking whether gcc understands -c and -o together... yes checking whether compiler supports -fno-strict-aliasing... yes checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a race-free mkdir -p... /usr/bin/mkdir -p checking for gawk... no checking for mawk... mawk checking whether make sets $(MAKE)... yes checking whether make supports the include directive... yes (GNU style) checking whether make supports nested variables... yes checking dependency style of gcc... gcc3 checking whether to enable maintainer-specific portions of Makefiles... no configure: checking supported formats checking whether we should build with netcdf4 (alias for HDF5)... yes (deprecated; Please use with --disable-hdf5) checking whether we should build with netcdf-4 (alias for HDF5)... no checking whether we should build with HDF5... no checking whether CDF5 support should be disabled... auto checking whether reading of HDF4 SD files is to be enabled... no checking whether parallel I/O for classic files is to be enabled... no checking for curl_easy_setopt in -lcurl... no checking whether DAP client(s) are to be built... yes configure: WARNING: curl required for dap access. DAP support disabled. checking whether netcdf zarr storage format should be disabled... yes checking whether netcdf-4 should be forcibly enabled... yes configure: checking user options checking whether a NCIO_MINBLOCKSIZE was specified... 256 checking for valgrind... no checking if fsync support is enabled... no checking if jna bug workaround is enabled... no checking if unit tests should be enabled... yes checking do we require hdf5 dynamic-loading support... yes checking whether to fetch some sample HDF4 files from Unidata ftp site to test HDF4 reading (requires wget)... no checking whether we should attempt to install netcdf-fortran (EXPERIMENTAL)... no checking whether parallel IO tests should be run... no checking whether a user specified program to run mpi programs... mpiexec checking whether a default chunk size in bytes was specified... 4194304 checking whether a maximum per-variable cache size for HDF5 was specified... 67108864 checking whether a number of chunks for the default per-variable cache was specified... 10 checking whether a default file cache size for HDF5 was specified... 16777216 checking whether a default file cache maximum number of elements for HDF5 was specified... 4133 checking whether a default cache preemption for HDF5 was specified... 0.75 checking whether netCDF-4 logging is enabled... no checking whether nc_set_log_level() function is included (will do nothing unless enable-logging is also used)... yes checking whether CURLOPT_USERNAME is defined... no checking whether CURLOPT_PASSWORD is defined... no checking whether CURLOPT_KEYPASSWD is defined... no checking whether CURLINFO_RESPONSE_CODE is defined... no checking whether CURLOPT_BUFFERSIZE is defined... no checking whether CURLOPT_TCP_KEEPALIVE is defined... no checking whether libcurl is version 7.66 or later?... no checking whether to search for and use external libxml2... yes checking for xml2-config... xml2-config checking for xmlReadMemory in -lxml2... yes checking for library containing xmlReadMemory... -lxml2 checking whether to enable quantize functionality... yes checking whether dap use of remotetest server should be enabled... no checking whether dap use of remotetest server should be enabled... no checking whether use of external servers should be enabled... no configure: --disable-dap_remote_tests => --disable-external-server-tests checking whether dap authorization testing should be enabled (default off)... no configure: --disable-dap => --disable-dap-remote-tests --disable-auth-tests --disable-external-server-tests checking which remote test server(s) to use... remotetest.unidata.ucar.edu checking whether the time-consuming dap tests should be enabled (default off)... no configure: --disable-dap-remote|external-server-tests => --disable_dap_long_tests checking for blosc_init in -lblosc... no checking for ZSTD_compress in -lzstd... no checking whether libzstd library is available... no checking for BZ2_bzCompress in -lbz2... no checking whether libbz2 library is available... no configure: Defaulting to internal libbz2 checking for SZ_BufftoBuffCompress in -lsz... no checking whether libsz library is available... no checking for library containing zip_open... no checking whether libzip library is available... no checking whether nczarr zip support is enabled... no checking whether netcdf S3 support should be enabled... no checking whether netcdf NCZarr S3 support should be enabled... no checking whether AWS S3 SDK library is available... no configure: WARNING: No S3 library available => S3 support disabled checking whether netcdf zarr S3 testing should be enabled... no checking whether a default file cache size for NCZarr was specified... 4194304 checking whether multi-filter support is enabled... yes checking whether to enable strict null-byte header padding when reading (default off)... no checking whether FFIO will be used... no checking whether STDIO will be used... no checking whether examples should be built... yes checking whether v2 netCDF API should be built... yes checking whether the ncgen/ncdump/nccopy should be built... yes checking whether test should be built and run... yes checking whether large file (> 2GB) tests should be run... no checking whether benchmarks should be run... no checking whether extreme numbers should be used in tests... yes checking where to put large temp files if large file tests are run... . checking Extra values for _NCProperties... checking whether user-defined format 0 was specified... checking whether a magic number for user-defined format 0 was specified... checking whether user-defined format 1 was specified... checking whether a magic number for user-defined format 1 was specified... configure: finding C compiler checking for gcc... (cached) gcc checking whether the compiler supports GNU C... (cached) yes checking whether gcc accepts -g... (cached) yes checking for gcc option to enable C11 features... (cached) none needed checking whether gcc understands -c and -o together... (cached) yes checking whether the compiler supports GNU C++... yes checking whether g++ accepts -g... yes checking for g++ option to enable C++11 features... none needed checking dependency style of g++... gcc3 checking for an ANSI C-conforming const... yes configure: setting up libtool checking how to print strings... printf checking for a sed that does not truncate output... /usr/bin/sed checking for grep that handles long lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -E checking for fgrep... /usr/bin/grep -F checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B checking the name lister (/usr/bin/nm -B) interface... BSD nm checking whether ln -s works... yes checking the maximum length of command line arguments... 1572864 checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop checking for /usr/bin/ld option to reload object files... -r checking for file... file checking for objdump... objdump checking how to recognize dependent libraries... pass_all checking for dlltool... no checking how to associate runtime and link libraries... printf %s\n checking for ar... ar checking for archiver @FILE support... @ checking for strip... strip checking for ranlib... ranlib checking command to parse /usr/bin/nm -B output from gcc object... ok checking for sysroot... no checking for a working dd... /usr/bin/dd checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1 checking for mt... mt checking if mt is a manifest tool... no checking for dlfcn.h... yes checking for objdir... .libs checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC -DPIC checking if gcc PIC flag -fPIC -DPIC works... yes checking if gcc static flag -static works... yes checking if gcc supports -c -o file.o... yes checking if gcc supports -c -o file.o... (cached) yes checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes checking dynamic linker characteristics... GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... no checking whether to build static libraries... yes checking how to run the C++ preprocessor... g++ -E checking for ld used by g++... /usr/bin/ld -m elf_x86_64 checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC -DPIC checking if g++ PIC flag -fPIC -DPIC works... yes checking if g++ static flag -static works... yes checking if g++ supports -c -o file.o... yes checking if g++ supports -c -o file.o... (cached) yes checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes checking dynamic linker characteristics... (cached) GNU/Linux ld.so checking how to hardcode library paths into programs... immediate configure: finding other utilities checking for m4... m4 checking for dot... dot checking for special C compiler options needed for large files... no checking for _FILE_OFFSET_BITS value needed for large files... no configure: displaying some results checking CPPFLAGS... checking CC CFLAGS... gcc -fno-strict-aliasing checking type gcc... gcc is /usr/bin/gcc checking CXX... g++ checking CXXFLAGS... -g -O2 checking type g++... g++ is /usr/bin/g++ checking FC... unset checking F90... unset checking AR... ar checking AR_FLAGS... cr checking type ar... ar is /usr/bin/ar checking NM... /usr/bin/nm -B checking NMFLAGS... configure: checking types, headers, and functions checking for sys/param.h... yes checking for libgen.h... yes checking for egrep... (cached) /usr/bin/grep -E checking for locale.h... yes checking for stdio.h... yes checking for stdarg.h... yes checking for fcntl.h... yes checking for malloc.h... yes checking for stdlib.h... yes checking for string.h... yes checking for strings.h... yes checking for unistd.h... yes checking for sys/stat.h... yes checking for getopt.h... yes checking for sys/time.h... yes checking for sys/types.h... yes checking for time.h... yes checking for dirent.h... yes checking for stdint.h... yes checking for ctype.h... yes checking for sys/resource.h... yes checking for ftw.h... yes checking for execinfo.h... yes checking for strlcat... no checking for snprintf... yes checking for strcasecmp... yes checking for fileno... yes checking for strdup... yes checking for strtoll... yes checking for strtoull... yes checking for mkstemp... yes checking for mktemp... yes checking for random... yes checking for getrlimit... yes checking for gettimeofday... yes checking for fsync... yes checking for MPI_Comm_f2c... no checking for MPI_Info_f2c... no checking for strncasecmp... yes checking for clock_gettime... yes checking for struct timespec... yes configure: WARNING: netcdf-4 not enabled; disabling DAP4 checking for memmove... yes checking for getpagesize... yes checking for sysconf... yes checking whether mmap is enabled for in-memory files... no checking for mmap... yes checking for mremap... yes checking whether MAP_ANONYMOUS is defined... yes configure: mmap functionality is not available: disabling mmap checking whether byte range support is enabled... yes configure: error: curl required for byte range support. Install curl or build without --enable-byterange.

WardF commented 9 months ago

@otaolafranc I'm unfamiliar with moab, but it appears that DAP is enabled, and thus byte-range is enabled, but the dependency libcurl is not installed. You'll need to modify the configure command being issued to netCDF-C so that DAP is disabled altogether, or perhaps just pass --disable-byterange.

WardF commented 9 months ago

You could also install libcurl-dev, or whatever the appropriate package for your platform is, to provide the development headers and library for libcurl.

otaolafranc commented 9 months ago

You could also install libcurl-dev, or whatever the appropriate package for your platform is, to provide the development headers and library for libcurl.

looks like sudo aptitude install libcurl4-openssl-dev did the job (at least it looks like. thanks!)