Forum Navigation
You need to log in to create posts and topics.

compiler error with netcdf

Dear Ovito team,

 

I'm trying to compile Ovito linking with NetCDF 4.7.4. I am getting the following error message:

[ 34%] Linking CXX shared library ../../../lib/ovito/libovito_netcdf.so
/usr/bin/cmake: /usr/local/curl/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake)
/usr/bin/ld: cannot find /usr/local/netcdf-c-4.7.4/lib: file format not recognized
collect2: error: ld returned 1 exit status
make[2]: *** [src/3rdparty/netcdf_integration/CMakeFiles/NetCDFIntegration.dir/build.make:105: lib/ovito/libovito_netcdf.so] Error 1
make[1]: *** [CMakeFiles/Makefile2:1310: src/3rdparty/netcdf_integration/CMakeFiles/NetCDFIntegration.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

 

What is going on?

Hi,

It's difficult for me to tell from the error message alone what is going wrong here. I haven't seen this kind of make error before. Could you please tell me how you have specified the NetCDF library's location during the CMake configuration phase (if you did at all)?

For NetCDF 4.7.2 and HDF5 1.10.5, both built from source and installed in the directory /usr/local under Linux, I typically specify the following cmake configuration values when building OVITO:

-DHDF5_DIR=/usr/local/share/cmake/hdf5 -DnetCDF_DIR=/usr/local/lib/cmake/netCDF
Please check that your are using similar settings.
-Alex

Thanks for getting back,

 

I figured out what the problem was, I seem to have made a mistake when configuring NetCDF before building. When configuring NetCDF the flag

CURL-LIBRARY-DEBUG asks for /path/to/libcurl.so. The first time I configured NetCDF I only provided the directory that libcurl.so is located at. After rebuilding NetCDF with the correct configuration, Ovito compiled just fine.

 

Thanks,

 

Christoph