Support for building against system LevelDB #2241

pull luke-jr wants to merge 2 commits into bitcoin:master from luke-jr:sys_leveldb changing 3 files +54 −25
  1. luke-jr commented at 2:44 PM on January 30, 2013: member

    Status: Tests succeed, looks complete.

    This is based on top of #2243 (LevelDB build bugfixes).

    This is necessary for proper downstream distro packaging, and useful for people who have LevelDB installed for other reasons anyway. Undocumented to infer an unsupported status, but I could add a brief blurb if that's desirable. Only implemented for Linux (ie, not makefile.<not-unix>) for now - I assume OSX and Windows won't be packaging LevelDB/Bitcoin themselves anytime soon. Note that this does NOT remove the copied leveldb from the code, and will still build with that by default.

    To test with system LevelDB:

    1. Optional: Delete or move src/leveldb so any attempt to use it errors explicitly
    2. Install LevelDB on your system as a shared library
    3. qmake bitcoin-qt.pro USE_SYSTEM_LEVELDB=1 && make
    4. cd src
    5. make -f makefile.unix USE_SYSTEM_LEVELDB=1 bitcoind
    6. make -f makefile.unix USE_SYSTEM_LEVELDB=1 test_bitcoin

    Step 6 (test_bitcoin) will fail if your system LevelDB does not support memenv. This is expected behaviour.

    To test included LevelDB still works:

    1. Restore src/leveldb
    2. Remove system LevelDB library/package
    3. qmake bitcoin-qt.pro && make
    4. cd src
    5. make -f makefile.unix bitcoind
    6. make -f makefile.unix test_bitcoin

    SIDE EFFECT: Bitcoin-Qt and bitcoind no longer include the LevelDB memenv module (only test_bitcoin uses it) - saves 423 KB

  2. maqifrnswa commented at 3:10 PM on February 26, 2013: contributor

    Debian is at least looking at including memenv, won't happen until after Wheezy is released though: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=701075

  3. luke-jr commented at 3:49 PM on February 26, 2013: member

    @maqifrnswa memenv is only needed for test_bitcoin.

  4. jgarzik commented at 6:56 PM on June 19, 2013: contributor

    ACK

    Though this will certainly need updating, pending autotools work

  5. sipa commented at 7:20 PM on June 19, 2013: member

    I'd delay this until after autotoolification, as it would need to be redone from scratch otherwise anyway.

    However, all but test_bitcoin not linking against libmemenv.a seems meaningful by itself.

  6. luke-jr commented at 10:59 PM on July 16, 2013: member

    In the meantime, I fixed a bug building test_bitcoin against system leveldb (memenv.h is not in a subdirectory)

  7. Omit LevelDB's memenv module from Bitcoin-Qt and bitcoind builds, since they never use it fd54507385
  8. Add undocumented USE_SYSTEM_LEVELDB build option (GNU/Linux only) 9f62e7c190
  9. BitcoinPullTester commented at 7:52 AM on July 21, 2013: none

    Automatic sanity-testing: FAILED BUILD/TEST, see http://jenkins.bluematt.me/pull-tester/9f62e7c190d27b14b834d6d085ad136c496e83d0 for binaries and test log.

    This could happen for one of several reasons:

    1. It chanages paths in makefile.linux-mingw or otherwise changes build scripts in a way that made them incompatible with the automated testing scripts (please tweak those patches in contrib/test-scripts)
    2. It adds/modifies tests which test network rules (thanks for doing that), which conflicts with a patch applied at test time
    3. It does not build on either Linux i386 or Win32 (via MinGW cross compile)
    4. The test suite fails on either Linux i386 or Win32
    5. The block test-cases failed (lookup the first bNN identifier which failed in https://github.com/TheBlueMatt/test-scripts/blob/master/FullBlockTestGenerator.java)

    If you believe this to be in error, please ping BlueMatt on freenode or TheBlueMatt here.

    This test script verifies pulls every time they are updated. It, however, dies sometimes and fails to test properly. If you are waiting on a test, please check timestamps to verify that the test.log is moving at http://jenkins.bluematt.me/pull-tester/current/ Contact BlueMatt on freenode if something looks broken.

  10. Diapolo commented at 12:48 PM on October 10, 2013: none

    This needs rebase because of Autotools, dunno if it's even required...

  11. laanwj commented at 9:17 AM on October 16, 2013: member

    Closing this as autotools will need a completely different solution.

  12. laanwj closed this on Oct 16, 2013

  13. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-14 15:16 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me