Compilation fails on Debian 10 (libboost-1.67) #20961

issue pdrobek opened this issue on January 19, 2021
  1. pdrobek commented at 8:32 AM on January 19, 2021: none

    I have tried compiling the code (0.18 and 0.19) and I get an error every time

    CCLD libsecp256k1.la /usr/bin/ar: u' modifier ignored since D' is the default (see U') make[3]: Opuszczenie katalogu '/home/pdrobek/bitcoin/src/secp256k1' CXXLD bitcoind /usr/bin/ld: libbitcoin_wallet.a(libbitcoin_wallet_a-walletutil.o): in function ListWalletDir()': /usr/local/include/boost/filesystem/operations.hpp:1249: undefined reference to `boost::filesystem::detail::recur_dir_itr_imp::increment(boost::system::error_code*)' collect2: error: ld returned 1 exit status

    OS: Debian Buster Libs: libboost-dev-all (1.67)

  2. pdrobek added the label Bug on Jan 19, 2021
  3. fanquake deleted a comment on Jan 19, 2021
  4. fanquake deleted a comment on Jan 19, 2021
  5. decryp2kanon commented at 5:52 PM on January 19, 2021: contributor

    it seems just linker error. check your dependency location.

  6. pdrobek commented at 8:53 PM on January 19, 2021: none

    I have followed build-unix.md for reference. Configure give me no error so i assume there is no error on my side. I also tried libboost from previous Debian (jessie), no luck.

    checking for boostlib >= 1.47.0 (104700)... yes checking whether the Boost::System library is available... yes checking for exit in -lboost_system... yes checking whether the Boost::Filesystem library is available... yes checking for exit in -lboost_filesystem... yes checking whether the Boost::Thread library is available... yes checking for exit in -lboost_thread... yes checking whether the Boost::Chrono library is available... yes checking for exit in -lboost_chrono... yes checking whether the Boost::Unit_Test_Framework library is available... yes checking for dynamic linked boost test... no

  7. laanwj added the label Build system on Jan 19, 2021
  8. laanwj added the label Linux/Unix on Jan 19, 2021
  9. fanquake deleted a comment on Jan 19, 2021
  10. jarolrod commented at 1:42 AM on January 20, 2021: member

    Cannot reproduce on a clean install Debian 10 VM following the 0.18 and 0.19 branch build-unix.md instructions

    Can you run grep BOOST_LIB_VERSION /usr/include/boost/version.hpp to confirm that you are using Boost 1.6.7 and it is installed in a uniform path

    What happens if you go through the compile process while passing the following as the configure step: ./configure LDFLAGS="-L/usr/include"

    Boost Bug Reference: https://svn.boost.org/trac10/ticket/10038

  11. pdrobek commented at 9:22 AM on January 20, 2021: none

    grep BOOST_LIB_VERSION /usr/include/boost/version.hpp

    //  BOOST_LIB_VERSION must be defined to be the same as BOOST_VERSION
    #define BOOST_LIB_VERSION "1_67"
    

    ./configure LDFLAGS="-L/usr/include"

    Options used to compile and link:
      with wallet   = yes
      with gui / qt = no
      with zmq      = no
      with test     = yes
        with fuzz   = no
      with bench    = yes
      with upnp     = auto
      use asm       = yes
      sanitizers    =
      debug enabled = no
      gprof enabled = no
      werror        = no
    
      target os     = linux
      build os      =
    
      CC            = gcc
      CFLAGS        = -g -O2
      CPPFLAGS      =   -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2  -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS
      CXX           = g++ -std=c++11
      CXXFLAGS      =   -fstack-reuse=none -Wstack-protector -fstack-protector-all  -Wall -Wextra -Wformat -Wvla -Wredundant-decls  -Wno-unused-parameter -Wno-implicit-fallthrough   -g -O2
      LDFLAGS       = -pthread  -Wl,-z,relro -Wl,-z,now -pie  -L/usr/include
      ARFLAGS       = cr
    

    I dont know why libboost-filesystem is installed in /usr/locale/include (see line from output of make command -->/usr/local/include/boost/filesystem/operations.hpp)

  12. decryp2kanon commented at 3:14 PM on January 20, 2021: contributor

    it worked on debian 10 buster

    make clean && \
    ./autogen.sh && \
    ./contrib/install_db4.sh `pwd` && \
    export BDB_PREFIX=$PWD/db4 && \
    ./configure BDB_LIBS="-L${BDB_PREFIX}/lib -ldb_cxx-4.8" BDB_CFLAGS="-I${BDB_PREFIX}/include" && \
    make j4
    
  13. hebasto commented at 2:38 PM on January 21, 2021: member

    @pdrobek

    ./configure LDFLAGS="-L/usr/include"

    Why LDFLAGS is passed?

  14. pdrobek commented at 9:40 AM on January 26, 2021: none

    I left it on Debian, move to newest Ubuntu and issue is now resolved. Thank you

  15. pdrobek closed this on Jan 26, 2021

  16. blackmennewstyle commented at 11:19 AM on May 25, 2021: none

    Sorry to jump into that closed issue but this issue has been reported on FIRO as well and the easy lazy fix i read so far is to execute:

    apt-get install libboost-all-dev
    

    It also has been added in the FIRO documentation building for UNIX. Hope that will help anyone facing the issue in the future :)

  17. DrahtBot locked this on Aug 18, 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-05-01 15:14 UTC

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