Skip to content

cmake build fails when Blosc is enabled #2268

@bmcandr

Description

@bmcandr

#2245 enhanced filter support, but seems to have broken the build process when including Blosc. Building the master branch with Blosc enabled was working prior to the merge of that PR.

cmake .. -LA -DENABLE_FILTER_TESTING=ON -DENABLE_BLOSC=ON finds the Blosc installation:

-- Found Blosc: headers at /path/to/username/local/c-blosc/include, libraries at /path/to/username/local/c-blosc/lib
-- 	library is /path/to/username/local/c-blosc/lib64/libblosc.so
...
Extra libraries:	-lhdf5_hl -lhdf5 -lz -ldl -lm -lblosc -lbz2 -lcurl -lxml2
...
Standard Filters:       deflate,blosc,bz2
...
Blosc_DEBUG_LIBRARY:FILEPATH=Blosc_DEBUG_LIBRARY-NOTFOUND
Blosc_INCLUDE_DIRS:PATH=/path/to/username/local/c-blosc/include
Blosc_RELEASE_LIBRARY:FILEPATH=/path/to/username/local/c-blosc/lib64/libblosc.so
...

(Click here for the full log)

However cmake --build . fails with:

[ 13%] Building C object libhdf5/CMakeFiles/netcdfhdf5.dir/hdf5filter.c.o
/path/to/username/build/netcdf-c-ce0446b/libhdf5/hdf5filter.c:23:10: fatal error: blosc.h: No such file or directory
   23 | #include <blosc.h>
      |          ^~~~~~~~~
compilation terminated.
libhdf5/CMakeFiles/netcdfhdf5.dir/build.make:271: recipe for target 'libhdf5/CMakeFiles/netcdfhdf5.dir/hdf5filter.c.o' failed
gmake[2]: *** [libhdf5/CMakeFiles/netcdfhdf5.dir/hdf5filter.c.o] Error 1
CMakeFiles/Makefile2:2257: recipe for target 'libhdf5/CMakeFiles/netcdfhdf5.dir/all' failed
gmake[1]: *** [libhdf5/CMakeFiles/netcdfhdf5.dir/all] Error 2
Makefile:165: recipe for target 'all' failed
gmake: *** [all] Error 2

Looks like the Blosc library is not being properly included when compiling libhdf5/hdf5filter.c? Let me know if there is any further information I can provide.


Another issue: cmake/modules/FindBlosc.cmake seems to search for the Blosc shared libraries only in a directory called lib. I had to modify that file to search for the libraries in lib64 to get this far. It might be good to modify this to search in any variation of lib*/.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions