[MacPorts] #70724: clang-11-boostrap +debug: (was: clang-11-boostrap fails configuration when attempting to install ports with +debug variant)

MacPorts noreply at macports.org
Mon Sep 23 22:30:36 UTC 2024


#70724: clang-11-boostrap +debug:
---------------------------------+----------------------
  Reporter:  TheLastLovemark     |      Owner:  catap
      Type:  defect              |     Status:  assigned
  Priority:  Normal              |  Milestone:
 Component:  ports               |    Version:  2.10.1
Resolution:                      |   Keywords:
      Port:  clang-11-bootstrap  |
---------------------------------+----------------------
Changes (by ryandesign):

 * status:  new => assigned
 * owner:  (none) => catap
 * cc: catap (removed)


Comment:

 The error in CMakeError.log is:

 {{{
 gcc: error: unrecognized command-line option '-fno-limit-debug-info'
 }}}

 So something is asking the compiler to use the flag `-fno-limit-debug-
 info` and your compiler doesn't understand that flag which is causing the
 feature tests that cmake runs to fail.

 It is the cmake 1.1 portgroup that adds this flag but only when the
 compiler is clang:

 https://github.com/macports/macports-
 ports/blob/728e4fbfe243c54733b8beeaa00940fb148bcf7b/_resources/port1.0/group/cmake-1.1.tcl#L496-L501

 According to your main.log the clang-11-bootstrap port does have
 `configure.compiler` set to `clang`:

 {{{
 :debug:configure Using compiler 'Xcode Clang'
 }}}

 However however it overrides `configure.cc` and `configure.cxx` and points
 them to a specific version of GCC (from the gcc10-bootstrap port):

 {{{
 :debug:configure
 CC='/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_clang-11-bootstrap/clang-11-bootstrap/work/bins/gcc'
 :debug:configure
 CXX='/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_clang-11-bootstrap/clang-11-bootstrap/work/bins/g++'
 }}}

 and the cmake 1.1 portgroup's decision is based on `configure.cc` and
 `configure.cxx` so the cmake 1.1 portgroup should not have added the
 `-fno-limit-debug-info` flag. The reason why it did is that it checks
 whether the ''entire value'' of `configure.cc` or `configure.cxx`
 ''contains the string'' "clang", and indeed here it does (within the port
 name "clang-11-bootstrap"). The cmake 1.1 portgroup should be fixed so
 that it only checks the last path component not the entire value.

-- 
Ticket URL: <https://trac.macports.org/ticket/70724#comment:5>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list