Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't build VAPOR3 from scratch with Fedora 34 #2895

Closed
leighorf opened this issue Nov 8, 2021 · 7 comments
Closed

Can't build VAPOR3 from scratch with Fedora 34 #2895

leighorf opened this issue Nov 8, 2021 · 7 comments
Assignees
Milestone

Comments

@leighorf
Copy link

leighorf commented Nov 8, 2021

I need to build vapor on top of my own HDF5 / NetCDF4 build that contains ZFP compression.

I installed various libraries and got what looks like everything configured:

My ccmake configuration

VERBOSE=1 make provides:

[  5%] Building CXX object lib/wasp/CMakeFiles/wasp.dir/NetCDFCpp.cpp.o
cd /home/orf/build/git/VAPOR/build/lib/wasp && /usr/bin/c++ -DWASP_EXPORTS -Dwasp_EXPORTS -I/home/orf/build/git/VAPOR/include -I/usr/local/VAPOR-Deps/2019-Aug/include -I/usr/local/VAPOR-Deps/2019-Aug/include/freetype2 -I/usr/local/VAPOR-Deps/2019-Aug/include/python3.6m -I/usr/local/VAPOR-Deps/2019-Aug/lib/python3.6/site-packages/numpy/core/include -Wall -Wno-sign-compare -Wno-overloaded-virtual -Wno-parentheses -g -fPIC -std=gnu++11 -MD -MT lib/wasp/CMakeFiles/wasp.dir/NetCDFCpp.cpp.o -MF CMakeFiles/wasp.dir/NetCDFCpp.cpp.o.d -o CMakeFiles/wasp.dir/NetCDFCpp.cpp.o -c /home/orf/build/git/VAPOR/lib/wasp/NetCDFCpp.cpp
In file included from /home/orf/build/git/VAPOR/lib/wasp/NetCDFCpp.cpp:5:
/home/orf/build/git/VAPOR/include/vapor/NetCDFCpp.h:4:10: fatal error: netcdf.h: No such file or directory
    4 | #include <netcdf.h>
      |          ^~~~~~~~~~
compilation terminated.
make[2]: *** [lib/wasp/CMakeFiles/wasp.dir/build.make:132: lib/wasp/CMakeFiles/wasp.dir/NetCDFCpp.cpp.o] Error 1
make[2]: Leaving directory '/home/orf/build/git/VAPOR/build'
make[1]: *** [CMakeFiles/Makefile2:1236: lib/wasp/CMakeFiles/wasp.dir/all] Error 2
make[1]: Leaving directory '/home/orf/build/git/VAPOR/build'
make: *** [Makefile:156: all] Error 2

So while I can tell cmake where the netcdf shared library is I don't know how to tell it where the include files are... they are in /home/orf/software/include....

@leighorf leighorf added the Bug label Nov 8, 2021
@leighorf
Copy link
Author

leighorf commented Nov 8, 2021

OK I think this really isn't a bug now that I am remembering how to build VAPOR from source. I think the key is to know what goes in (symbolically linked perhaps) each of the include directories

/usr/local/VAPOR-Deps/2019-Aug/include
/usr/local/VAPOR-Deps/2019-Aug/include/freetype2
/usr/local/VAPOR-Deps/2019-Aug/include/python3.6m
/usr/local/VAPOR-Deps/2019-Aug/lib/python3.6/site-packages/numpy/core/include

I'd like to know what is recommended (versions etc.) so that I can have a working build environment as I get the ZFP stuff working. I'm really close now. I'd like to know whether building python from source is recommended (an option with ccmake). I am running on an up to date Fedora 34 machine. I got past the netcdf include issue by symbolically linking netcdf.h from /usr/local/VAPOR-Deps/2019-Aug/include for instance.

@clyne
Copy link
Collaborator

clyne commented Nov 9, 2021

@sgpearse can you help @leighorf out?

@leighorf
Copy link
Author

leighorf commented Nov 9, 2021 via email

@sgpearse sgpearse added the High label Nov 9, 2021
@sgpearse sgpearse self-assigned this Nov 9, 2021
@sgpearse
Copy link
Collaborator

sgpearse commented Nov 10, 2021

@leighorf -

Our third party libraries are built in a sequential order, documented here.

If Vapor's third party libraries are not successfully linking to your new ones, then you'll need to rebuild the libraries that depend on NetCDF. These are the listed after NetCDF, and may include:

udunits
freetype*
jpeg*
tiff*
SQLite*
Proj
geotiff
Glew*
Python*

  • You could try skipping the ones with an asterisk. My guess is that udunits, Proj, and geotiff are the only libs that link to NetCDF, but I'm not certain.

I wish I could say which specific libraries depend on NetCDF, but I don't know. Python is the hardest library to build, and I don't think it links to NetCDF.

This is a high priority issue for us. Hit me with any questions.

@clyne
Copy link
Collaborator

clyne commented Nov 10, 2021

@leighorf if all you want to do is link to a different version of NetCDF, the easiest path might be to:

  1. Install our pre-combined third party libraries as described here

  2. Build your own version of NetCDF and set the installation target to overwrite the version of NetCDF included in our third party library tar ball.

There is also more information on building from source in our contributors guide.

@leighorf
Copy link
Author

leighorf commented Nov 10, 2021 via email

@leighorf
Copy link
Author

OK we can close this! John, I followed your instructions, except I did one thing that I thought I couldn't get away with. I had already built HDF1.10.7 and NetCDF-C-4.8.1. My version of NetCDF created libnetcdf.so.19. I did a symbolic link to that from libnetcdf.so.15 (which is what VisIt expects) and it just worked haha. Living life dangerously. So I'll put on hold the whole build from scratch thing for later...

So here is my VAPOR3.5 install library, with only 3 files needed to be changed/linked.

I was very (pleasantly) surprised when an image popped up instead of a segfault ....... :)

fuggle: /home/orf/software/VAPOR3-3.5.0-Linux/lib lt
total 313416
drwxr-xr-x 1 orf orf 5888 Nov 10 11:32 ./
lrwxrwxrwx 1 orf orf 25 Nov 10 11:32 libnetcdf.so.15 -> ../../lib/libnetcdf.so.19*
drwxrwxr-x 1 orf orf 92 Nov 10 11:31 orf-moved/
lrwxrwxrwx 1 orf orf 24 Nov 7 20:27 libhdf5.so.103 -> ../../lib/libhdf5.so.103*
lrwxrwxrwx 1 orf orf 27 Nov 7 20:27 libhdf5_hl.so.100 -> ../../lib/libhdf5_hl.so.100*
drwxrwxr-x 1 orf orf 36 Sep 2 15:54 ../
lrwxrwxrwx 1 orf orf 15 Aug 3 10:08 libembree3.so -> libembree3.so.3
lrwxrwxrwx 1 orf orf 24 Aug 3 10:08 libOpenImageDenoise.so -> libOpenImageDenoise.so.1
lrwxrwxrwx 1 orf orf 28 Aug 3 10:08 libOpenImageDenoise.so.1 -> libOpenImageDenoise.so.1.2.4
lrwxrwxrwx 1 orf orf 37 Aug 3 10:08 libopenvkl_module_ispc_driver_16.so -> libopenvkl_module_ispc_driver_16.so.0
lrwxrwxrwx 1 orf orf 42 Aug 3 10:08 libopenvkl_module_ispc_driver_16.so.0 -> libopenvkl_module_ispc_driver_16.so.0.11.0

@sgpearse sgpearse added this to the 3_6_0 Release milestone Jan 24, 2022
@sgpearse sgpearse added DevOps and removed Bug labels Feb 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants