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

Conda package wants unprovided compression functions #327

Open
dzenanz opened this issue Nov 30, 2021 · 2 comments
Open

Conda package wants unprovided compression functions #327

dzenanz opened this issue Nov 30, 2021 · 2 comments

Comments

@dzenanz
Copy link

dzenanz commented Nov 30, 2021

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 ==========
@dzenanz
Copy link
Author

dzenanz commented Dec 2, 2021

Building blosc myself, and pointing to that build leads to a successful xtensor-zarr build.

@dzenanz
Copy link
Author

dzenanz commented Dec 2, 2021

I also realized that linking blosc might be complaining about zstd's functions, not zlib's. conda install did pull zstd as a dependency of blosc.

@dzenanz dzenanz changed the title Conda package wants unprovided zlib functions Conda package wants unprovided compression functions Dec 2, 2021
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

No branches or pull requests

1 participant