Opened 8 weeks ago
Closed 7 weeks ago
#70724 closed defect (fixed)
clang-11-boostrap +debug: The C compiler is not able to compile a simple test program
Reported by: | TheLastLovemark | Owned by: | ryandesign (Ryan Carsten Schmidt) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.10.1 |
Keywords: | Cc: | catap (Kirill A. Korinsky) | |
Port: | clang-11-bootstrap |
Description
The most recent instances occurred when trying to port upgrade --enforce-variants gdal
to include the +debug
variant as well as port upgrade --enforce-variants llvm-17 +debug +tests
Attachments (3)
Change History (10)
Changed 8 weeks ago by TheLastLovemark
Attachment: | clang-11-bootstrap_during gdal upgrade +debug-main.log added |
---|
comment:1 Changed 8 weeks ago by ryandesign (Ryan Carsten Schmidt)
comment:2 Changed 8 weeks ago by TheLastLovemark
I already cleaned, so these will not be the same as if I was trying to invoke port upgrade --enforce-variants gdal +debug
.
The best I can give you is port install clang-11-bootstrap +debug
.
Changed 8 weeks ago by TheLastLovemark
Attachment: | clang-11-bootstrap-CMakeError.log added |
---|
Changed 8 weeks ago by TheLastLovemark
Attachment: | clang-11-bootstrap-CMakeOutput.log added |
---|
comment:5 Changed 7 weeks ago by ryandesign (Ryan Carsten Schmidt)
Cc: | catap removed |
---|---|
Owner: | set to catap |
Status: | new → assigned |
Summary: | clang-11-boostrap fails configuration when attempting to install ports with +debug variant → clang-11-boostrap +debug: |
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:
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.
comment:6 Changed 7 weeks ago by ryandesign (Ryan Carsten Schmidt)
Cc: | catap added |
---|---|
Owner: | changed from catap to ryandesign |
Status: | assigned → accepted |
Summary: | clang-11-boostrap +debug: → clang-11-boostrap +debug: The C compiler is not able to compile a simple test program |
comment:7 Changed 7 weeks ago by ryandesign (Ryan Carsten Schmidt)
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
Can you attach these files as well?