facebook / facebook/rocksdb

Current version and compatibility version are not set correctly on Mac OS

Open
#5,569 2 comments 1 reaction 0 assignees View on GitHub
Dominant language
C++
Stars
32.1k
Forks
6.9k
Avg merge
32m
Merged PRs (30d)
1

Description

## Expected behavior

`current version` and `compatibility version` fields are set correctly in `dylib` on Mac OS.

### Actual behavior

```bash
$ otool -l librocksdb.dylib
# ...
Load command 3
cmd LC_ID_DYLIB
cmdsize 48
name librocksdb.6.2.dylib (offset 24)
time stamp 1 Thu Jan 1 03:00:01 1970
current version 0.0.0
compatibility version 0.0.0
# ....
```

`current version` and `compatibility version` are not set correctly, which means linker shows invalid behaviour in some cases. We faced this problem when the linker sets the path only to a current revision of the library (e.g. `librocksdb.5.18.3.dylib` instead of `librocksdb.5.dylib`)

### Steps to reproduce the behavior

`make shared_lib`, then `otool -l librocksdb.dylib`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.