Closed gau-nernst closed 1 year ago
@hadim do you happen to know the answer for this? I'm building a rocksdb Python binding. On Windows, libzlib
only provides a DLL file so I cannot link zlib. I also need the import library zlib.lib to link correctly. Installing zlib
from conda-forge solves the problem, but it's strange the dependency is libzlib
but not zlib
package.
I don't know the answer. Does rocksdb depend on zlib
or libzlib
? If it does not directly depend on zlib
then maybe you should install zlib
on the side for your python binding lib (conda will solve the version that matches the rocksdb one).
Maybe ping @conda-forge/help-c-cpp here to check what's the best thing to do here.
From what I check, zlib and libzlib packages are both zlib library, but they provide different library types (zlib
package provides header files, static and dynamic versions of the library, while libzlib
only provides dynamic version of the library).
Using either one is fine for RocksDB. However, to compile an executable (or in my case, Python binding) that uses RocksDB, I need the zlib
package on Windows to link against the "import library". This problem does not exist for macOS and Linux. So in my use case, installing zlib
package solves the issue and it is fine for me.
My question is more like, which part of the configuration/code in this repo that says rocksdb
package depends on libzlib
package? I cannot find any reference to libzlib
package in this repo, only this
I also wonder why there are 2 version of zlib on conda-forge, but that is not the scope of the original question.
Indeed, only zlib
is in the recipe.
Unfortunately, it's beyond my knowledge here so I would suggest waiting for a conda-forge dev to jump here. Maybe you can also ask on Gitter directly at https://gitter.im/conda-forge/conda-forge.github.io
Comment:
Hello,
I'm not too familiar with conda build process. But I observe that when I install rocksdb package, libzlib is installed instead of zlib.
To verify this
Output on Macbook Air M1
Output on Windows machine
This is quite strange since the requirements in
meta.yaml
is zlibhttps://github.com/conda-forge/rocksdb-feedstock/blob/a322aade0b6c6bd5595bed6b80d5b816d59812ab/recipe/meta.yaml#L20-L32
libzlib only provides dynamic library, while zlib will provide header files, dynamic and static libraries. In other words, zlib is more complete.
So my question is, where is the code/config that maps
zlib
requirement inmeta.yaml
to thelibzlib
package on conda-forge? Also, was there a reason of choosinglibzlib
overzlib
package?