I am trying to locally compile https://github.com/xtensor-stack/xtensor-zarr. I self "compiled" all of the dependencies within https://github.com/xtensor-stack, but decided to not go down the rabbit hole of compiling all the image libraries and conda installed gdal and blosc. This pulled in zlib as a dependency.
So in xtensor-zarr's CMake configuration I set:
Blosc_LIBRARY to C:/ProgramData/Anaconda3/pkgs/blosc-1.21.0-h19a0ad4_0/Library/lib/libblosc.lib
ZLIB_LIBRARY_RELEASE to C:/ProgramData/Anaconda3/pkgs/zlib-1.2.11-h62dcd97_4/Library/lib/zlibstatic.lib
However, this results in linking errors below. I looked at C:\ProgramData\Anaconda3\pkgs\zlib-1.2.11-h62dcd97_4\Library\include\zlib.h and it indeed misses all of the contentious symbols. It does have compress and uncompress, but not the others (with or without ZSTD_ prefix).
Build started...
1>------ Build started: Project: xtensor-zarr-gdal, Configuration: RelWithDebInfo x64 ------
1> Creating library C:/Libs/xtensor-zarr-vs19/RelWithDebInfo/libxtensor-zarr-gdal.lib and object C:/Libs/xtensor-zarr-vs19/RelWithDebInfo/libxtensor-zarr-gdal.exp
1>libblosc.lib(blosc.c.obj) : error LNK2019: unresolved external symbol ZSTD_compress referenced in function blosc_c
1>libblosc.lib(blosc.c.obj) : error LNK2019: unresolved external symbol ZSTD_decompress referenced in function zstd_wrap_decompress
1>libblosc.lib(blosc.c.obj) : error LNK2019: unresolved external symbol ZSTD_isError referenced in function blosc_c
1>libblosc.lib(blosc.c.obj) : error LNK2019: unresolved external symbol ZSTD_maxCLevel referenced in function blosc_c
1>C:\Libs\xtensor-zarr-vs19\RelWithDebInfo\libxtensor-zarr-gdal.dll : fatal error LNK1120: 4 unresolved externals
1>Done building project "xtensor-zarr-gdal.vcxproj" -- FAILED.
2>------ Skipped Build: Project: INSTALL, Configuration: RelWithDebInfo x64 ------
2>Project not selected to build for this solution configuration
========== Build: 0 succeeded, 1 failed, 2 up-to-date, 1 skipped ==========
I am trying to locally compile https://github.com/xtensor-stack/xtensor-zarr. I self "compiled" all of the dependencies within https://github.com/xtensor-stack, but decided to not go down the rabbit hole of compiling all the image libraries and
condainstalledgdalandblosc. This pulled inzlibas a dependency.So in
xtensor-zarr's CMake configuration I set:Blosc_LIBRARYtoC:/ProgramData/Anaconda3/pkgs/blosc-1.21.0-h19a0ad4_0/Library/lib/libblosc.libZLIB_LIBRARY_RELEASEtoC:/ProgramData/Anaconda3/pkgs/zlib-1.2.11-h62dcd97_4/Library/lib/zlibstatic.libHowever, this results in linking errors below. I looked at
C:\ProgramData\Anaconda3\pkgs\zlib-1.2.11-h62dcd97_4\Library\include\zlib.hand it indeed misses all of the contentious symbols. It does havecompressanduncompress, but not the others (with or withoutZSTD_prefix).