[MacPorts] #67934: edid-decode @20230804: error: use of undeclared identifier 'nullptr'
MacPorts
noreply at macports.org
Thu Aug 10 08:13:29 UTC 2023
#67934: edid-decode @20230804: error: use of undeclared identifier 'nullptr'
--------------------------+-------------------------
Reporter: ryandesign | Owner: wwalexander
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.8.1
Resolution: | Keywords:
Port: edid-decode |
--------------------------+-------------------------
Changes (by ryandesign):
* owner: (none) => wwalexander
* status: new => assigned
Comment:
See my [comment:2 comment above].
Also, sometimes you don't need an older system to verify a fix. For
example, here we know `nullptr` is a C++11 feature, so we need to ensure a
C++11 compiler is used and that it is told to be in C++11 mode.
`compiler.cxx_standard 2011` ensures the former, presuming that the build
system correctly uses `CXX` to invoke the C++ compiler. You can test
whether this is the case on any OS version by doing a build and specifying
a nonstandard compiler, for example `sudo port build edid-decode
configure.compiler=macports-clang-16`, then `grep`ing through the log to
make sure that every compilation happened via that compiler
(`/opt/local/bin/clang++-mp-16`).
`configure.cxxflags-append -std=c++11` ensures the latter, presuming that
the build system correctly passes `CXXFLAGS` to every C++ compiler
invocation. You can test whether this is the case on any OS version by
doing a build and then `grep`ing through the log for any occurrences of
`bin/clang++` that do not also include `-std=c++11`. Looking at
[https://git.linuxtv.org/edid-decode.git/tree/Makefile the project's
Makefile], it looks like it does ''not'' use `CXXFLAGS`; it erroneously
passes `CFLAGS` to the C++ compiler. Upstream should fix this.
Upstream should also be adding `-std=c++11` to `CXXFLAGS` in the Makefile
without us having to do it.
--
Ticket URL: <https://trac.macports.org/ticket/67934#comment:3>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list