- Bitcoin 0.12.1
- Ubuntu 16.04 (armhf)
- libboost 1.58.0.1
- gcc 4.9
My configure command:
./configure LDFLAGS="-L${BDB_PREFIX}/lib/" CPPFLAGS="-I${BDB_PREFIX}/include/" \
--disable-install-doc --without-tests --without-gui --disable-shared \
CXXFLAGS="--param ggc-min-expand=1 --param ggc-min-heapsize=32768"
My gcc:
# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/4.9/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.9.3-13ubuntu2' --with-bugurl=file:///usr/share/doc/gcc-4.9/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.9 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.9 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libitm --disable-libquadmath --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.9-armhf/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.9-armhf --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.9-armhf --with-arch-directory=arm --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --enable-multilib --disable-sjlj-exceptions --with-arch=armv7-a --with-fpu=vfpv3-d16 --with-float=hard --with-mode=thumb --disable-werror --enable-multilib --enable-checking=release --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf
Thread model: posix
gcc version 4.9.3 (Ubuntu/Linaro 4.9.3-13ubuntu2)
I run make (-j1) and hit this error. It's a freshly installed system (< 24h) without signs of filesystem corruption.
CXXLD bitcoind
libbitcoin_server.a(libbitcoin_server_a-init.o): In function `boost::filesystem::path::path<boost::filesystem::directory_entry>(boost::filesystem::directory_entry const&, boost::enable_if<boost::filesystem::path_traits::is_pathable<boost::decay<boost::filesystem::directory_entry>::type>, void>::type*)':
init.cpp:(.text._ZN5boost10filesystem4pathC2INS0_15directory_entryEEERKT_PNS_9enable_ifINS0_11path_traits11is_pathableINS_5decayIS4_E4typeEEEvE4typeE[_ZN5boost10filesystem4pathC5INS0_15directory_entryEEERKT_PNS_9enable_ifINS0_11path_traits11is_pathableINS_5decayIS4_E4typeEEEvE4typeE]+0x26): undefined reference to `boost::filesystem::path_traits::dispatch(boost::filesystem::directory_entry const&, std::string&)'
libbitcoin_util.a(libbitcoin_util_a-util.o): In function `boost::program_options::detail::basic_config_file_iterator<char>::basic_config_file_iterator(std::istream&, std::set<std::string, std::less<std::string>, std::allocator<std::string> > const&, bool)':
util.cpp:(.text._ZN5boost15program_options6detail26basic_config_file_iteratorIcEC2ERSiRKSt3setISsSt4lessISsESaISsEEb[_ZN5boost15program_options6detail26basic_config_file_iteratorIcEC5ERSiRKSt3setISsSt4lessISsESaISsEEb]+0x22): undefined reference to `boost::program_options::detail::common_config_file_iterator::common_config_file_iterator(std::set<std::string, std::less<std::string>, std::allocator<std::string> > const&, bool)'
libbitcoin_util.a(libbitcoin_util_a-util.o): In function `boost::program_options::detail::basic_config_file_iterator<char>::getline(std::string&)':
util.cpp:(.text._ZN5boost15program_options6detail26basic_config_file_iteratorIcE7getlineERSs[_ZN5boost15program_options6detail26basic_config_file_iteratorIcE7getlineERSs]+0x64): undefined reference to `boost::program_options::to_internal(std::string const&)'
collect2: error: ld returned 1 exit status
Makefile:2801: recipe for target 'bitcoind' failed
make[2]: *** [bitcoind] Error 1
make[2]: Leaving directory '/blockchain/source/bitcoin-0.12.1/src'
Makefile:6959: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/blockchain/source/bitcoin-0.12.1/src'
Makefile:650: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
In similar cases (not with Bitcoin) some people missed to install libboost-program-options-dev but I installed it as per build-unix.md (for Ubuntu 14.04 as that's the closest version available).
sudo apt-get install libboost-program-options-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
libboost-program-options-dev is already the newest version (1.58.0.1ubuntu1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
After this issue I successfully cross-compiled (using Ubuntu 14.04 x86_64 for armhf) from the same source and it's been working fine on the same Ubuntu 16.04 armhf system that can't built natively.