1

I have done quite a few upgrades in the past and this has never happened before:

$ uname -a
Linux back 3.16.0-4-amd64 #1 SMP Debian 3.16.36-1+deb8u1 (2016-09-03) x86_64 GNU/Linux

$ git checkout v0.13.1
$ git fetch --all
$ ./autogen.sh
...
$ ./configure LDFLAGS="-L/home/me/bitcoin/db4/lib/" CPPFLAGS="-I/home/me/bitcoin/db4/include/"
...
$ make clean  # I have had issues in the past, always solved with clean target
...
$ make
...
AR       leveldb/libmemenv.a
CXXLD    bitcoind
libbitcoin_util.a(libbitcoin_util_a-util.o): In function `GetNumCores()':
/home/me/bitcoin/src/util.cpp:796: undefined reference to `boost::thread::physical_concurrency()'
collect2: error: ld returned 1 exit status
Makefile:3336: recipe for target 'bitcoind' failed
make[2]: *** [bitcoind] Error 1
make[2]: Leaving directory '/home/me/bitcoin/src'
Makefile:8357: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/me/bitcoin/src'
Makefile:668: recipe for target 'all-recursive' failed 
make: *** [all-recursive] Error 1

Does anyone have any suggestion of anything I could try out to resolve this?

EDIT: I can't even rebuild v0.13.0, so I have most likely messed up my system in relation to boost. Looking into that

EDIT2 (RESOLVED): cleaning up the boost install resolves the problem (make check passes all tests). Any Bitcoin enthusiast who still doesn't quite know what he is doing (like myself) will easily attempt to install various Bitcoin libraries and utilities (e.g. libbitcoin bx for C++) with boost dependencies and end up with various bits and pieces of the library everywhere (both /usr and /usr/local hierarchy as well as boost distribution packages on top of existing stuff in /usr/lib/x86_64-linux-gnu/). So I removed the distribution packages, cleaned up /usr/include/boost and /usr/lib/libboost_* (and the equivalent on /usr/local), left the gnu folder alone (libreoffice will break otherwise), and installed a clean copy of boost (on /usr/local hierarchy). One thing to remember, if anyone tries to experiment by moving around library files, you need to run ldconfig to update the cache for the linker I think. Things started to make sense after I did that.

EDIT3: for the sake of completeness, if I decide to install boost in the /usr/ hierarchy rather than /usr/local/, then the above build will also fail for some reason. However, replacing the line:

$ ./configure LDFLAGS="-L/home/me/bitcoin/db4/lib/" \
              CPPFLAGS="-I/home/me/bitcoin/db4/include/"

by:

$ ./configure LDFLAGS="-L/home/me/bitcoin/db4/lib/ -L/usr/lib" \
              CPPFLAGS="-I/home/me/bitcoin/db4/include/ -I/usr/include"

leads to a succesful build.

  • 3
    Try git clean -dfx (this will remove all build results and files not checked in, so you can start fresh). Also, what version of Boost do you have? – Pieter Wuille Oct 27 '16 at 22:05
  • Thank you very much ! I tried that. I retried after reinstalling boost 1.61. Same errors. Will keep looking. Thanks anyway !! – Sven Williamson Oct 28 '16 at 7:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.