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

[QUESTION] Could you have a document for the environment setup? To avoid compilation error. #311

Open
hykych opened this issue Nov 4, 2024 · 1 comment

Comments

@hykych
Copy link

hykych commented Nov 4, 2024

When I download the src code to my local Ubuntu 24.04 LTS and follow the README to compile the src code, I encounter errors when compiling the deps/rocksdb:

db/db_impl/db_impl.cc: In member function ‘virtual rocksdb::Status rocksdb::DBImpl::FlushWAL(bool)’:
db/db_impl/db_impl.cc:1441:23: error: redundant move in return statement [-Werror=redundant-move]
 1441 |       return std::move(io_s);
      |              ~~~~~~~~~^~~~~~
db/db_impl/db_impl.cc:1441:23: note: remove ‘std::move’ call
db/db_impl/db_impl.cc:1445:23: error: redundant move in return statement [-Werror=redundant-move]
 1445 |       return std::move(io_s);
      |              ~~~~~~~~~^~~~~~
db/db_impl/db_impl.cc:1445:23: note: remove ‘std::move’ call
db/db_impl/db_impl.cc: In member function ‘virtual rocksdb::Status rocksdb::DBImpl::LockWAL()’:
db/db_impl/db_impl.cc:1562:19: error: redundant move in return statement [-Werror=redundant-move]
 1562 |   return std::move(status);

I have to set the following environment variable.

export CFLAGS="-Wno-error"

Then I face another error when compiling rocksdb.

'uint8_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?

To solve this I have to downgrade the gcc from gcc 13 to gcc 12.

It would be nice to have a document for the environment setup, the library, gcc version, CFLAGS etc....

@hykych
Copy link
Author

hykych commented Nov 4, 2024

Set the following env variables to allow CXX and CC point to g++-12 and gcc-12:

export CXX=g++-12
export CC=gcc-12

@ctripcorp ctripcorp deleted a comment from adzfolc Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant