bitcoind fails to compile with boost 1.72.0 #17856

issue meeDamian opened this issue on January 3, 2020
  1. meeDamian commented at 9:15 AM on January 3, 2020: contributor

    Expected behavior

    make succeeds

    Actual behavior

    $ make
    Making all in src
      …
      CXX      wallet/libbitcoin_wallet_a-walletutil.o
    wallet/walletutil.cpp:77:23: error: no member named 'level' in 'boost::filesystem::recursive_directory_iterator'
            } else if (it.level() == 0 && it->symlink_status().type() == fs::regular_file && IsBerkeleyBtree(it->path())) {
                       ~~ ^
    1 error generated.
    make[2]: *** [wallet/libbitcoin_wallet_a-walletutil.o] Error 1
    make[1]: *** [all-recursive] Error 1
    make: *** [all-recursive] Error 1
    

    To reproduce

    For MacOS:

    brew update
    brew install boost
    cd bitcoin
    ./contrib/install_db4.sh $(pwd)
    export BDB_PREFIX=$(pwd)/db4
    ./autogen.sh
    ./configure BDB_LIBS="-L${BDB_PREFIX}/lib -ldb_cxx-4.8" BDB_CFLAGS="-I${BDB_PREFIX}/include" --enable-cxx --without-gui --disable-tests --disable-bench
    make
    

    For Alpine see: Dockerfile, build log.

    System information

    Tested for v0.19.0.1 & e6f167bfd .

    Reproducible on MacOS/amd64 as well as debian/arm, and ubuntu/amd64.

    Speculation

    It seems to be caused by a change in boost described as (src):

    • Deprecated: The following members of recursive_directory_iterator are now marked as deprecated: level(), no_push_pending(), no_push_request(), no_push(). Users are advised to replace their use with the standard counterparts: depth(), recursion_pending(), disable_recursion_pending(). Note that recursion_pending() has the opposite meaning compared to no_push_pending() and no_push_request(). Deprecated methods will be removed in a future release.
  2. meeDamian added the label Bug on Jan 3, 2020
  3. fanquake commented at 11:18 AM on January 3, 2020: member

    This is fixed with #17654. I'll backport that change and some other commits to the 0.19 branch shortly.

  4. MarcoFalke added this to the milestone 0.19.1 on Jan 3, 2020
  5. laanwj referenced this in commit bb123c6527 on Jan 8, 2020
  6. fanquake closed this on Jan 23, 2020

  7. porcupinenick commented at 3:55 PM on April 26, 2020: none

    @meeDamian @fanquake I am still getting this failed test! I have pulled 0.19.1 and the test is still failing. How would I go about debugging this?

  8. MarcoFalke commented at 5:39 PM on April 26, 2020: member

    @nickycutesc Please provide the config log and steps to reproduce

  9. porcupinenick commented at 6:05 PM on April 26, 2020: none

    Config Log:

    Auto-Generated Configuration File

    Node Launcher version 5.3.0

    rpcuser=default_user rpcpassword="" datadir=/Volumes/BITCOIN prune=1 txindex=0 server=1 timeout=6000 zmqpubrawblock=tcp://127.0.0.1:18500 zmqpubrawtx=tcp://127.0.0.1:18501 dbcache=6426 disablewallet=0 testnet=1

    Steps to Reproduce:

    1. $ bitcoind --version

    <img width="217" alt="image" src="https://user-images.githubusercontent.com/24903257/80315617-c664f180-87c6-11ea-91ce-77118ce3a39d.png">

    1. $ make

    <img width="541" alt="image" src="https://user-images.githubusercontent.com/24903257/80315640-f4e2cc80-87c6-11ea-8f9d-5f232b0b3ea9.png">

  10. MarcoFalke commented at 6:11 PM on April 26, 2020: member

    The config log is in the folder where you type make

  11. porcupinenick commented at 6:14 PM on April 26, 2020: none

    config.status, right?

  12. MarcoFalke commented at 6:14 PM on April 26, 2020: member

    ./config.log

  13. porcupinenick commented at 6:17 PM on April 26, 2020: none

    Are there any sensitive data in the config.log file that I should not publicize here (passwords, etc.)? From what I'm seeing, it's just my local directory dependencies.

  14. MarcoFalke commented at 6:25 PM on April 26, 2020: member

    It shouldn't contain passwords, but it contains you system software and hardware configuration.

    Alternatively, can you provide head -n 20 ./src/fs.h or git log -1?

  15. porcupinenick commented at 6:26 PM on April 26, 2020: none

    Understood, thanks!

    // Copyright (c) 2017-2018 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php.

    #ifndef BITCOIN_FS_H #define BITCOIN_FS_H

    #include <stdio.h> #include <string> #if defined WIN32 && defined GLIBCXX #include <ext/stdio_filebuf.h> #endif

    #define BOOST_FILESYSTEM_NO_DEPRECATED #include <boost/filesystem.hpp> #include <boost/filesystem/fstream.hpp>

    /** Filesystem operations and types */ namespace fs = boost::filesystem;

  16. MarcoFalke commented at 6:29 PM on April 26, 2020: member

    Ok, what is grep PACKAGE_STRING= ./config.log?

  17. porcupinenick commented at 6:30 PM on April 26, 2020: none

    PACKAGE_STRING='Bitcoin Core 0.19.99'

  18. MarcoFalke commented at 6:36 PM on April 26, 2020: member

    Clearly this is not version 19.1

    I have pulled 0.19.1 and the test is still failing.

    PACKAGE_STRING='Bitcoin Core 0.19.99'

    How did you pull?

  19. porcupinenick commented at 6:38 PM on April 26, 2020: none
    1. git clone https://github.com/bitcoin/bitcoin
    2. Opened in GitHub desktop
    3. Switched to Master branch
    4. Fetch changes.
  20. MarcoFalke commented at 6:46 PM on April 26, 2020: member

    You will need to checkout the correct version (like git checkout v0.19.1)

  21. porcupinenick commented at 6:51 PM on April 26, 2020: none

    Understood, trying now.

  22. porcupinenick commented at 7:43 PM on April 26, 2020: none

    Ahhh, sorting out git issues. Thanks for your help! I'm running the tests now.

  23. porcupinenick commented at 8:25 PM on April 26, 2020: none

    Finished running the tests in 0.19.1! However, I'm getting this error:

    unknown location:0: fatal error: in "psbt_wallet_tests/psbt_updater_test": memory access violation at address: 0x02800000: no mapping at fault address

    I tried searching for similar issues, but I'm not sure this particular error is addressed.

    $ grep PACKAGE_STRING= ./config.log PACKAGE_STRING='Bitcoin Core 0.19.1'

    $ head -n 20 ./src/fs.h or git log -1 ==> ./src/fs.h <== // Copyright (c) 2017-2018 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php.

    #ifndef BITCOIN_FS_H #define BITCOIN_FS_H

    #include <stdio.h> #include <string> #if defined WIN32 && defined GLIBCXX #include <ext/stdio_filebuf.h> #endif

    #include <boost/filesystem.hpp> #include <boost/filesystem/fstream.hpp>

    /** Filesystem operations and types */ namespace fs = boost::filesystem;

    /** Bridge operations to C stdio */ head: or: No such file or directory head: git: No such file or directory head: log: No such file or directory head: -1: No such file or directory

  24. MarcoFalke commented at 8:31 PM on April 26, 2020: member

    @nickycutesc Please open a new issue about that and include all relevant information

  25. porcupinenick commented at 8:59 PM on April 26, 2020: none

    Understood, thanks for your help @MarcoFalke ! Here is the issue: https://github.com/bitcoin/bitcoin/issues/18776

  26. foodaka commented at 4:43 PM on May 14, 2020: none

    When running 0.19.0 i had this issue, after bumping to 0.19.1 it seemed to be fixed

  27. Munkybooty referenced this in commit 861ef02929 on Dec 9, 2021
  28. Munkybooty referenced this in commit fc6f77f098 on Dec 9, 2021
  29. Munkybooty referenced this in commit e32f0d5d86 on Dec 9, 2021
  30. Munkybooty referenced this in commit 16f7583e71 on Dec 23, 2021
  31. DrahtBot locked this on Feb 15, 2022

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-13 18:14 UTC

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