[MacPorts] #59973: cmake-1.1 portgroup debug variant adds -fno-limit-debug-info before port has a chance to specify compiler (was: broken mpicc-openmpi-gcc9 causes flann +gcc9 +debug +openmpi +python37 build failure)
MacPorts
noreply at macports.org
Thu Jan 16 16:42:43 UTC 2020
#59973: cmake-1.1 portgroup debug variant adds -fno-limit-debug-info before port
has a chance to specify compiler
------------------------------+------------------------
Reporter: TheLastLovemark | Owner: ryandesign
Type: defect | Status: accepted
Priority: Normal | Milestone:
Component: ports | Version: 2.6.2
Resolution: | Keywords: haspatch
Port: |
------------------------------+------------------------
Changes (by ryandesign):
* owner: (none) => ryandesign
* keywords: => haspatch
* status: new => accepted
* port: flann =>
Comment:
It has nothing to do with openmpi, nor even with flann. The problem
appears to be that the flag `-fno-limit-debug-info` is being supplied to
gcc-mp-9, and that is not a flag that gcc understands; it is a clang-
specific flag, as far as I have been able to determine.
The `-fno-limit-debug-info` flag is coming from the cmake-1.1 portgroup,
which intends to add that flag when the +debug variant is set (which it is
in your case) and the compiler is clang (which is not supposed to be the
case here). But clang is the default compiler. It seems that the cmake-1.1
portgroup is checking what the compiler is before the port has had a
chance to specify what compiler it wants, so the cmake-1.1 portgroup is
seeing the default compiler rather than the one the port ultimately chose.
If you weren't using both the +debug variant and a gcc variant, you
wouldn't see this problem, so if you can do without one or the other that
would be a workaround.
Putting everything that the debug variant does within a `pre-configure {
... }` block seems to work for me to fix this specific problem, though I
don't know if it'll cause other problems. I've submitted
https://github.com/macports/macports-ports/pull/6171 to fix this.
FYI, anything you do with `sudo port select` is for your own benefit on
the command line. Other ports you install should not be influenced by what
you have selected. (If they are, it is a bug in that port.)
--
Ticket URL: <https://trac.macports.org/ticket/59973#comment:2>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list