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

Bzip2/Bz2 confusion in Cmake build #2717

Open
zklaus opened this issue Jul 3, 2023 · 1 comment · May be fixed by #2718
Open

Bzip2/Bz2 confusion in Cmake build #2717

zklaus opened this issue Jul 3, 2023 · 1 comment · May be fixed by #2718
Assignees
Milestone

Comments

@zklaus
Copy link

zklaus commented Jul 3, 2023

I think there is some confusion between Bzip2 and Bz2 in the Cmake build.
Namely, there are two Cmake detection modules (here and here), but only the Bz2 one seems to be called, leading to only the Bz2_FOUND variable being set.

In the plugin section, the bzip2 plugin is build unconditionally, either with the vendored copy of libbzip2 or the system one, see

IF(HAVE_LOCAL_BZ2)
SET(h5bzip2_SOURCES H5Zbzip2.c blocksort.c huffman.c crctable.c randtable.c compress.c decompress.c bzlib.c bzlib.h bzlib_private.h)
buildplugin(h5bzip2 "h5bzip2")
ELSE()
SET(h5bzip2_SOURCES H5Zbzip2.c)
buildplugin(h5bzip2 "h5bzip2" ${Bzip2_LIBRARIES})
ENDIF()

However, the install of the plugin is conditioned on the Bzip2_FOUND variable, which is never set, meaning the plugin will never be installed, see

IF(Bzip2_FOUND)
installplugin(h5bzip2)
ENDIF()
.

Unless there is a separate Bz2 library or something else that I am not aware of, the Cmake documentation seems to suggest that one should instead use FIND_PACKAGE(Bzip2) and remove the usage of Bz2?

@WardF
Copy link
Member

WardF commented Jul 11, 2023

Thanks! I'll take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants