Configure breaks on Ubuntu 13.10 #3414

issue jgarzik opened this issue on December 13, 2013
  1. jgarzik commented at 8:38 PM on December 13, 2013: contributor

    CC @theuni

    On Ubuntu 13.10 (GNU/Linux 3.11.0-14-generic x86_64), autogen+configure fails thusly,

    $ ./autogen.sh && CXXFLAGS="-O2 -Wall -g" ./configure --without-qt --with-incompatible-bdb
          ...
    checking for main in -lminiupnpc... (cached) yes
    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
    configure: error: Could not link against boost_system !
    

    config.log says

    configure:10798: checking whether the Boost::Filesystem library is available
    configure:10822: g++ -c -O2 -Wall -g -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter  -Wstack-protector -fPIE -fno-stack-protector -fstack-protector-all  -DBOOST_SPIRIT_THREADSAFE -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS  -D_FORTIFY_SOURCE=2 -I/usr/include conftest.cpp >&5
    configure:10822: $? = 0
    configure:10836: result: yes
    configure:10993: error: Could not link against boost_system !
    

    git bisect located the problem commit as being efdfee423f23df88ffa4b846e4522419fb081ce1

  2. gmaxwell commented at 8:41 PM on December 13, 2013: contributor

    I think you're just missing one of the boost devel libraries. perhaps a "boost test" one?

    If so, the instructions just need to be updated.

  3. jgarzik commented at 8:43 PM on December 13, 2013: contributor

    @gmaxwell Seems unlikely: All builds work fine up until precisely the commit described in this issue. This is my daily bitcoin builder and workstation.

  4. theuni commented at 11:21 PM on December 13, 2013: member

    Ok, I see the problem here. Hold on for the ride, this is messy.

    From @jgarzik on irc (i'm assuming this is a subset of the result of a 'dpkg -l libboost*'):

    rc  libboost-system1.49.0                     1.49.0-4                                amd64        Operating system (e.g. diagnostics support) library
    ii  libboost-system1.53.0:amd64               1.53.0-6+exp3ubuntu8                    amd64        Operating system (e.g. diagnostics support) library
    ii  libboost-system1.54-dev                   1.54.0-2ubuntu3                         amd64        Operating system (e.g. diagnostics support) library
    ii  libboost-system1.54.0                     1.54.0-2ubuntu3                         amd64        Operating system (e.g. diagnostics support) library
    ii  libboost1.54-all-dev                      1.54.0-2ubuntu3                         amd64        Boost C++ Libraries development files (ALL)
    
    1. libboost-system1.49.0 has the reinst-required flag. Busted during upgrade?
    2. libboost1.54-all-dev is not the default boost for Saucy.
    • libboost-all-dev is a virtual package that installs the default recommended version, which is 1.5.3. See here: http://packages.ubuntu.com/saucy/libboost-all-dev
    • libboost1.54-all-dev can be installed directly, overriding the virtual. Apparently that was done here.

    Here's the fun part. Compare: http://packages.ubuntu.com/saucy/amd64/libboost-filesystem1.53-dev/filelist and http://packages.ubuntu.com/saucy/amd64/libboost-filesystem1.54-dev/filelist

    1.54 does not use a multi-arch layout while 1.53 does. I'd say that's a bug/accident. It seems this was fixed in Trusty: http://packages.ubuntu.com/trusty/amd64/libboost-filesystem1.54-dev/filelist

    Assumptions we make while looking for boost:

    • We assume that given /usr/lib/libboost_system.so and /usr/lib/x86_64-linux-gnu/libboost_system.so, the latter is the one we want since it's the more recent layout. This matches the linker's search order (gcc -print-search-dirs to verify), so it's (imo) the only sane option.
    • We assume that all boost libs live in the same place, unless --with-boost-foo is used to specify otherwise.

    I think those are reasonable assumptions.

    So the scenario where things would break would be: /usr/lib/x86_64-linux-gnu/libboost_system.* exists (boost-system 1.53) /usr/lib/x86_64-linux-gnu/libboost_filesystem does not exist. (boost-all 1.54 and not boost-filesystem 1.53)

    My guess is that 1.54 is fully installed, but 1.53 isn't. 1.53 takes precedence in this case since it uses the new layout as opposed to the buggy 1.54.

    Installing libboost1.53-all-dev or removing all remaining libboost1.53-* should fix i think. If so, we can just chalk it up to the combo of an Ubuntu bug and a local issue.

  5. laanwj commented at 1:31 PM on December 14, 2013: member

    Darn, messy doesn't even begin to describe it. Nothing but problems with Ubuntu 13.10... @theuni I'd also say that your assumptions are reasonable.

    I wonder how @jgarzik's machine got in this "inconsistent" state, maybe through a sequence of updates? Is this likely to happen to others? Should we update the documentation to mention it?

  6. theuni commented at 3:31 PM on December 14, 2013: member

    @laanwj The above is just an educated guess based on what I've been given, so let's not take it as fact. I think it should be enough for @jgarzik to fill in what's really going on though. If the above pans out, it may be a good idea to update the docs to mention avoiding libboost1.54-all-dev on Saucy, since, if nothing else, it's inconsistent with all other versions going forward.

  7. jgarzik commented at 6:33 PM on December 16, 2013: contributor

    Looks like the answer is "don't cross the streams" Works when 1.53 or 1.54 packages are installed. Does not work when a stray version X package is installed, in the presence of majority version Y packages.

  8. jgarzik closed this on Dec 16, 2013

  9. MarcoFalke 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-04-20 00:15 UTC

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