-
Notifications
You must be signed in to change notification settings - Fork 91
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
Build Fails on MacOS #47
Comments
this works for me on macOS 10.14.3 |
Thanks. This worked perfectly |
I'm getting Above did not help. |
I get same problem, guess we need install rocksdb in mac and make complier link to proper headers |
Installing rocksdb with brew helped: |
None of the above solutions work on macOS 12.2, I'm afraid... |
The following procedure worked for me on:
Install
Use
I had all libs already installed, maybe due to the install of Export (for
The |
@faberchri Thank you for sharing, although that didn't work for me either. The only thing that worked in the end was to use the more recent fork of this library, patch that for the latest rocksdb (just removing a few definitions), and then build under |
Could you share how this could be done in more detail? I tried to install from your PR branch by adding the below line to poetry,
but still getting this error
P.S: what do you mean by |
@rollue I mean to start the Homebrew shell using
This presumes you installed rocksdb with Homebrew. Note that |
@alexreg thanks for the explanation, but pardon my ignorance. ....
rocksdb/_rocksdb.cpp:819:10: fatal error: 'rocksdb/utilities/backupable_db.h' file not found
#include "rocksdb/utilities/backupable_db.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3 warnings and 1 error generated.
error: command '/usr/bin/clang' failed with exit code 1
[end of output]
... I've seen in your conversation with NightTsarina, especially in NightTsarina#13 (comment) that this may be deprecated. |
@rollue I don't use poetry so I can't say much about it, but if you set the environment variables like above and then |
brew install alexreg/dev/rocksdb@6 I tried to get the formula accepted in homebrew-core but sadly no luck. At least this should make it easy though. |
@Littlecowherd I faced with the same problem and managed to solve it by moving from anaconda to simple venv or poetry. I'm not sure why it works so, but I suggest anyone to try it. It worked for me. |
@KochankovID Better to use NightTsarina's fork these days. Actively maintained. |
Regarding my previous comment in this thread:
I Followed this same procedure just now again in order to successfully install Crucial missing information from my original post: the procedure works only for For me rocksdb v6 is fine, so I used this procedure to install |
Here is how I made it to work. Setup:
Install
Good luck! |
Glad it helped. That looks good for this repo. For anyone using (NightTsarina's more up-to-date fork (but still based on rocksdb v6), you don't need to make the change to export PKG_CONFIG_PATH="/opt/homebrew/opt/rocksdb@6/lib/pkgconfig" |
Thank you! The procedure you linked worked for me! One caveat: I ended up installing a slightly older version of rocksdb (6.27.3_1 IIRC) because 2.29.3 had some sort of CRC error or something. So first try fail, second try success. |
I had the same problem and for me it seems like the problem is, that python-rocksdb only supports rocksdb 6 and not the latest one (present in Homebrew). The following approach worked for me (use at your own risk):
brew tap-new $USER/local-rocksdb
brew extract --version=6.29.3 rocksdb $USER/local-rocksdb
brew install [email protected]
export CPPFLAGS=-I/usr/local/Cellar/[email protected]/6.29.3/include
export LDFLAGS="-L/usr/local/Cellar/[email protected]/6.29.3/lib -Lusr/local/Cellar/snappy/1.1.9/lib -L/usr/local/Cellar/lz4/1.9.4/lib"
pip install python-rocksdb |
@itadventurer This is all covered fully in the above comments. |
very useful , I appreciate it |
@itadventurer It's very useful to me. |
This does not work in macOS at all. First, the slice error and then the backupable error. |
@itadventurer Your comment was the only thing that worked for me, thank you! |
I tried the itadventurer way but have no success. So I put here some other walk-around choices. Choice 1: Run x86 Conda environment in M1 Mac
conda create -n "myenv" python=3.9
conda activate myenv
conda install -c conda-forge python-rocksdb Choice 2: Use Arm64 Linux in DockerI create a Docker image with tag "python:3.9-bullseye", and use the bullseye "python3-rocksdb" deb package. Such as: docker run -it --name mypy --volume $(pwd):/usr/src/app --net=host py-dev:latest bash
apt install python3-rocksdb Now |
I managed to make it work on a MacBook Air M1 with RocksDB git clone https://github.com/Homebrew/homebrew-core
cd homebrew-core
git checkout b3597b729a2
brew install Formula/rocksdb.rb
brew pin rocksdb
export CPPFLAGS="-I/opt/homebrew/Cellar/rocksdb/6.29.3/include"
export LDFLAGS="-L/opt/homebrew/Cellar/rocksdb/6.29.3/lib -L/opt/homebrew/Cellar/snappy/1.1.10/lib -L/opt/homebrew/Cellar/lz4/1.9.4/lib"
pip install python-rocksdb For any other package and version you can check this gist. |
After having rocksdb installed with brew
I tried to install the library with
in MacOs Sequoia (15.0.1) and Python 3.11.9, but there are compiler errors, e.g.
|
Building python-rocksdb fails on recent version of MacOS. The final error you get is when linking with libstdc++:
Summary of how to work around right now:
The pandas folks ran into this too; here is a discussion on how to resolve the issue by passing additional args to Clang: pandas-dev/pandas#23424
The text was updated successfully, but these errors were encountered: