-
Notifications
You must be signed in to change notification settings - Fork 30
Use static rocksdb linkage on Mac [ECR-3324] #1011
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
Conversation
# which is not available via Homebrew | ||
export ROCKSDB_STATIC=1 | ||
# Check if ROCKSDB_LIB_DIR is set | ||
if [ -z "${ROCKSDB_LIB_DIR:-}" ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need these variables? It's always the same /usr/local/lib
. Can we set them here instead of requiring that from users?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're not requiring this from users, because our users will use the Homebrew package 😉
Setting this variable explicitly will allow you to choose what RocksDB version to use. Besides, it is also mentioned in Exonum install guide
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mb it'll be better to replace by the following (in pseudo-code):
export ROCKSDB_LIB_DIR={ROCKSDB_LIB_DIR:-/usr/local/lib}
IF $ROCKSDB_LIB_DIR/librocksdb.dylib not found THEN fail(RocksDB not installed)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually, you can use a specific version of the rocksdb and use general path for snappy:
export ROCKSDB_LIB_DIR=/usr/local/Cellar/rocksdb/6.1.2/lib
or
export ROCKSDB_LIB_DIR=/usr/local/Cellar/rocksdb5/5.18.3/lib
and
export SNAPPY_LIB_DIR=/usr/local/lib
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the reason for this
Rocksdb 6 is fine. |
RocksDB is linked statically on Mac to avoid problems with dynamic library resolving. When dynamic linking is currently used, the app has a dependency on a particular version of the library, with any new version breaking the installation. It is required to set ROCKSDB_LIB_DIR prior to running package_app.sh. (cherry picked from commit ae4593c)
Overview
RocksDB is linked statically on Mac to avoid problems with dynamic library resolving.. It is required to set
ROCKSDB_LIB_DIR
prior to runningpackage_app.sh
.See: https://jira.bf.local/browse/ECR-3324
Definition of Done