Can’t compile bitcoin for SmartOS - recipe for target ’leveldb/util/leveldb_libleveldb_a-env_posix.o’ failed #13585

issue stacepellegrino openend this issue on July 2, 2018
  1. stacepellegrino commented at 0:56 am on July 2, 2018: none

    After fixing #13581 my build still fails with…

     0leveldb/util/env_posix.cc: In member function 'virtual leveldb::Status leveldb::{anonymous}::PosixSequentialFile::Read(std::size_t, leveldb::Slice*, char*)':
     1leveldb/util/env_posix.cc:105:51: error: 'fread_unlocked' was not declared in this scope
     2     size_t r = fread_unlocked(scratch, 1, n, file_);
     3                                                   ^
     4leveldb/util/env_posix.cc: In member function 'virtual leveldb::Status leveldb::{anonymous}::PosixWritableFile::Append(const leveldb::Slice&)':
     5leveldb/util/env_posix.cc:234:66: error: 'fwrite_unlocked' was not declared in this scope
     6     size_t r = fwrite_unlocked(data.data(), 1, data.size(), file_);
     7                                                                  ^
     8leveldb/util/env_posix.cc: In member function 'virtual leveldb::Status leveldb::{anonymous}::PosixWritableFile::Flush()':
     9leveldb/util/env_posix.cc:251:30: error: 'fflush_unlocked' was not declared in this scope
    10     if (fflush_unlocked(file_) != 0) {
    11                              ^
    12leveldb/util/env_posix.cc: In member function 'virtual leveldb::Status leveldb::{anonymous}::PosixWritableFile::Sync()':
    13leveldb/util/env_posix.cc:290:30: error: 'fflush_unlocked' was not declared in this scope
    14     if (fflush_unlocked(file_) != 0 ||
    15                              ^
    16Makefile:5044: recipe for target 'leveldb/util/leveldb_libleveldb_a-env_posix.o' failed
    17make[2]: *** [leveldb/util/leveldb_libleveldb_a-env_posix.o] Error 1
    18make[2]: Leaving directory '/opt/local/src/bitcoin/src'
    19Makefile:9824: recipe for target 'all-recursive' failed
    20make[1]: *** [all-recursive] Error 1
    21make[1]: Leaving directory '/opt/local/src/bitcoin/src'
    22Makefile:757: recipe for target 'all-recursive' failed
    23make: *** [all-recursive] Error 1
    
  2. stacepellegrino commented at 1:00 am on July 2, 2018: none

    My compiler build details (POSIX threads enabled)…

    0# g++ -v
    1Using built-in specs.
    2COLLECT_GCC=/opt/local/gcc49/bin/g++
    3COLLECT_LTO_WRAPPER=/opt/local/gcc49/libexec/gcc/x86_64-sun-solaris2.11/4.9.3/lto-wrapper
    4Target: x86_64-sun-solaris2.11
    5Configured with: ../gcc-4.9.3/configure --enable-languages='c obj-c++ objc go fortran c++' --enable-shared --enable-long-long --with-local-prefix=/opt/local --enable-libssp --enable-threads=posix --with-boot-ldflags='-static-libstdc++ -static-libgcc -Wl,-R/opt/local/lib ' --disable-nls --with-gxx-include-dir=/opt/local/gcc49/include/c++/ --without-gnu-ld --with-ld=/usr/bin/ld --with-gnu-as --with-as=/opt/local/bin/gas --prefix=/opt/local/gcc49 --build=x86_64-sun-solaris2.11 --host=x86_64-sun-solaris2.11 --infodir=/opt/local/gcc49/info --mandir=/opt/local/gcc49/man
    6Thread model: posix
    7gcc version 4.9.3 (GCC) 
    
  3. Empact commented at 2:44 am on July 2, 2018: member
    @stacepellegrino Could you also try building leveldb master, and open this against them if it fails: https://github.com/google/leveldb/
  4. stacepellegrino commented at 6:23 am on July 2, 2018: none

    leveldb requires cmake and the pre-build pkgsrc binaries distributed for SmartOS was under the version requirement. Howver, cloned latest cmake from GitHub and built the latest leveldb master without issue.

    NOTE: This is the relevant cmake output…

    0
    1...
    2[ 23%] Building CXX object CMakeFiles/leveldb.dir/util/env_posix.cc.o
    3...
    4Scanning dependencies of target env_posix_test
    5[ 28%] Building CXX object CMakeFiles/env_posix_test.dir/util/testharness.cc.o
    6[ 28%] Building CXX object CMakeFiles/env_posix_test.dir/util/testutil.cc.o
    7[ 29%] Building CXX object CMakeFiles/env_posix_test.dir/util/env_posix_test.cc.o
    8[ 30%] Linking CXX executable env_posix_test
    9[ 30%] Built target env_posix_test
    
  5. MarcoFalke commented at 6:59 pm on July 9, 2018: member
  6. Empact commented at 6:40 am on July 10, 2018: member
    @stacepellegrino could you post the full log output including configure?
  7. stacepellegrino commented at 2:36 pm on July 10, 2018: none
    The original SmartOS build instance I had has now been destroyed. I had numerous other problems compiling other coins, e.g. Ethereum. I decided to use Linux instead of SmartOS for my blockchain daemons and data in the end. You can get SmartOS for free and install it under a Solaris configuration in VirtualBox to set-up a build environment to try and reproduce/fix this.
  8. Empact commented at 2:42 pm on July 10, 2018: member
    Yeah I tried and had many problems as well. Seems there are environment issues in the mix.
  9. Empact commented at 2:54 pm on July 10, 2018: member

    My current failure point, fwiw

     0# ./configure --with-gui=no --disable-tests  --disable-wallet --disable-pic --disable-shared
     1...
     2checking for boostlib >= 1.47.0... yes
     3checking whether the Boost::System library is available... yes
     4checking for exit in -lboost_system... yes
     5checking whether the Boost::Filesystem library is available... no
     6checking whether the Boost::Program_Options library is available... yes
     7checking for exit in -lboost_program_options... yes
     8checking whether the Boost::Thread library is available... no
     9checking whether the Boost::Chrono library is available... yes
    10checking for exit in -lboost_chrono... yes
    11checking for mismatched boost c++11 scoped enums... ok
    12configure: error: No working boost sleep implementation found.
    13
    14# pkgin search boost
    15p5-Type-Tiny-XS-0.012  XS boost for some of Type::Tiny's type constraints
    16boost-python-1.57.0 = Free, peer-reviewed portable C++ source libraries (Boost.Python binary library)
    17boost-libs-1.57.0 =  Free, peer-reviewed portable C++ source libraries (binary libraries)
    18boost-jam-1.57.0 =   Free, peer-reviewed portable C++ source libraries (Boost.Jam utility)
    19boost-headers-1.57.0 = Free, peer-reviewed portable C++ source libraries (build-time headers)
    20boost-docs-1.57.0 =  Free, peer-reviewed portable C++ source libraries (documentation)
    21boost-build-1.57.0 = Free, peer-reviewed portable C++ source libraries (Boost.Build framework)
    22boost-1.57.0 =       Free, peer-reviewed portable C++ source libraries
    23
    24=: package is installed and up-to-date
    25<: package is installed but newer version is available
    26>: installed package has a greater version than available package
    
  10. MarcoFalke commented at 2:59 pm on July 10, 2018: member
    You could try building from depends for now?
  11. Empact commented at 3:00 am on July 11, 2018: member

    @MarcoFalke thanks for the suggestion! Output:

     0[bitcoin/depends]# make
     1Makefile:72: hosts/solaris2.11.mk: No such file or directory
     2Makefile:74: builders/solaris2.11.mk: No such file or directory
     3/bin/sh: line 1: Makefile: not found
     4/bin/sh: syntax error at line 1: `|' unexpected
     5/bin/sh: line 1: Makefile: not found
     6/bin/sh: syntax error at line 1: `|' unexpected
     7/bin/sh: line 1: Makefile: not found
     8/bin/sh: syntax error at line 1: `|' unexpected
     9/bin/sh: line 1: Makefile: not found
    10/bin/sh: syntax error at line 1: `|' unexpected
    11/bin/sh: line 1: Makefile: not found
    12/bin/sh: syntax error at line 1: `|' unexpected
    13/bin/sh: line 1: Makefile: not found
    14/bin/sh: syntax error at line 1: `|' unexpected
    15/bin/sh: line 1: Makefile: not found
    16/bin/sh: syntax error at line 1: `|' unexpected
    17/bin/sh: line 1: Makefile: not found
    18/bin/sh: syntax error at line 1: `|' unexpected
    19/bin/sh: line 1: Makefile: not found
    20/bin/sh: syntax error at line 1: `|' unexpected
    21/bin/sh: line 1: Makefile: not found
    22/bin/sh: syntax error at line 1: `|' unexpected
    23/bin/sh: syntax error at line 1: `|' unexpected
    24/bin/sh: syntax error at line 1: `|' unexpected
    25/bin/sh: syntax error at line 1: `|' unexpected
    26/bin/sh: syntax error at line 1: `|' unexpected
    27/bin/sh: syntax error at line 1: `|' unexpected
    28/bin/sh: syntax error at line 1: `|' unexpected
    29/bin/sh: syntax error at line 1: `|' unexpected
    30/bin/sh: syntax error at line 1: `|' unexpected
    31/bin/sh: syntax error at line 1: `|' unexpected
    32/bin/sh: syntax error at line 1: `|' unexpected
    33make: config.site.in: Command not found
    34/bin/sh: syntax error at line 1: `|' unexpected
    35make: config.site.in: Command not found
    36/bin/sh: syntax error at line 1: `|' unexpected
    37make: *** No rule to make target 'builders/solaris2.11.mk'.  Stop.
    
  12. theuni commented at 6:50 pm on July 13, 2018: member

    This should fix the leveldb build failure:

     0diff --git a/configure.ac b/configure.ac
     1index 95acd2bd86..19376f48c2 100644
     2--- a/configure.ac
     3+++ b/configure.ac
     4@@ -498,6 +498,9 @@ case $host in
     5    *netbsd*)
     6      LEVELDB_TARGET_FLAGS="-DOS_NETBSD"
     7      ;;
     8+   *solaris*)
     9+     LEVELDB_TARGET_FLAGS="-DOS_SOLARIS"
    10+     ;;
    11    *)
    12      OTHER_OS=`echo ${host_os} | awk '{print toupper($0)}'`
    13      AC_MSG_WARN([Guessing LevelDB OS as OS_${OTHER_OS}, please check whether this is correct, if not add an entry to configure.ac.])
    

    @stacepellegrino If you can confirm the fix, I’ll PR it.

  13. MarcoFalke commented at 7:38 pm on July 13, 2018: member
    Can confirm that bitcoind compiles on SmartOS with your patch. Didn’t check anything else.
  14. theuni commented at 8:06 pm on July 13, 2018: member
    @MarcoFalke thanks!
  15. sipa closed this on Jul 14, 2018

  16. sipa referenced this in commit 90b1c7e5c5 on Jul 14, 2018
  17. PastaPastaPasta referenced this in commit 92a6550b4f on Jul 19, 2020
  18. PastaPastaPasta referenced this in commit db8327c2a8 on Jul 24, 2020
  19. PastaPastaPasta referenced this in commit a1c8cac741 on Jul 27, 2020
  20. UdjinM6 referenced this in commit e443c34ac1 on Jul 27, 2020
  21. UdjinM6 referenced this in commit 545d157d14 on Jul 27, 2020
  22. gades referenced this in commit 6ecfacd026 on Jun 26, 2021
  23. PastaPastaPasta referenced this in commit 727caa8d20 on Jun 27, 2021
  24. PastaPastaPasta referenced this in commit b8a2358812 on Jun 28, 2021
  25. PastaPastaPasta referenced this in commit 1aaa509013 on Jun 29, 2021
  26. DrahtBot locked this on Sep 8, 2021
  27. gades referenced this in commit f57fd8af69 on Mar 16, 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-11-21 18:12 UTC

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