macOS Mojave QT 5.11 compilation fails #14327

issue Sjors openend this issue on September 26, 2018
  1. Sjors commented at 12:49 pm on September 26, 2018: member

    It’s that time of the year again…

    Getting a bunch of compilation errors like this:

    • error: expected function body after function declarator inline uint qHash(const QPersistentModelIndex &index, uint seed) Q_DECL_NOTHROW
    • qabstractitemmodel.h:211:5: error: function-like macro 'QT_DEPRECATED_SINCE' is not defined

    Seen on master @ 4dac24db23. macOS 10.14, QT 5.11.1 via Homebrew. Upgrading from 5.11.1 to 5.11.2 with brew upgrade qt doesn’t help.

    Building depends also fails. I haven’t tried using cross-compiled depends.

    The signed gitian binary for v0.17.0rc4 does work and I’m not seeing strange behaviour.

    Suggest adding to 0.17 milestone. Imo either depends or regular Homebrew version should work, though not necessarily both.

  2. fanquake added the label macOS on Sep 26, 2018
  3. fanquake commented at 12:54 pm on September 26, 2018: member
    Some info here on Qt & 10.14 https://bugreports.qt.io/browse/QTBUG-68891. Hopefully there are just a couple patches we can add to depends.
  4. MarcoFalke added this to the milestone 0.17.1 on Sep 26, 2018
  5. Sjors commented at 9:03 pm on September 27, 2018: member

    The above was on my iMac. I also tried, after make distclean, on my Macbook and there everything is happy. Same macOS and QT version, same commit.

    Depends is throwing errors though, even though I did the usual #1360 gotcha dance.

    0In file included from libs/thread/src/pthread/thread.cpp:9:
    1In file included from ./boost/thread/detail/config.hpp:11:
    2In file included from ./boost/config.hpp:57:
    3In file included from ./boost/config/platform/macos.hpp:28:
    4./boost/config/posix_features.hpp:18:15: fatal error: 'unistd.h' file not found
    5#     include <unistd.h>
    6              ^~~~~~~~~~
    

    Anyone else (not) having this problem?

  6. fanquake commented at 5:01 am on September 28, 2018: member

    @Sjors If you install the system headers to /usr/include using this script /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg, depends compilation should start working again.

    See the Command Line Tools section of the Xcode 10 release notes - https://developer.apple.com/documentation/xcode_release_notes/xcode_10_release_notes - for why this is now required.

    We’ll have to address in the future (not right now, given that the workaround is still available), but I don’t think should block 0.17 cc @theuni

  7. jonasschnelli commented at 7:10 am on September 28, 2018: contributor

    I compiled master on a fresh macOS 10.14 (Mojave) installation two days ago. Followed the OSX compile guide. I only had to compile bdb4.8 on my own (homebews Berkeleydb-4,8 package did not compile).

    Build was with Qt5.11. Worked all fine.

    I haven’t tested depends (only using the depends compile system on linux).

  8. Sjors commented at 10:10 am on September 28, 2018: member

    @fanquake thanks, that worked, depends works for me now.

    QT also builds normally on my iMac now, so the bug was either because I forgot xcode-install --select, or because of what was installed by open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg @jonasschnelli I still had my existing berkeley-db@4 package which seemed to work. When I brew uninstall and then brew install it, compilation indeed fails. I installed the more recent bdb instead. Oddly enough the ./configure summary still shows -I/usr/local/Cellar/berkeley-db@4/4.8.30/include under CPPFLAGS even though that directory doesn’t exist. It results in warnings ld: warning: directory not found for option '-L/usr/local/Cellar/berkeley-db@4/4.8.30/lib', but compilation otherwise seems happy.

    I think we agreed during the IRC meeting yesterday this isn’t 0.17.0 release blocking.

  9. DesWurstes commented at 1:52 pm on September 29, 2018: contributor
    Homebrew has updated the formula. You can do brew install berkeley-db@4 now.
  10. Sjors commented at 11:53 am on September 30, 2018: member
    @DesWurstes thanks! berkeley-db@4 works for me now.
  11. theuni commented at 8:41 pm on October 1, 2018: member

    Hmm, there should be no need to use /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg, anything that fixes is likely a bug, especially in a depends build. Let’s hold off on recommending that for now.

    Sounds like we may need to teach depends how to find sdk paths on native MacOS.

  12. fanquake commented at 5:52 am on October 20, 2018: member
    Going to close this now, as compiling works fine. I’m going to roll a bunch of the outstanding macOS SDK type problems into a single issue, so we can get on top of any outstanding problems.
  13. fanquake closed this on Oct 20, 2018

  14. Sjors commented at 10:46 am on April 15, 2019: member
    Fwiw I had to use the macOS_SDK_headers_for_macOS workaround again today to get depends build working. See also #15819.
  15. MarcoFalke 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: 2024-12-18 21:12 UTC

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