Could not link against boost_filesystem #8749

issue masaoliou opened this issue on September 17, 2016
  1. masaoliou commented at 4:12 AM on September 17, 2016: none

    Debian Jessie

    I have been linking boost_filesystem with my own project without problem.

    config.log:

    It was created by Bitcoin Core configure 0.13.99, which was
    generated by GNU Autoconf 2.69.  Invocation command line was
    
    $ ./configure --with-incompatible-bdb
    
    hostname = txxs.biz
    uname -m = x86_64
    uname -r = 4.6.0
    uname -s = Linux
    uname -v = [#7](/bitcoin-bitcoin/7/) SMP Thu May 26 17:08:55 CST 2016
    ...
    
    #define HAVE_VISIBILITY_ATTRIBUTE 1
    #define HAVE_BOOST /**/
    #define HAVE_BOOST_SYSTEM /**/
    #define HAVE_BOOST_FILESYSTEM /**/
    #define HAVE_BOOST_PROGRAM_OPTIONS /**/
    
    configure: exit 1
    

    output:

    checking for boostlib >= 1.20.0... 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::Program_Options library is available... yes
    configure: error: Could not link against boost_filesystem !
    
  2. paveljanik commented at 6:54 AM on September 17, 2016: contributor

    Please upload config.log somewhere for investigation.

  3. masaoliou commented at 7:03 AM on September 17, 2016: none

    @paveljanik Please download it from here.

  4. paveljanik commented at 7:20 AM on September 17, 2016: contributor

    Strange. Can you please upload sh -x ./configure .... 2>&1 output? What version of the sources do you use? The next line in configure output here is:

    checking for exit in -lboost_program_options-mt... yes
    
  5. masaoliou commented at 7:37 AM on September 17, 2016: none

    @paraipan It seems that sh -x ./configure --with-incompatible-bdb 2>&1 outputs everything to screen but files.

    sh -x ./configure --with-incompatible-bdb 2>&1 >/tmp/config2.log produces this and ./configure --with-incompatible-bdb 2>&1 >/tmp/config2.log produces this

  6. masaoliou commented at 7:45 AM on September 17, 2016: none

    @paraipan Aha... configure stops complaining that problem after I installed libboost-program-options-dev. I will close this issue at this moment although configure reports another problem.

  7. masaoliou closed this on Sep 17, 2016

  8. paveljanik commented at 7:45 AM on September 17, 2016: contributor

    please use ./something >log 2>&1 (redirect stdout to file first, then stderr to stdout) to collect both stdout and stderr.

  9. paveljanik commented at 7:45 AM on September 17, 2016: contributor

    Good that you solved this yourself. Thank you!

  10. masaoliou commented at 7:46 AM on September 17, 2016: none

    @paveljanik Many thanks for your big help!

  11. paveljanik commented at 7:50 AM on September 17, 2016: contributor

    @theuni Can you reproduce the described problem (just uninstalling libboost-program-options-dev and running configure again)? Do we have to report something to ax_boost* upstream or do we use something in the wrong way?

  12. JustinTArthur commented at 3:14 AM on September 10, 2018: contributor

    Was able to reproduce this on Debian Jessie, Debian Stretch and Ubuntu Bionic Beaver using the bitcoin-0.16.2.tar.gz sources. libboost-program-options-dev was not pulled in as a dependency or recommendation from any of the packages recommended in docs/build-unix.md

  13. ken2812221 commented at 3:19 AM on September 10, 2018: contributor

    @JustinTArthur If you're using v0.16.2, you should take a look at the document in v0.16.2, not master. The libboost-program-options-dev has been removed since 0.17.

  14. JustinTArthur commented at 3:27 AM on September 10, 2018: contributor

    @ken2812221 You're right, build-unix.md instructions work in v0.16.2. Thanks

  15. 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-05-03 00:15 UTC

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