Skip to content

Conda package wants unprovided compression functions #327

@dzenanz

Description

@dzenanz

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 ==========

Metadata

Metadata

Assignees

No one assigned

    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