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

issue pdrobek openend 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

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

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

     0Options used to compile and link:
     1  with wallet   = yes
     2  with gui / qt = no
     3  with zmq      = no
     4  with test     = yes
     5    with fuzz   = no
     6  with bench    = yes
     7  with upnp     = auto
     8  use asm       = yes
     9  sanitizers    =
    10  debug enabled = no
    11  gprof enabled = no
    12  werror        = no
    13
    14  target os     = linux
    15  build os      =
    16
    17  CC            = gcc
    18  CFLAGS        = -g -O2
    19  CPPFLAGS      =   -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2  -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS
    20  CXX           = g++ -std=c++11
    21  CXXFLAGS      =   -fstack-reuse=none -Wstack-protector -fstack-protector-all  -Wall -Wextra -Wformat -Wvla -Wredundant-decls  -Wno-unused-parameter -Wno-implicit-fallthrough   -g -O2
    22  LDFLAGS       = -pthread  -Wl,-z,relro -Wl,-z,now -pie  -L/usr/include
    23  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

    0make clean && \
    1./autogen.sh && \
    2./contrib/install_db4.sh `pwd` && \
    3export BDB_PREFIX=$PWD/db4 && \
    4./configure BDB_LIBS="-L${BDB_PREFIX}/lib -ldb_cxx-4.8" BDB_CFLAGS="-I${BDB_PREFIX}/include" && \
    5make 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:

    0apt-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: 2024-12-03 15:12 UTC

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