Error building master: undefined reference to `boost::filesystem::detail::copy_file #3444

issue garyvdm opened this issue on December 19, 2013
  1. garyvdm commented at 7:39 AM on December 19, 2013: none

    I am getting an error building master (636a42bd0e208d1d49dab6a95e23863736823883) :

      CXXLD    bitcoind
    libbitcoin_wallet.a(walletdb.o): In function `copy_file':
    /usr/include/boost/filesystem/operations.hpp:381: undefined reference to `boost::filesystem::detail::copy_file(boost::filesystem::path const&, boost::filesystem::path const&, boost::filesystem::copy_option::enum_type, boost::system::error_code*)'
    collect2: error: ld returned 1 exit status
    Makefile:689: recipe for target 'bitcoind' failed
    

    This is on an up to date Arch Linux box. boost version: 1.55.0-3

    I'm going to start bisecting to try find the commit that caused this.

  2. laanwj commented at 7:50 AM on December 19, 2013: member

    Googling for the error gives:

    http://www.robertnitsch.de/notes/cpp/cpp11_boost_filesystem_undefined_reference_copy_file

    http://www.ridgesolutions.ie/index.php/2013/05/30/boost-link-error-undefined-reference-to-boostfilesystemdetailcopy_file/

    So probably your boost is built with -std=c++0x whereas bitcoin is not. You can try if the #define works...

  3. garyvdm commented at 9:37 AM on December 19, 2013: none

    Ah, there was a change to the build options for boost in Arch Linux: https://projects.archlinux.org/svntogit/packages.git/commit/?h=packages%2Fboost&id=eb3572a1e6fbe586581f5b88765eab455e174564&context=40&ignorews=0&ss=0

    I tried this with boost 1.55.0-3, but it did not work.

    CFLAGS=-std=gnu++11 ./configure
    make
    

    In the mean time, I'm just going to downgrade to boost 1.55.0-2.

  4. garyvdm closed this on Dec 19, 2013

  5. MarcoFalke locked this on Sep 8, 2021
Contributors

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-22 18:15 UTC

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