-
Notifications
You must be signed in to change notification settings - Fork 6
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
nimble install rocksdb
fails with build issue
#73
Comments
I'm not able to reproduce this failure. I'm using linux with Nim version 2.2.0 and the build completes with no issues when I run |
@arnetheduck It appears that nimble install is working. I've tested locally on two linux devices and also in the CI and all builds complete with no issues, see here: #74 |
Hm, it looks like it's using vcpkg for that and I get the above error when that happens - more interestingly though, it's also not using the version from our vendor submodule as far as I can tell from that pr:
we're at a newer version. I also checked what's actually going wrong:
It's performing a test to see if I have the static version of libc/libstd++ installed - this is often not the case and broadly I think the shared versions of said libraries should be used even if we create a static rocksdb, so this looks like a bug. |
there's also no actual installed rocksdb library here that applications can link to |
Yes we use vcpkg for building the rocksdb dynamic libraries on all platforms. This is the only viable way that I'm aware of. For the static libraries on linux and mac we use the rocksdb make file.
Actually I just updated the version today to 9.7.2 but before my update today 9.6.1 was the correct version.
I wonder if there is a bug when building on a different linux distro. What distro are you using by the way?
We don't control or configure this anywhere in nim-rocksdb. If there is a bug it might be in the upstream vcpkg configuration but to confirm I'd like to be able to reproduce it first somehow. |
Hmm, that is odd. There is meant to be a build directory here which the shared library gets copied into. I'll look into this further. |
fedora - on there, the |
Ok, I've reproduced the issue on Fedora and I've confirmed that it breaks due to those missing libraries as you suggested. To fix the issue I can update the vcpkg configuration to make rocksdb link to the dependencies dynamically. The downside is that those libraries may need to be packaged/included with the rocksdb library when it gets used. |
The fix is included in this PR: https://github.com/status-im/nim-rocksdb/pull/76/files |
I think what we're aiming for is that glibc/libstdc++ is shared but the deps (zstd etc) are static - it's the "default" when creating static libraries that a shared c library is still used. The odd thing in this build failure was that it was trying to use a static c library as well. |
Sure, I agree this sounds like a better approach. Setting VCPKG_CRT_LINKAGE to 'dynamic' appears to fix the issue on Fedora while still building the static libraries. See changes here: #78 |
The text was updated successfully, but these errors were encountered: