[MacPorts] #49299: akonadi build fails after qt4-mac update
#49299: akonadi build fails after qt4-mac update ------------------------+-------------------------------- Reporter: jwhowse4@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Keywords: | Port: akonadi ------------------------+-------------------------------- I am using an Intel Mac Pro running Mac OS 10.8.5 and XCode 5.1.1. After the upgrade of the qt4-mac package to 4.8.7_2 macports tried to rebuild the package akonadi because of a linking error. That build process fails and produces the attached error log. -- Ticket URL: <https://trac.macports.org/ticket/49299> MacPorts <https://www.macports.org/> Ports system for OS X
#49299: akonadi build fails after qt4-mac update -------------------------+--------------------- Reporter: jwhowse4@… | Owner: nicos@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: Port: akonadi | -------------------------+--------------------- Changes (by mf2k@…): * cc: nicos@… (removed) * owner: macports-tickets@… => nicos@… -- Ticket URL: <https://trac.macports.org/ticket/49299#comment:1> MacPorts <https://www.macports.org/> Ports system for OS X
#49299: akonadi build fails after qt4-mac update -------------------------+--------------------- Reporter: jwhowse4@… | Owner: nicos@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: Port: akonadi | -------------------------+--------------------- Comment (by michaelld@…): Here's the error: {{{ :info:build In file included from /Volumes/User_Disk/opt/macports/libexec/qt4/include/QtCore/qobject.h:50: :info:build /Volumes/User_Disk/opt/macports/libexec/qt4/include/QtCore/qlist.h:55:10: fatal error: 'initializer_list' file not found :info:build #include <initializer_list> :info:build ^ }}} I think that the issue is that qt4-mac was build with support for c++11 (directly via the +cxx11 variant or even just internally somehow), while akonadi is trying to build using c++0x; shouldn't make a difference, but clearly it does. "initializer_list" is c++11 or newer. What does "port installed qt4-mac" return for you? Did you update to Xcode 5.1 recently, such as after qt4-mac was last built? -- Ticket URL: <https://trac.macports.org/ticket/49299#comment:2> MacPorts <https://www.macports.org/> Ports system for OS X
#49299: akonadi build fails after qt4-mac update -------------------------+--------------------- Reporter: jwhowse4@… | Owner: nicos@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: Port: akonadi | -------------------------+--------------------- Comment (by jwhowse4@…): Replying to [comment:2 michaelld@…]:
Here's the error: {{{ :info:build In file included from /Volumes/User_Disk/opt/macports/libexec/qt4/include/QtCore/qobject.h:50: :info:build /Volumes/User_Disk/opt/macports/libexec/qt4/include/QtCore/qlist.h:55:10: fatal error: 'initializer_list' file not found :info:build #include <initializer_list> :info:build ^ }}}
I think that the issue is that qt4-mac was build with support for c++11 (directly via the +cxx11 variant or even just internally somehow), while akonadi is trying to build using c++0x; shouldn't make a difference, but clearly it does. "initializer_list" is c++11 or newer.
What does "port installed qt4-mac" return for you? Did you update to Xcode 5.1 recently, such as after qt4-mac was last built?
"port installed qt4-mac" returns "qt4-mac @4.8.7_2+odbc (active)". I installed XCode 5.1.1 some time ago, long before I updated the qt4-mac port. -- Ticket URL: <https://trac.macports.org/ticket/49299#comment:3> MacPorts <https://www.macports.org/> Ports system for OS X
#49299: akonadi build fails after qt4-mac update -------------------------+--------------------- Reporter: jwhowse4@… | Owner: nicos@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: Port: akonadi | -------------------------+--------------------- Comment (by michaelld@…): Do you have MacPorts gcc48 or newer installed? I think gcc5 is pretty much the standard by now for your OS. Could you try the following: {{{ sudo port clean akonadi sudo port install akonadi configure.compiler=macports-gcc-5 }}} (or "macports-gcc-4.8" for that version). If I recall, the default build on OS X 10.8 is to use libstdc++, which (for better or worse) when using clang as the compiler also uses Apple's installed gcc 4.2 C++ stuff. Which is not really c++0x compliant. Moving to using a reasonably modern GCC should do the trick here, I think. Should not really matter if qt4-mac was build using c++11 or not. -- Ticket URL: <https://trac.macports.org/ticket/49299#comment:4> MacPorts <https://www.macports.org/> Ports system for OS X
#49299: akonadi build fails after qt4-mac update -------------------------+--------------------- Reporter: jwhowse4@… | Owner: nicos@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: Port: akonadi | -------------------------+--------------------- Comment (by michaelld@…): If you're comfortable patching, then give this one a try. On your system it will use MacPorts GCC5 port for building. On my system, it forces the use of a C++11 Clang compiler, which in this case is just the Xcode clang. Here's what you'd need to do for testing: {{{ sudo port clean akonadi cd $(port dir akonadi) sudo patch -p0 < PATH_TO/akonadi_use_c++11.diff sudo port install akonadi }}} and see if it works. The "PATH_TO" is a path to the patch file. If it does, please report back & we'll figure out the best way to add something in that forces C++11. You can remove the patch via: {{{ cd $(port dir akonadi) sudo patch -R -p0 < PATH_TO/akonadi_use_c++11.diff }}} -- Ticket URL: <https://trac.macports.org/ticket/49299#comment:5> MacPorts <https://www.macports.org/> Ports system for OS X
#49299: akonadi build fails after qt4-mac update -------------------------+--------------------- Reporter: jwhowse4@… | Owner: nicos@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: Port: akonadi | -------------------------+--------------------- Comment (by jwhowse4@…): Replying to [comment:4 michaelld@…]:
Do you have MacPorts gcc48 or newer installed? I think gcc5 is pretty much the standard by now for your OS. Could you try the following: {{{ sudo port clean akonadi sudo port install akonadi configure.compiler=macports-gcc-5 }}} (or "macports-gcc-4.8" for that version).
If I recall, the default build on OS X 10.8 is to use libstdc++, which (for better or worse) when using clang as the compiler also uses Apple's installed gcc 4.2 C++ stuff. Which is not really c++0x compliant. Moving to using a reasonably modern GCC should do the trick here, I think. Should not really matter if qt4-mac was built using c++11 (+cxx11) or not.
On my system the build using macports-gcc-5 fails but a build using macports-gcc-4.9 succeeds. I do not have gcc-4.8 installed currently. If you like I can attach the error log for the gcc-5 build later today. -- Ticket URL: <https://trac.macports.org/ticket/49299#comment:6> MacPorts <https://www.macports.org/> Ports system for OS X
#49299: akonadi build fails after qt4-mac update -------------------------+--------------------- Reporter: jwhowse4@… | Owner: nicos@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: Port: akonadi | -------------------------+--------------------- Comment (by michaelld@…): Interesting. Thanks for the feedback. Yes, if you could attach the GCC5 log that would be interesting. I wish there were a better way to get C++11 support. I'm glad this path seems to be working for this issue. -- Ticket URL: <https://trac.macports.org/ticket/49299#comment:7> MacPorts <https://www.macports.org/> Ports system for OS X
#49299: akonadi build fails after qt4-mac update -------------------------+--------------------- Reporter: jwhowse4@… | Owner: nicos@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: Port: akonadi | -------------------------+--------------------- Comment (by jwhowse4@…): Replying to [comment:7 michaelld@…]:
Interesting. Thanks for the feedback. Yes, if you could attach the GCC5 log that would be interesting. I wish there were a better way to get C++11 support. I'm glad this path seems to be working for this issue.
I have attacked the gcc5 log above. -- Ticket URL: <https://trac.macports.org/ticket/49299#comment:8> MacPorts <https://www.macports.org/> Ports system for OS X
#49299: akonadi build fails after qt4-mac update -------------------------+--------------------- Reporter: jwhowse4@… | Owner: nicos@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: Port: akonadi | -------------------------+--------------------- Comment (by michaelld@…): Thanks! Looks like one needs to build Boost with "configure.compiler =macports-gcc-5" to get this to work (as a guess). Well, so long as GCC4.8 works then it shows what needs to be done. -- Ticket URL: <https://trac.macports.org/ticket/49299#comment:9> MacPorts <https://www.macports.org/> Ports system for OS X
#49299: akonadi build fails after qt4-mac update -------------------------+--------------------- Reporter: jwhowse4@… | Owner: nicos@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: Port: akonadi | -------------------------+--------------------- Comment (by michaelld@…): Nicos: Can you take a look at my patch that tries to force C++11 building? It's what I use with other ports & seems to work pretty well. -- Ticket URL: <https://trac.macports.org/ticket/49299#comment:10> MacPorts <https://www.macports.org/> Ports system for OS X
#49299: akonadi build fails after qt4-mac update -------------------------+--------------------- Reporter: jwhowse4@… | Owner: nicos@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: Port: akonadi | -------------------------+--------------------- Comment (by nicos@…): Thanks for having looked at that, I would have probably been slightly lost. If I follow correctly, your patch is overriding the behaviour of the cxx11 portgroup in case of using libstdc++ to enable compilation anyway. Could not this lead to issues with runtime dependencies? Akonadi is then potentially used by several ports, in particular KDE ones. -- Ticket URL: <https://trac.macports.org/ticket/49299#comment:11> MacPorts <https://www.macports.org/> Ports system for OS X
#49299: akonadi build fails after qt4-mac update -------------------------+--------------------- Reporter: jwhowse4@… | Owner: nicos@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: Port: akonadi | -------------------------+--------------------- Comment (by michaelld@…): Replying to [comment:11 nicos@…]:
Thanks for having looked at that, I would have probably been slightly lost.
NP. I thought this issue was qt4-mac related, but it's something I've dealt with before so it's not a big deal.
If I follow correctly, your patch is overriding the behaviour of the cxx11 portgroup in case of using libstdc++ to enable compilation anyway. Could not this lead to issues with runtime dependencies? Akonadi is then potentially used by several ports, in particular KDE ones.
The cxx11 PortGroup errors out when using libstdc++. But, folks using 10.8 and prior will have libstdc++ by default & the GCC 4.8+ compilers can handle c++11 pretty easily on that setup. My fix is not particularly robust, but it generally works well enough & keeps things working on those older OSs. on 10.9+, just use the cxx11 PortGroup & that's good enough. Pretty simple overall. -- Ticket URL: <https://trac.macports.org/ticket/49299#comment:12> MacPorts <https://www.macports.org/> Ports system for OS X
#49299: akonadi build fails after qt4-mac update -------------------------+--------------------- Reporter: jwhowse4@… | Owner: nicos@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: fixed | Keywords: Port: akonadi | -------------------------+--------------------- Changes (by nicos@…): * status: new => closed * resolution: => fixed Comment: Thanks for the answer. Committed in r141746. -- Ticket URL: <https://trac.macports.org/ticket/49299#comment:13> MacPorts <https://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts