[MacPorts] #53625: qscintilla: requires C++11, not using the right compiler
MacPorts
noreply at macports.org
Thu Feb 23 15:07:13 UTC 2017
#53625: qscintilla: requires C++11, not using the right compiler
-------------------------+-----------------------
Reporter: mojca | Owner: michaelld
Type: defect | Status: reopened
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: | Keywords:
Port: qscintilla |
-------------------------+-----------------------
Comment (by mojca):
Compare the following:
{{{
> clang++-mp-4.0 -stdlib=libc++ test.cpp -o test
# OK
}}}
{{{
> clang++-mp-4.0 -stdlib=libstdc++ test.cpp -o test
test.cpp:1:10: fatal error: 'regex' file not found
#include <regex>
^~~~~~~
1 error generated.
}}}
{{{
> clang++-mp-4.0 -stdlib=macports-libstdc++ test.cpp -o test
In file included from test.cpp:1:
In file included from /opt/local/include/gcc6/c++/regex:35:
/opt/local/include/gcc6/c++/bits/c++0x_warning.h:32:2: error: This file
requires compiler and library support for the ISO C++ 2011 standard. This
support must be
enabled with the -std=c++11 or -std=gnu++11 compiler options.
#error This file requires compiler and library support \
^
1 error generated.
}}}
Maybe Marcus just needs to improve his patch for `macports-libstdc++`.
> What would be ideal is if the default CXXFLAGS were "-std=c++98" or
whatever. Then if C++11 is desired, we swap that to "-std=c++11
-Wc++11-extension". Likewise for C++14 or C++17, assuming the updated -W
is valid for those. Basically: Try to force the compiler to a certain
standard & warn if not abiding by it.
I'm not particularly happy about this idea. Clang already works painlessly
in most cases, C++98 soucres compile just fine under C++11 compiler, it's
just the recent change with `-stdlib=macports-libstdc++` that could be
improved and use C++11 by default. Note that this `macports-libstdc++` is
pretty experimental.
If we force the C++98 flag, we are just calling for a huge number of
broken port.
PS: playing on 10.7.
--
Ticket URL: <https://trac.macports.org/ticket/53625#comment:15>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list