[MacPorts] #55639: QtCore unusable with Apple LLVM version 9.0.0

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

[MacPorts] #55639: QtCore unusable with Apple LLVM version 9.0.0

MacPorts
#55639: QtCore unusable with Apple LLVM version 9.0.0
----------------------+---------------------
 Reporter:  janstary  |      Owner:
     Type:  defect    |     Status:  new
 Priority:  Normal    |  Milestone:
Component:  ports     |    Version:  2.4.99
 Keywords:            |       Port:  bitcoin
----------------------+---------------------
 Building bitcoin +gui fails for me on 10.13.2 with XCode 9.2
 The log (attached) says

 {{{
 :info:build /usr/bin/clang++ -std=c++11 -DHAVE_CONFIG_H -I.
 -I../src/config   -I. -I./obj -I/opt/local/include/db48/
 -DBOOST_SP_USE_STD_ATOMIC -DBOOST_AC_USE_STD_ATOMIC -pthread
 -I/opt/local/include -I./leveldb/include -I./leveldb/helpers/memenv
 -I./secp256k1/include -I./univalue/include -I./qt -I./qt -I./qt/forms
 -I./qt/forms -DQT_NO_KEYWORDS -I/opt/local/libexec/qt5/include/QtNetwork
 -I/opt/local/libexec/qt5/include
 -I/opt/local/libexec/qt5/include/QtWidgets
 -I/opt/local/libexec/qt5/include -I/opt/local/libexec/qt5/include/QtGui
 -I/opt/local/libexec/qt5/include -I/opt/local/libexec/qt5/include/QtCore
 -I/opt/local/libexec/qt5/include -D_THREAD_SAFE  -I/opt/local/include
 -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS -isystem /opt/local/include
 -I/opt/local/include/db48 -DMAC_OSX  -Werror=vla  -pipe -Os -stdlib=libc++
 -arch x86_64 -MT qt/qt_bitcoin_qt-bitcoin.o -MD -MP -MF qt/.deps
 /qt_bitcoin_qt-bitcoin.Tpo -c -o qt/qt_bitcoin_qt-bitcoin.o `test -f
 'qt/bitcoin.cpp' || echo './'`qt/bitcoin.cpp
 :info:build
 /opt/local/libexec/qt5/include/QtCore/qcompilerdetection.h:567:6: error:
 Qt requires a C++11 compiler and yours does not seem to be that.
 :info:build #    error Qt requires a C++11 compiler and yours does not
 seem to be that.
 }}}

 Looking at `QtCore/qcompilerdetection.h`:

 {{{
 #ifdef __cplusplus
 #  if __cplusplus < 201103L && !(defined(Q_CC_MSVC) && Q_CC_MSVC >= 1800)
 #    error Qt requires a C++11 compiler and yours does not seem to be
 that.
 #  endif
 #endif
 }}}

 My compiler is

 {{{
 $ c++ -v
 Apple LLVM version 9.0.0 (clang-900.0.39.2)
 Target: x86_64-apple-darwin17.3.0
 Thread model: posix
 InstalledDir:
 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
 }}}

 which is

 {{{
 $ clang++ -v
 Apple LLVM version 9.0.0 (clang-900.0.39.2)
 Target: x86_64-apple-darwin17.3.0
 Thread model: posix
 InstalledDir:
 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
 }}}

 which is

 {{{
 $ g++ -v
 Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr
 --with-gxx-include-dir=/usr/include/c++/4.2.1
 Apple LLVM version 9.0.0 (clang-900.0.39.2)
 Target: x86_64-apple-darwin17.3.0
 Thread model: posix
 InstalledDir:
 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
 }}}

 under whichever name.

 I am putting 'bitcoin' as the port here, because that's where it bit me,
 but perhaps this is a QtCore bug, or something more general with compiler
 detection.

--
Ticket URL: <https://trac.macports.org/ticket/55639>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #55639: QtCore unusable with Apple LLVM version 9.0.0

MacPorts
#55639: QtCore unusable with Apple LLVM version 9.0.0
-----------------------+--------------------
  Reporter:  janstary  |      Owner:
      Type:  defect    |     Status:  new
  Priority:  Normal    |  Milestone:
 Component:  ports     |    Version:  2.4.99
Resolution:            |   Keywords:
      Port:  bitcoin   |
-----------------------+--------------------
Changes (by janstary):

 * Attachment "main.log" added.

 the log log of the failed build

--
Ticket URL: <https://trac.macports.org/ticket/55639>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #55639: QtCore unusable with Apple LLVM version 9.0.0

MacPorts
In reply to this post by MacPorts
#55639: QtCore unusable with Apple LLVM version 9.0.0
-----------------------+--------------------
  Reporter:  janstary  |      Owner:
      Type:  defect    |     Status:  new
  Priority:  Normal    |  Milestone:
 Component:  ports     |    Version:  2.4.99
Resolution:            |   Keywords:
      Port:  bitcoin   |
-----------------------+--------------------
Changes (by ryandesign):

 * cc: MarcusCalhoun-Lopez (added)


Comment:

 Marcus, any idea why Qt would be claiming that a recent clang is not C++11
 capable?

--
Ticket URL: <https://trac.macports.org/ticket/55639#comment:1>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #55639: QtCore unusable with Apple LLVM version 9.0.0

MacPorts
In reply to this post by MacPorts
#55639: QtCore unusable with Apple LLVM version 9.0.0
-----------------------+------------------------
  Reporter:  janstary  |      Owner:  easieste@…
      Type:  defect    |     Status:  assigned
  Priority:  Normal    |  Milestone:
 Component:  ports     |    Version:  2.4.99
Resolution:            |   Keywords:
      Port:  bitcoin   |
-----------------------+------------------------
Changes (by ryandesign):

 * cc: sami.laine@… (added)
 * owner:   => easieste@…
 * status:  new => assigned


--
Ticket URL: <https://trac.macports.org/ticket/55639#comment:2>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #55639: QtCore unusable with Apple LLVM version 9.0.0

MacPorts
In reply to this post by MacPorts
#55639: QtCore unusable with Apple LLVM version 9.0.0
-----------------------+------------------------
  Reporter:  janstary  |      Owner:  easieste@…
      Type:  defect    |     Status:  assigned
  Priority:  Normal    |  Milestone:
 Component:  ports     |    Version:  2.4.99
Resolution:            |   Keywords:
      Port:  bitcoin   |
-----------------------+------------------------

Comment (by MarcusCalhoun-Lopez):

 Replying to [comment:1 ryandesign]:
 > Marcus, any idea why Qt would be claiming that a recent clang is not
 C++11 capable?
 This does not seem to be a Qt issue.[[BR]]
 The configure script for bitcoin adds {{{-std=c++11}}} the the c++
 compiler name ('''not''' the C++ compiler flags).[[BR]]
 It then uses the same compiler name for both C++ and Objective-C++ but
 '''only''' if OBJCXX is undefined.[[BR]]
 MacPorts, however defines OBJCXX.[[BR]]
 In the configure.ac file, there is the following comment
 {{{
 dnl Unless the user specified OBJCXX, force it to be the same as CXX. This
 ensures
 dnl that we get the same -std flags for both.
 }}}
 To make matters even stranger, the C++ and Objective-C++ flags are
 '''always''' the same.[[BR]]
 In the configure.ac file:
 {{{
 OBJCXXFLAGS="$CXXFLAGS"
 }}}

 There seem to be two options:
 1. Do not define OBJCXX so that the configure script figures it out for
 itself: {{{configure.objcxx}}}
 1. Manually do what the configure script does: {{{configure.objcxx-append
 -std=c++11}}}

 We could also modify {{{configure.cxxflags}}}, but this would mean
 {{{-std=c++11}}} would be added twice for the C++ compiler.

--
Ticket URL: <https://trac.macports.org/ticket/55639#comment:3>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #55639: QtCore unusable with Apple LLVM version 9.0.0

MacPorts
In reply to this post by MacPorts
#55639: QtCore unusable with Apple LLVM version 9.0.0
-----------------------+------------------------
  Reporter:  janstary  |      Owner:  easieste@…
      Type:  defect    |     Status:  assigned
  Priority:  Normal    |  Milestone:
 Component:  ports     |    Version:  2.4.99
Resolution:            |   Keywords:
      Port:  bitcoin   |
-----------------------+------------------------

Comment (by janstary):

 If the bitcoin ./configure adds {{{`-std=c++11}}} to the compiler _name_,
 as opposed to the flags, it's an upstream bug I believe
 (so the bitcoin keyword port is rightly assgned :-)

--
Ticket URL: <https://trac.macports.org/ticket/55639#comment:4>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #55639: QtCore unusable with Apple LLVM version 9.0.0

MacPorts
In reply to this post by MacPorts
#55639: QtCore unusable with Apple LLVM version 9.0.0
-----------------------+------------------------
  Reporter:  janstary  |      Owner:  easieste@…
      Type:  defect    |     Status:  assigned
  Priority:  Normal    |  Milestone:
 Component:  ports     |    Version:  2.4.99
Resolution:            |   Keywords:
      Port:  bitcoin   |
-----------------------+------------------------

Comment (by janstary):

 Note: with https://github.com/macports/macports-
 ports/commit/a95c4aca14422f13788f2151474e455b25a6fc34 ,
 it fails the same way.

--
Ticket URL: <https://trac.macports.org/ticket/55639#comment:5>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #55639: QtCore unusable with Apple LLVM version 9.0.0

MacPorts
In reply to this post by MacPorts
#55639: QtCore unusable with Apple LLVM version 9.0.0
-----------------------+------------------------
  Reporter:  janstary  |      Owner:  easieste@…
      Type:  defect    |     Status:  assigned
  Priority:  Normal    |  Milestone:
 Component:  ports     |    Version:  2.4.99
Resolution:            |   Keywords:
      Port:  bitcoin   |
-----------------------+------------------------

Comment (by Miguel Herranz <miguel@…>):

 In [changeset:"73b282ec9ad664c97b6ea08a4e67ca8d9ab3fc63/macports-ports"
 73b282ec9ad664c97b6ea08a4e67ca8d9ab3fc63/macports-ports]:
 {{{
 #!ConfigurableCommitTicketReference repository="macports-ports"
 revision="73b282ec9ad664c97b6ea08a4e67ca8d9ab3fc63"
 bitcoin: update to 0.16.0, fix issue

 * Update to version 0.16.0
 * Fix GUI build, https://trac.macports.org/ticket/55639
 }}}

--
Ticket URL: <https://trac.macports.org/ticket/55639#comment:6>
MacPorts <https://www.macports.org/>
Ports system for macOS