Yet another build issue - Mac OS X - error: unknown type name 'atomic_flag' atomic_flag_clear #13595

issue stefek99 opened this issue on July 4, 2018
  1. stefek99 commented at 11:35 AM on July 4, 2018: none

    Goal: getting command line utility, analyse blockchain, learn more about transactions, analysis, everything...

    I'm following instructions from here: https://bitcoin.stackexchange.com/questions/43148/bitcoin-cli-not-found-on-osx


    When I run ./configure I ran into errors.

    configure: error: libdb_cxx headers missing, Bitcoin Core requires this library for wallet functionality (--disable-wallet to disable wallet functionality)

    Some Google searches:

    brew install berkeley-db4

    ==> ../dist/configure --disable-debug --prefix=/usr/local/Cellar/berkeley-db4/4.8.30 --mandir=/usr/local/Cellar/berkeley-db4/4.8.30/share/man --enable-cxx
    ==> make install
    Last 15 lines from /Users/ms/Library/Logs/Homebrew/berkeley-db4/02.make:
                                      ^
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/atomic:1789:28: error: unknown type name 'atomic_flag'
    atomic_flag_clear(volatile atomic_flag* __o) _NOEXCEPT
                               ^
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/atomic:1796:19: error: unknown type name 'atomic_flag'
    atomic_flag_clear(atomic_flag* __o) _NOEXCEPT
                      ^
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/atomic:1803:37: error: unknown type name 'atomic_flag'
    atomic_flag_clear_explicit(volatile atomic_flag* __o, memory_order __m) _NOEXCEPT
                                        ^
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/atomic:1810:28: error: unknown type name 'atomic_flag'
    atomic_flag_clear_explicit(atomic_flag* __o, memory_order __m) _NOEXCEPT
                               ^
    11 errors generated.
    make: *** [cxx_db.lo] Error 1
    
    READ THIS: https://git.io/brew-troubleshooting
    
    /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/open-uri.rb:359:in `open_http': 422 Unprocessable Entity (GitHub::Error)
    Validation Failed
    	from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/open-uri.rb:737:in `buffer_open'
    	from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/open-uri.rb:212:in `block in open_loop'
    	from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/open-uri.rb:210:in `catch'
    	from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/open-uri.rb:210:in `open_loop'
    	from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/open-uri.rb:151:in `open_uri'
    	from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/open-uri.rb:717:in `open'
    	from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/open-uri.rb:31:in `open'
    	from /usr/local/Library/Homebrew/utils.rb:523:in `open'
    	from /usr/local/Library/Homebrew/utils.rb:554:in `issues_matching'
    	from /usr/local/Library/Homebrew/utils.rb:586:in `issues_for_formula'
    	from /usr/local/Library/Homebrew/exceptions.rb:222:in `fetch_issues'
    	from /usr/local/Library/Homebrew/exceptions.rb:218:in `issues'
    	from /usr/local/Library/Homebrew/exceptions.rb:263:in `dump'
    	from /usr/local/Library/brew.rb:132:in `rescue in <main>'
    	from /usr/local/Library/brew.rb:28:in `<main>'
    

    I have Bitcoin Core aka Bitcoin-QT running, so actually I don't need to install wallet, tried: ./configure --disable-wallet;

    Now run into: configure: error: No working boost sleep implementation found.


    Somewhere found that I can run a commands like that:

    image

    /Applications/Bitcoin-Qt.app/Contents/MacOS/Bitcoin-Qt -version

    But it seems like a starting parameters, not if I want to get a block or transaction by hash...

  2. fanquake added the label macOS on Jul 4, 2018
  3. jonasschnelli commented at 1:36 PM on July 4, 2018: contributor

    Try to reinstall your packaged with brew (and eventually reinstall home-brew). Make sure you remove other package managers (check for fink, macports, etc.).

    Google a bit how to reinstall brew packages and check brew doctor

  4. stefek99 commented at 4:00 PM on July 4, 2018: none

    Still messing around with brew: https://github.com/Homebrew/brew/issues/4423

    That's why I prefer front-end development over command line build issues... :)

  5. stefek99 commented at 9:45 PM on July 4, 2018: none

    Didn't succeed with updating brew, I'm on my own...

    Tried this: https://stackoverflow.com/questions/46872922/broken-c-std-libraries-on-macos-high-sierra-10-13/47401866#

    I don't know: error: unknown type name 'atomic_flag'

    Me monkey, never was good at solving command line build issues.

  6. HashUnlimited commented at 6:12 AM on July 6, 2018: contributor

    why would you mix up dated stuff when the accurate build instructions are just around the corner?

    https://github.com/bitcoin/bitcoin/blob/master/doc/build-osx.md

    If they are working or not depends on your OSX though as most of the dependencies need to be tricked on versions < 10.11

  7. fanquake commented at 7:03 AM on July 21, 2018: member

    Going to close this, as it looks like your brew installation is broken. Once you've reinstalled/fixed that, and have installed all dependencies without error, if you're still having build issues, feel free to reopen this issue.

  8. fanquake closed this on Jul 21, 2018

  9. DrahtBot 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-21 18:15 UTC

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