OSX compile issue - configure: error: No working boost sleep implementation found. #11036

issue satindergrewal opened this issue on August 12, 2017
  1. satindergrewal commented at 3:21 PM on August 12, 2017: none

    I'm trying to compile it on my macbook pro and getting the error mentioned in title.

    I searched online and found linux users using --with-boost= in ./configure command with path. I tried the same but got same result.

    Please help me fix this issue.

    I have macOS 10.12.6 followed the build-osx doc till ./configure part.

    $ ./configure --without-gui --with-boost=/usr/local/Cellar/boost/1.64.0_1
    checking build system type... x86_64-apple-darwin16.7.0
    checking host system type... x86_64-apple-darwin16.7.0
    checking for a BSD-compatible install... /usr/local/bin/ginstall -c
    checking whether build environment is sane... yes
    checking for a thread-safe mkdir -p... /usr/local/bin/gmkdir -p
    checking for gawk... no
    checking for mawk... no
    checking for nawk... no
    checking for awk... awk
    checking whether make sets $(MAKE)... yes
    checking whether make supports nested variables... yes
    checking whether to enable maintainer-specific portions of Makefiles... yes
    checking whether make supports nested variables... (cached) yes
    checking for g++... g++
    checking whether the C++ compiler works... yes
    checking for C++ compiler default output file name... a.out
    checking for suffix of executables... 
    checking whether we are cross compiling... no
    checking for suffix of object files... o
    checking whether we are using the GNU C++ compiler... yes
    checking whether g++ accepts -g... yes
    checking for style of include used by make... GNU
    checking dependency style of g++... gcc3
    checking whether g++ supports C++11 features with -std=c++11... yes
    checking whether std::atomic can be used without link library... yes
    checking whether we are using the GNU Objective C++ compiler... yes
    checking whether g++ -std=c++11 accepts -g... yes
    checking dependency style of g++ -std=c++11... gcc3
    checking how to print strings... printf
    checking for gcc... gcc
    checking whether we are using the GNU C compiler... yes
    checking whether gcc accepts -g... yes
    checking for gcc option to accept ISO C89... none needed
    checking whether gcc understands -c and -o together... yes
    checking dependency style of gcc... gcc3
    checking for a sed that does not truncate output... /usr/bin/sed
    checking for grep that handles long lines and -e... /usr/bin/grep
    checking for egrep... /usr/bin/grep -E
    checking for fgrep... /usr/bin/grep -F
    checking for ld used by gcc... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
    checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no
    checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
    checking the name lister (/usr/bin/nm -B) interface... BSD nm
    checking whether ln -s works... yes
    checking the maximum length of command line arguments... 196608
    checking how to convert x86_64-apple-darwin16.7.0 file names to x86_64-apple-darwin16.7.0 format... func_convert_file_noop
    checking how to convert x86_64-apple-darwin16.7.0 file names to toolchain format... func_convert_file_noop
    checking for /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld option to reload object files... -r
    checking for objdump... objdump
    checking how to recognize dependent libraries... pass_all
    checking for dlltool... no
    checking how to associate runtime and link libraries... printf %s\n
    checking for ar... ar
    checking for archiver [@FILE](/bitcoin-bitcoin/contributor/file/) support... no
    checking for strip... strip
    checking for ranlib... ranlib
    checking command to parse /usr/bin/nm -B output from gcc object... ok
    checking for sysroot... no
    checking for a working dd... /bin/dd
    checking how to truncate binary pipes... /bin/dd bs=4096 count=1
    checking for mt... no
    checking if : is a manifest tool... no
    checking for dsymutil... dsymutil
    checking for nmedit... nmedit
    checking for lipo... lipo
    checking for otool... otool
    checking for otool64... no
    checking for -single_module linker flag... yes
    checking for -exported_symbols_list linker flag... yes
    checking for -force_load linker flag... yes
    checking how to run the C preprocessor... gcc -E
    checking for ANSI C header files... yes
    checking for sys/types.h... yes
    checking for sys/stat.h... yes
    checking for stdlib.h... yes
    checking for string.h... yes
    checking for memory.h... yes
    checking for strings.h... yes
    checking for inttypes.h... yes
    checking for stdint.h... yes
    checking for unistd.h... yes
    checking for dlfcn.h... yes
    checking for objdir... .libs
    checking if gcc supports -fno-rtti -fno-exceptions... yes
    checking for gcc option to produce PIC... -fno-common -DPIC
    checking if gcc PIC flag -fno-common -DPIC works... yes
    checking if gcc static flag -static works... no
    checking if gcc supports -c -o file.o... yes
    checking if gcc supports -c -o file.o... (cached) yes
    checking whether the gcc linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
    checking dynamic linker characteristics... darwin16.7.0 dyld
    checking how to hardcode library paths into programs... immediate
    checking whether stripping libraries is possible... yes
    checking if libtool supports shared libraries... yes
    checking whether to build shared libraries... yes
    checking whether to build static libraries... yes
    checking how to run the C++ preprocessor... g++ -std=c++11 -E
    checking for ld used by g++ -std=c++11... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
    checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no
    checking whether the g++ -std=c++11 linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
    checking for g++ -std=c++11 option to produce PIC... -fno-common -DPIC
    checking if g++ -std=c++11 PIC flag -fno-common -DPIC works... yes
    checking if g++ -std=c++11 static flag -static works... no
    checking if g++ -std=c++11 supports -c -o file.o... yes
    checking if g++ -std=c++11 supports -c -o file.o... (cached) yes
    checking whether the g++ -std=c++11 linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
    checking dynamic linker characteristics... darwin16.7.0 dyld
    checking how to hardcode library paths into programs... immediate
    checking for ar... /usr/bin/ar
    checking for ranlib... /usr/bin/ranlib
    checking for strip... /usr/bin/strip
    checking for gcov... /usr/bin/gcov
    checking for lcov... no
    checking for python3.6... no
    checking for python3.5... no
    checking for python3.4... no
    checking for python3... no
    checking for python2.7... /usr/local/bin/python2.7
    checking for genhtml... no
    checking for git... /usr/local/bin/git
    checking for ccache... no
    checking for xgettext... no
    checking for hexdump... /usr/bin/hexdump
    checking for readelf... no
    checking for c++filt... /usr/bin/c++filt
    checking for objcopy... no
    checking whether C++ compiler accepts -Werror... yes
    checking whether C++ compiler accepts -Wall... yes
    checking whether C++ compiler accepts -Wextra... yes
    checking whether C++ compiler accepts -Wformat... yes
    checking whether C++ compiler accepts -Wvla... yes
    checking whether C++ compiler accepts -Wformat-security... yes
    checking whether C++ compiler accepts -Wunused-parameter... yes
    checking whether C++ compiler accepts -Wself-assign... yes
    checking whether C++ compiler accepts -Wunused-local-typedef... yes
    checking whether C++ compiler accepts -Wdeprecated-register... yes
    checking whether C++ compiler accepts -Wimplicit-fallthrough... yes
    checking whether C++ compiler accepts -msse4.2... yes
    checking for assembler crc32 support... yes
    checking for port... no
    checking for rsvg-convert... /usr/local/bin/rsvg-convert
    checking for brew... brew
    checking whether the linker accepts -Wl,-headerpad_max_install_names... yes
    checking for pkg-config... /usr/local/bin/pkg-config
    checking pkg-config is at least version 0.9.0... yes
    checking whether byte ordering is bigendian... no
    checking whether gcc is Clang... yes
    checking whether Clang needs flag to prevent "argument unused" warning when linking with -pthread... -Qunused-arguments
    checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
    checking whether more special flags are required for pthreads... no
    checking for PTHREAD_PRIO_INHERIT... yes
    checking for special C compiler options needed for large files... no
    checking for _FILE_OFFSET_BITS value needed for large files... no
    checking whether strerror_r is declared... yes
    checking for strerror_r... yes
    checking whether strerror_r returns char *... no
    checking whether the linker accepts -Wl,--large-address-aware... no
    checking for __attribute__((visibility))... no
    checking for __attribute__((dllexport))... no
    checking for __attribute__((dllimport))... no
    checking for library containing clock_gettime... none required
    checking whether C++ compiler accepts -fPIC... yes
    checking whether C++ compiler accepts -Wstack-protector... yes
    checking whether C++ compiler accepts -fstack-protector-all... yes
    checking whether C++ preprocessor accepts -D_FORTIFY_SOURCE=2... yes
    checking whether C++ preprocessor accepts -U_FORTIFY_SOURCE... yes
    checking whether the linker accepts -Wl,--dynamicbase... no
    checking whether the linker accepts -Wl,--nxcompat... no
    checking whether the linker accepts -Wl,--high-entropy-va... no
    checking whether the linker accepts -Wl,-z,relro... no
    checking whether the linker accepts -Wl,-z,now... no
    checking whether C++ compiler accepts -fPIE... yes
    checking whether the linker accepts -pie... yes
    checking whether the linker accepts -Wl,-dead_strip... yes
    checking endian.h usability... no
    checking endian.h presence... no
    checking for endian.h... no
    checking sys/endian.h usability... no
    checking sys/endian.h presence... no
    checking for sys/endian.h... no
    checking byteswap.h usability... no
    checking byteswap.h presence... no
    checking for byteswap.h... no
    checking stdio.h usability... yes
    checking stdio.h presence... yes
    checking for stdio.h... yes
    checking for stdlib.h... (cached) yes
    checking for unistd.h... (cached) yes
    checking for strings.h... (cached) yes
    checking for sys/types.h... (cached) yes
    checking for sys/stat.h... (cached) yes
    checking sys/select.h usability... yes
    checking sys/select.h presence... yes
    checking for sys/select.h... yes
    checking sys/prctl.h usability... no
    checking sys/prctl.h presence... no
    checking for sys/prctl.h... no
    checking whether strnlen is declared... yes
    checking whether daemon is declared... yes
    checking whether le16toh is declared... no
    checking whether le32toh is declared... no
    checking whether le64toh is declared... no
    checking whether htole16 is declared... no
    checking whether htole32 is declared... no
    checking whether htole64 is declared... no
    checking whether be16toh is declared... no
    checking whether be32toh is declared... no
    checking whether be64toh is declared... no
    checking whether htobe16 is declared... no
    checking whether htobe32 is declared... no
    checking whether htobe64 is declared... no
    checking whether bswap_16 is declared... no
    checking whether bswap_32 is declared... no
    checking whether bswap_64 is declared... no
    checking whether __builtin_clz is declared... no
    checking whether __builtin_clzl is declared... no
    checking whether __builtin_clzll is declared... no
    checking for MSG_NOSIGNAL... no
    checking for MSG_DONTWAIT... yes
    checking for getmemoryinfo... no
    checking for mallopt M_ARENA_MAX... no
    checking for visibility attribute... yes
    checking for Linux getrandom syscall... no
    checking for getentropy... no
    checking for getentropy via random.h... yes
    checking for sysctl KERN_ARND... no
    checking for Berkeley DB C++ headers... default
    checking for main in -ldb_cxx-4.8... yes
    checking miniupnpc/miniwget.h usability... yes
    checking miniupnpc/miniwget.h presence... yes
    checking for miniupnpc/miniwget.h... yes
    checking for main in -lminiupnpc... yes
    checking miniupnpc/miniupnpc.h usability... yes
    checking miniupnpc/miniupnpc.h presence... yes
    checking for miniupnpc/miniupnpc.h... yes
    checking for main in -lminiupnpc... (cached) yes
    checking miniupnpc/upnpcommands.h usability... yes
    checking miniupnpc/upnpcommands.h presence... yes
    checking for miniupnpc/upnpcommands.h... yes
    checking for main in -lminiupnpc... (cached) yes
    checking miniupnpc/upnperrors.h usability... yes
    checking miniupnpc/upnperrors.h presence... yes
    checking for miniupnpc/upnperrors.h... yes
    checking for main in -lminiupnpc... (cached) yes
    checking whether to build Bitcoin Core GUI... no (Qt)
    checking for boostlib >= 1.47.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
    checking for exit in -lboost_program_options-mt... yes
    checking whether the Boost::Thread library is available... yes
    checking for exit in -lboost_thread-mt... yes
    checking whether the Boost::Chrono library is available... yes
    checking for exit in -lboost_chrono-mt... yes
    checking whether the Boost::Unit_Test_Framework library is available... yes
    checking for dynamic linked boost test... yes
    checking for mismatched boost c++11 scoped enums... ok
    configure: error: No working boost sleep implementation found.
    satinder$ make
    make: *** No targets specified and no makefile found.  Stop.
    satinder$ 
    

    Thanks

  2. hodlbirb commented at 6:22 PM on August 12, 2017: none

    @satindergrewal Would you kindly enlighten to provide a Bitcoin release version which you tried to build or did you clone directly from Master branch?

  3. satindergrewal commented at 6:31 PM on August 12, 2017: none

    just cloned master branch

  4. hodlbirb commented at 7:49 PM on August 12, 2017: none

    @satindergrewal Have you tried to follow in steps described in this resource https://github.com/bitcoin/bitcoin/blob/master/doc/build-osx.md?

  5. jonasschnelli commented at 7:57 PM on August 12, 2017: contributor

    Strange. I just compiled with the same setup (boost 1.64.0_1). Can you post your config.log? Have you done a fresh checkout (otherwise try ./autogen.sh first)?

  6. jonasschnelli added the label MacOSX on Aug 14, 2017
  7. fanquake commented at 5:11 AM on November 7, 2017: member

    Please re-open if you can reproduce with current master, and post a config.log.

  8. fanquake closed this on Nov 7, 2017

  9. stefanmedack commented at 11:07 PM on January 6, 2018: none

    Having the same problem as described above, I just found this issue and also a solution for my particular problem: for some reason installing boost with brew did install boost successfully, but did not link it. So I could fix the error with brew link boost.

    Maybe it helps other people stumbling upon this issue.

  10. luolinae86 commented at 2:59 AM on July 25, 2018: none

    brew install boost

  11. Sjors commented at 11:18 AM on February 1, 2019: member

    Encountered the same error on macOS 10.14.3 on master (post #15043 merge).

    brew reinstall boost didn't help, and it was already linked and installed (version 1.68).

    Also I believe the instructions should suggest afl-clang for macOS instead of afl-gcc / afl-g++ in configure, at least that's what the log errors suggested (cc @MarcoFalke):

    ./configure --disable-ccache --with-miniupnpc=no  --with-incompatible-bdb --without-bip70 --disable-shared --enable-tests --enable-fuzz CC=${AFLPATH}/afl-clang CXX=/Users/bitcoin/dev/afl-2.52b/afl-clang
    

    Attached config.log config.log, possibly relevant section:

    |   #if BOOST_VERSION >= 105000 && (!defined(BOOST_HAS_NANOSLEEP) || BOOST_VERSION >= 105200)
    |       boost::this_thread::sleep_for(boost::chrono::milliseconds(0));
    |   #else
    |    choke me
    |   #endif
    | 
    |   ;
    |   return 0;
    | }
    configure:30755: /Users/bitcoin/dev/afl-2.52b/afl-clang -std=c++11 -o conftest -g -O2  -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS -I/usr/local/Cellar/berkeley-db@4/4.8.30/include -DMAC_OSX -DBOOST_SP_USE_STD_ATOMIC -DBOOST_AC_USE_STD_ATOMIC -pthread -I/usr/local/include  -Wl,-headerpad_max_install_names -Wl,-dead_strip conftest.cpp -L/usr/local/lib -lboost_system -lboost_filesystem -lboost_thread-mt -lboost_chrono-mt  -L/usr/local/Cellar/berkeley-db@4/4.8.30/lib >&5
    conftest.cpp:79:4: error: unknown type name 'choke'
       choke me
       ^
    1 error generated.
    

    Perhaps this is the wrong way of switching to clang and that in turn causes the configure check to fail, in a way that has nothing to do with boost?

  12. Sjors commented at 11:25 AM on February 1, 2019: member

    I also tried the libFuzzer route explained in the doc, though the instructions aren't very clear.

    clang --version
    Apple LLVM version 10.0.0 (clang-1000.11.45.5)
    Target: x86_64-apple-darwin18.2.0
    Thread model: posix
    InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
    
    ./configure --disable-ccache --with-miniupnpc=no  --with-incompatible-bdb --without-bip70 --disable-shared --enable-tests --enable-fuzz --with-sanitizers=fuzzer,address CC=clang CXX=clang++
    

    Fails with:

    configure:18954: checking whether C++ compiler accepts -fsanitize=fuzzer,address
    configure:18973: clang++ -std=c++11 -c -g -O2  -fsanitize=fuzzer,address  conftest.cpp >&5
    configure:18973: $? = 0
    configure:18982: result: yes
    configure:18997: checking whether the linker accepts -fsanitize=fuzzer,address
    configure:19021: clang++ -std=c++11 -o conftest -g -O2    -fsanitize=fuzzer,address conftest.cpp  >&5
    ld: file not found: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/10.0.0/lib/darwin/libclang_rt.fuzzer_osx.a
    
  13. MarcoFalke commented at 2:06 PM on February 1, 2019: member

    @Sjors libfuzzer is not available on macos clang, I believe.

    Maybe "choke me" should be replaced with #error for clarity?

  14. DrahtBot locked this on Dec 16, 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-21 18:15 UTC

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