Page MenuHomePhabricator

Add support to build leveldb using cmake
ClosedPublic

Authored by deadalnix on Dec 12 2017, 15:41.

Details

Summary

As per title

Test Plan
cmake -GNinja ..
ninja

Ensure that lebeldb is built properly. Repeat for windows build.

Diff Detail

Repository
rABC Bitcoin ABC
Branch
leveldbcmake
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 1363
Build 1363: arc lint + arc unit

Event Timeline

Fix error marking variables as advanced

deadalnix retitled this revision from Add support to build eveldb using cmake to Add support to build leveldb using cmake.Dec 12 2017, 17:09
schancel requested changes to this revision.Dec 13 2017, 00:00

This complains about not being able to find endian.h

This revision now requires changes to proceed.Dec 13 2017, 00:00

The specific errors are multiples of this:

ccache /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++  -DLEVELDB_ATOMIC_PRESENT -DLEVELDB_PLATFORM_POSIX -I../src/leveldb/. -I../src/leveldb/include -Isrc/leveldb/include -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk   -std=gnu++11 -MD -MT src/leveldb/CMakeFiles/db_test.dir/db/db_test.cc.o -MF src/leveldb/CMakeFiles/db_test.dir/db/db_test.cc.o.d -o src/leveldb/CMakeFiles/db_test.dir/db/db_test.cc.o -c ../src/leveldb/db/db_test.cc
In file included from ../src/leveldb/db/db_test.cc:7:
In file included from ../src/leveldb/./db/db_impl.h:10:
In file included from ../src/leveldb/./db/dbformat.h:14:
In file included from ../src/leveldb/./util/coding.h:17:
In file included from ../src/leveldb/./port/port.h:14:
../src/leveldb/./port/port_posix.h:38:12: fatal error: 'endian.h' file not found
  #include <endian.h>
           ^~~~~~~~~~

Use public includes for leveldb

schancel requested changes to this revision.Dec 13 2017, 18:49

Same problems still. I was going to try doing something similar to what you had done with the GMP includes. Can still do if you would like.

This revision now requires changes to proceed.Dec 13 2017, 18:49

Define the OS properly, this should fix the build for OSX.

Export the OS definition publicly

This revision is now accepted and ready to land.Dec 15 2017, 00:27
This revision was automatically updated to reflect the committed changes.