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

potentially outdated INSTALL.md? #8078

Open
siemib opened this issue Mar 19, 2021 · 2 comments
Open

potentially outdated INSTALL.md? #8078

siemib opened this issue Mar 19, 2021 · 2 comments
Labels
bug Confirmed RocksDB bugs up-for-grabs Up for grabs

Comments

@siemib
Copy link

siemib commented Mar 19, 2021

Hello

I just tried to compile latest version (6.17.3) following instructions on https://github.com/facebook/rocksdb/blob/master/INSTALL.md.
It wasn't very clear to me what is the right sequence of steps to compile optimized (production) shared object. I believe the first step is to generate make files with cmake like:

mkdir build && cd build && 
cmake .. -DCMAKE_BUILD_TYPE=Release  -DCMAKE_INSTALL_PREFIX=/tmp/install_dir

and then

make -j16 rocksdb-shared && make -j16 install

Please note that I used rocksdb-shared target as opposite to lib_shared that is mentioned in the document. lib_shared seems not exist in the Makefile that was generated by the cmake.

The document says by default the generated .so is not optimized. -DCMAKE_BUILD_TYPE=Release would be enough to trigger the optimized build?

I also run into issue with pthread which I had to modify the root level CMakeLists.txt

SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")

If you think these steps are correct and current document is outdated I am happy to make a PR.

Let me know what you think

Thanks
Bart

@siemib
Copy link
Author

siemib commented Mar 19, 2021

also it might be important to point out in that document that compression (which is not enabled by default) or gflags could be toggled by camke flags i.e cmake -DWITH_LZ4=1 -DWITH_GFLAGS=0

@riversand963
Copy link
Contributor

Thanks @siemib for reporting. I ran into the same error during make install. It would be great if you can contribute a fix.

@akankshamahajan15 akankshamahajan15 added bug Confirmed RocksDB bugs up-for-grabs Up for grabs labels Apr 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed RocksDB bugs up-for-grabs Up for grabs
Projects
None yet
Development

No branches or pull requests

3 participants