Opened 6 weeks ago
Last modified 5 weeks ago
#74190 assigned defect
qt4-mac @4.8.7: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
| Reported by: | ryandesign (Ryan Carsten Schmidt) | Owned by: | michaelld (Michael Dickens) |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | ports | Version: | 2.12.5 |
| Keywords: | lion | Cc: | Dave-Allured (Dave Allured) |
| Port: | qt4-mac |
Description
qt4-mac does not build on Lion (only).
/opt/local/var/macports/build/qt4-mac-3415a329/work/qt-everywhere-opensource-src-4.8.7/include/QtCore/private/../../../src/corelib/kernel/qcore_unix_p.h:312:5: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
register int ret;
^~~~~~~~~
So MacPorts has chosen a newer compiler that defaults to C++17, but the qt4-mac codebase is not compatible with C++17.
Even C++11 support is experimental and hidden behind the cxx11 variant.
The solution would seem to be to tell the build to use C++98 (the C++ standard before C++11) unless the cxx11 variant is selected.
I tried to do this by adding this code:
if {![variant_isset cxx11]} { compiler.cxx_standard 1998 configure.cxxflags-append -std=c++98 }
This failed the same way because the build does not seem to honor configure.cxxflags.
Then I tried:
if {![variant_isset cxx11]} { compiler.cxx_standard 1998 configure.cxx-append -std=c++98 }
This failed because the build assumes that configure.cxx is solely the compiler path.
I give up.
Change History (1)
comment:1 Changed 5 weeks ago by Dave-Allured (Dave Allured)
| Cc: | Dave-Allured added |
|---|
Note: See
TracTickets for help on using
tickets.
