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

Fix failing building with custom libzip #3040

Merged
merged 2 commits into from
Oct 15, 2024
Merged

Conversation

mannreis
Copy link
Contributor

@mannreis mannreis commented Oct 10, 2024

I've bumped into a problem when building netcdf's nczarr target because of zip.h not found, although CMake was resolving the dependencies correctly:

-- Found Zip: headers at /sw/spack-levante/libzip-1.2.0-qjdhu5/include, libraries at /sw/spack-levante/libzip-1.2.0-qjdhu5/lib
-- 	library is /sw/spack-levante/libzip-1.2.0-qjdhu5/lib/libzip.so
$ cmake -L  2> /dev/null| grep -i libzip
Zip_INCLUDE_DIRS:PATH=/sw/spack-levante/libzip-1.2.0-qjdhu5/include
Zip_RELEASE_LIBRARY:FILEPATH=/sw/spack-levante/libzip-1.2.0-qjdhu5/lib/libzip.so
$ cmake --build . --target nczarr
[  0%] Building C object libnczarr/CMakeFiles/nczarr.dir/zmap_zip.c.o
/home/k/k202186/repos/netcdf-c/libnczarr/zmap_zip.c:15:10: fatal error: zip.h: No such file or directory
 #include <zip.h>
          ^~~~~~~
compilation terminated.
gmake[3]: *** [libnczarr/CMakeFiles/nczarr.dir/build.make:412: libnczarr/CMakeFiles/nczarr.dir/zmap_zip.c.o] Error 1
gmake[2]: *** [CMakeFiles/Makefile2:2466: libnczarr/CMakeFiles/nczarr.dir/all] Error 2
gmake[1]: *** [CMakeFiles/Makefile2:2473: libnczarr/CMakeFiles/nczarr.dir/rule] Error 2
gmake: *** [Makefile:784: nczarr] Error 2

This doesn't happen on my local build (with std/sudo locations for libzip). But on a HPC environment I'm relying on a particular libzip module and this seems to fix my problem

@WardF
Copy link
Member

WardF commented Oct 15, 2024

Thanks!

@WardF WardF merged commit c4c8e12 into Unidata:main Oct 15, 2024
107 checks passed
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 this pull request may close these issues.

2 participants