Comments (13)
The netcdf cxx is a wrapper around the netcdf-c library. So, you need to build
and install netcdf-c library first.
from netcdf-cxx4.
Thanks for your reply.
The cluster already have netcdf-c, so I did include it when configuring (B)-(6). Besides, I've also installed netcdf-c-4.7.0 locally and include it when configuring (C)-(2).
Is that what you mentioned?
from netcdf-cxx4.
Not quite. Looking at the config log, it does not look like you have -lnetcdf
set.
The other question is: when you built netcdf-c library did you by any chance
disable netcdf-4 support?
from netcdf-cxx4.
Hi,
I guess the problem was failure to linking the ./configure
to the library of netcdf-c, as you mentioned. But I couldn't figure it out by myself. Specifically, when the configuring process needed to access the /lib
directory, it somehow entered the /include
directory, thus couldn't find what it needed.
Like this:
configure:16997: checking for library containing nc_create
configure:17028: gcc -o conftest -g -O2 -I/oasis/tscc/scratch/fchang/netcdf4/netcdf-c-4.7.0/install/include conftest.c >&5
/tmp/cc0x1f2b.o: In function "main":
/oasis/tscc/scratch/fchang/netcdf4/netcdf-cxx4-4.3.0/conftest.c:44: undefined reference to "nc_create"
Could you give me some instruction on how to set the path of library? (I guess that's the -lnetcdf
you mentioned) Thank you!
### Steps I took
I put the entire process of how I built it in the following. You can skip A, B, C and D.
A. Load Module
(A1) module unload intel
(A2) module load gnu openmpi_ib
B. Build zlib
(B1) cd /oasis/tscc/scratch/fchang/zlib/
(B2) wget https://www.zlib.net/zlib-1.2.11.tar.gz
(B3) tar -xzvf zlib-1.2.11.tar.gz
(B4) cd zlib-1.2.11
(B5) mkdir install
(B6) ./configure --prefix=/oasis/tscc/scratch/fchang/zlib/zlib-1.2.11/
(B7) make check
(B8) make install
C. Build hdf5
(C1) cd /oasis/tscc/scratch/fchang/hdf5
(C2) wget https://support.hdfgroup.org/ftp/HDF5/current/src/hdf5-1.10.5.tar.gz
(C3) tar -xzvf hdf5-1.10.5.tar.gz
(C4) cd hdf5-1.10.5
(C5) mkdir install
(C6) ./configure --prefix=/oasis/tscc/scratch/fchang/hdf5/hdf5-1.10.5/install
(C7) make check
(C8) make install
D. Build Netcdf-c
(D1) cd /oasis/tscc/scratch/fchang/netcdf4
(D2) wget ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-c-4.7.0.tar.gz
(D3) tar -xzvf netcdf-c-4.7.0.tar.gz
(D4) cd netcdf-c-4.7.0
(D5) mkdir install
(D6) ./configure --prefix="/oasis/tscc/scratch/fchang/netcdf4/netcdf-c-4.7.0/install" CPPFLAGS="-I/oasis/tscc/scratch/fchang/hdf5/hdf5-1.10.5/install/include -I/oasis/tscc/scratch/fchang/zlib/zlib-1.2.11/install/include" LDFLAGS="-L/oasis/tscc/scratch/fchang/hdf5/hdf5-1.10.5/install/lib -L/oasis/tscc/scratch/fchang/zlib/zlib-1.2.11/install/lib"
(D7) make check
(D8) make install
E. Build Netcdf-cxx
(E1) cd /oasis/tscc/scratch/fchang/netcdf4
(E2) wget ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-cxx4-4.3.0.tar.gz
(E3) tar -xzvf netcdf-cxx4-4.3.0.tar.gz
(E4) cd netcdf-cxx4-4.3.0
(E5) mkdir install
(E6) ./configure -prefix=/oasis/tscc/scratch/fchang/netcdf4/netcdf-cxx4-4.3.0/install CPPFLAGS=-I/oasis/tscc/scratch/fchang/netcdf4/netcdf-c-4.7.0/install/include LDFLAGs=-L/oasis/tscc/scratch/fchang/netcdf4/netcdf-c-4.7.0/install/lib LD_LIBRARY_PATH=/opt/gnu/gcc/lib64:/opt/gnu/gmp/lib:/opt/gnu/mpfr/lib:/opt/gnu/mpc/lib:LD_LIBRARY_PATH:/oasis/tscc/scratch/fchang/netcdf4/netcdf-c-4.7.0/install/lib
### Error message and config.log
Configure Failure.zip
from netcdf-cxx4.
Did you get any solution for this? I have the same issue, same steps I did and still getting the error NetCDF must be built with netCDF-4 enabled.
from netcdf-cxx4.
Hi,
Sorry I haven't quite figured out this problem yet. I switched my focus to other things afterwards.
But I guess you can try adding this option in the command when configuring netcdf-c:
--enable-netcdf-4
Not sure if it helps though.
from netcdf-cxx4.
Hi,
I tried with all possible flags but to no avail. Thanks for fast response.
from netcdf-cxx4.
Has it been solved? I also have this problem. and I have successfully installed netcdf-c-4.7.4.
here is some log:
checking whether filter testing should be run... yes
checking netCDF v2 API present... yes
checking netCDF-4 present... no
checking netCDF has logging... no
checking netCDF has dap... no
checking netCDF has pnetcdf... no
checking netCDF has filter support... yes
configure: error: NetCDF must be built with netCDF-4 enabled
from netcdf-cxx4.
Let me take another look at this. The config.log indicates that it is using nc_use_parallel_enabled, for some reason to indicate nc4 functionality. I'll get a fix for this, once I confirm that's what is going on. What happens if you use cmake to try to configure? Assuming you have cmake available?
from netcdf-cxx4.
@syaoo can you provide the config.log file generated?
from netcdf-cxx4.
@syaoo can you provide the config.log file generated?
I've tried to replicate the problem, but I'm not sure it's the same cause as before. Here is config.log file:
netcdf-cxx-config.log
I remember solving it before, but I'm not sure what was done. Now it works when you give the correct path to the NetCDF library:
./configure -prefix=/home/test/dir1/local/netcdf-cxx CPPFLAGS="-I/home/test/dir1/local/netcdf/include -I/home/test/dir1/local/hdf5/include -I/home/test/dir1/local/zlib/include" LDFLAGS="-L/home/test/dir1/local/netcdf/lib -L/home/test/dir1/local/hdf5/lib -L/home/test/dir1/local/zlib/lib"
If the path is not given or the path is wrong, this problem occurs, like this:
./configure -prefix=/home/test/dir1/local/netcdf-cxx CPPFLAGS="-I/home/test/dir1/local/netcdf/include -I/home/test/dir1/local/hdf5/include -I/home/test/dir1/local/zlib/include" LDFLAGS="-L/home/test/dir1/local/hdf5/lib -L/home/test/dir1/local/zlib/lib"
from netcdf-cxx4.
I was helping a user install software for which NetCDF-CXX was a dependency, and she experienced this same problem. She was able to get NetCDF-CXX to configure and then build by adding " LIBS="-L${LIB_DIR}/lib -lhdf5_hl -lhdf5 -lz -lnetcdf" " to to the configure line like this:
./configure --prefix=${LIB_DIR} LDFLAGS=-L${LIB_DIR}/lib CPPFLAGS=-I${LIB_DIR}/include LIBS="-L${LIB_DIR}/lib -lhdf5_hl -lhdf5 -lz -lnetcdf"
from netcdf-cxx4.
Thanks for your reply!
from netcdf-cxx4.
Related Issues (20)
- Issue building with clang on macOS 11.3 HOT 3
- MacOS 11.3 Macports can't build netcdf-cxx @4.2 possibly due to VERSION
- Errors building 4.3.1 tag on macOS with Clang 12.0.5
- libnetcdf_c++4 vs. libnetcdf-cxx4 HOT 1
- Get attributes in the original order
- compile failure ncVar.cpp:630:11 error: 'nc_def_var_filter' was not declared in this scope (on static build) HOT 1
- header file is right? HOT 2
- Erroneous condition always evaluating true HOT 2
- Minimum required C++ standard?
- How to load data into a std::vector HOT 4
- 2 * field not copied in copy constructor ? HOT 1
- Does netcdf-cxx4 support parallel IO? HOT 1
- netCDF::exceptions::NcHdfErr after calling getVar too often HOT 1
- CMake uninstall target conflicts with other previously registered uninstall targets
- Inconsistent constructor signatures
- HDF 1.14 + netcdf-c 4.9 Support? HOT 3
- Cmake modernization
- Testing: cxx4_test_filter (10/18) - Failed HOT 2
- [feature-request] `netcdfcpp_meta.h` file HOT 1
- updating a variable in a netcdf file
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from netcdf-cxx4.