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

libleveldb shared library name does not match platform conventions on macOS #412

Closed
ryandesign opened this issue Oct 16, 2016 · 1 comment
Labels

Comments

@ryandesign
Copy link

Hello, I'm a developer with the MacPorts package management system.

The name of the libleveldb shared library, and its embedded install_name, does not match the conventions of macOS.

For example, installing leveldb 1.18 via MacPorts, these files are installed:

$ ls -l /opt/local/lib/libleveldb*
-rw-r--r--  1 root  wheel  991072 Oct 16 16:01 /opt/local/lib/libleveldb.a
lrwxr-xr-x  1 root  wheel      21 Oct 16 16:01 /opt/local/lib/libleveldb.dylib -> libleveldb.dylib.1.18
lrwxr-xr-x  1 root  wheel      21 Oct 16 16:01 /opt/local/lib/libleveldb.dylib.1 -> libleveldb.dylib.1.18
-rwxr-xr-x  1 root  wheel  625960 Oct 16 16:01 /opt/local/lib/libleveldb.dylib.1.18

And the shared libraries have this install_name:

$ otool -L /opt/local/lib/libleveldb.dylib
/opt/local/lib/libleveldb.dylib:
    /opt/local/lib/libleveldb.dylib.1 (compatibility version 0.0.0, current version 0.0.0)
    /opt/local/lib/libsnappy.1.dylib (compatibility version 5.0.0, current version 5.0.0)
    /opt/local/lib/libtcmalloc.4.dylib (compatibility version 7.0.0, current version 7.6.0)
    /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.1.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)

On macOS, the library version number does not go after the filename extension; it goes before. So the library should not be "libleveldb.dylib.1"; it should be "libleveldb.1.dylib".

This problem was noticed by the Homebrew package management system as well in Homebrew/legacy-homebrew#14440. There was a comment there that an upstream issue should be submitted, but I don't know if one ever was, so I'm submitting this one now.

I have patched the build system to fix this and will submit a pull request shortly.

@cmumford
Copy link
Contributor

The build process has switched from make to CMake and no longer creates versioned library symbolic links.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants