Skip to content

sz is missing from the libs #2828

@mwestphal

Description

@mwestphal

To report a non-security related issue, please provide:

  • the version of the software with which you are encountering an issue: 4.9.2
  • environmental information (i.e. Operating System, compiler info, java version, python version, etc.): MacOS
  • a description of the issue with the steps needed to reproduce it

build netcdf on macos with:

   -DCURL_INCLUDE_DIR:STRING=0
   -DCURL_LIBRARY:STRING=0

   -DHAVE_HDF5_ZLIB:BOOL=1
   -DUSE_HDF5_SZIP:BOOL=1

   -DBUILD_SHARED_LIBS:BOOL=OFF
   -DNC_FIND_SHARED_LIBS:BOOL=OFF
   -DBUILD_TESTING:BOOL=OFF
   -DCMAKE_INSTALL_NAME_DIR:PATH=install/lib
   -DENABLE_BYTERANGE:BOOL=OFF
   -DENABLE_DAP_REMOTE_TESTS:BOOL=OFF
   -DENABLE_EXAMPLES:BOOL=OFF
   -DENABLE_FILTER_TESTING:BOOL=OFF
   -DENABLE_NCZARR_FILTERS_TESTING:BOOL=OFF
   -DENABLE_PARALLEL4:BOOL=OFF
   -DENABLE_PARALLEL_TESTS:BOOL=OFF
   -DENABLE_TESTS:BOOL=OFF
   -DTEST_PARALLEL:BOOL=OFF
   -DBUILD_UTILITIES:BOOL=OFF
   -DUSE_SZIP:BOOL=OFF
   -DENABLE_DAP:BOOL=OFF
   -DENABLE_NCZARR:BOOL=OFF
   -DCMAKE_INSTALL_LIBDIR:BOOL=lib

Fails with:

2023-10-28T06:55:28.4134090Z Undefined symbols for architecture x86_64:
2023-10-28T06:55:28.4235720Z   "_SZ_BufftoBuffCompress", referenced from:
2023-10-28T06:55:28.4336290Z       _H5Z__filter_szip in libhdf5.a(H5Zszip.c.o)
2023-10-28T06:55:28.4436960Z   "_SZ_BufftoBuffDecompress", referenced from:
2023-10-28T06:55:28.4537600Z       _H5Z__filter_szip in libhdf5.a(H5Zszip.c.o)
2023-10-28T06:55:28.4638050Z   "_SZ_encoder_enabled", referenced from:
2023-10-28T06:55:28.4738220Z       _H5Z_init in libhdf5.a(H5Z.c.o)
2023-10-28T06:55:28.4838960Z ld: symbol(s) not found for architecture x86_64

It looks like some logic is missing from liblib/CMakeLists.txt to add -lsz when HAVE_SZ is true.

Worked around using NC_EXTRA_DEPS.

Metadata

Metadata

Assignees

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