At work we use MongoDB, and it’s been cumbersome to upgrade it since it’s a non-free package and therefore not built by Hydra, and requires local compilation. So in my dev shell, I’ve written a derivation which fetches the pre-built Debian binary and uses autoPatchelfHook to patch it.
This works great except running the patched binary prints
mongod: /nix/store/cgmpl823df6sjgc9qbb9wrw379x8yvwk-curl-7.86.0/lib/libcurl.so.4: no version information available (required by mongod)
before proceeding normally.
I’ve tried ensuring that curl is on the binary’s PATH, to no effect.
Basically, mongodb expects the filename of libcur to include the full version not just the major version. So instead of libcurl.so.4 it should be libcurl.so.4.3.0.
It’s possible to build curl in a way that it is like this. The flag --enable-versioned-symbols needs to be added. Here’s how it can be overridden:
Small update: The filename doesn’t seem to matter. The normal version of curl has the same files inside /lib as the patched one. It seems to be something inside the files that makes the difference.
Would be interesting if this could just be enabled by default…
I just ignored it because it didn’t seem to cause any issues. It may also be fixed on new versions of nixpkgs. I don’t see the warning anymore when I run mongod. So you may need to update your nixpkgs.