Opened 2 years ago
Last modified 2 years ago
#69190 new defect
base prohibits new Clangs on 10.6 Intel
| Reported by: | barracuda156 | Owned by: | |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | base | Version: | 2.9.0 |
| Keywords: | x86_64, snowleopard | Cc: | jmroot (Joshua Root), ryandesign (Ryan Carsten Schmidt), catap (Kirill A. Korinsky), kencu (Ken), cjones051073 (Chris Jones) |
| Port: |
Description (last modified by barracuda156)
I cannot make the base to pick correct compilers now via blacklist for folly. What I need is clang-15 or later and not clang-11.
The port currently has:
compiler.cxx_standard 2017
compiler.blacklist-append {clang < 1100}
compiler.blacklist-append {macports-clang-[5-9].0}
compiler.blacklist-append macports-gcc-12
On 10.6.8 I get in result:
10:MacPorts-2.9.0 svacchanda$ port deps folly
Full Name: folly @2024.01.22.00_0
Build Dependencies: cmake, ninja, clang-11, pkgconfig
Library Dependencies: bzip2, double-conversion, gflags, google-glog, libevent,
libsodium, libunwind, lz4, lzma, snappy, xz, zlib, zstd,
libfmt10, libcxx, boost181, openssl3, legacy-support,
macports-libcxx
I thought C++17 will pick a newer clang, but anyway, clang-11 cannot built it, so I try adding:
compiler.blacklist-append {macports-clang-[5-9].0} macports-clang-10 macports-clang-11
And nothing, it still wants clang-11:
10:MacPorts-2.9.0 svacchanda$ port deps folly
Warning: All compilers are either blacklisted or unavailable; defaulting to first fallback option
Full Name: folly @2024.01.22.00_0
Build Dependencies: cmake, ninja, clang-11, pkgconfig
Library Dependencies: bzip2, double-conversion, gflags, google-glog, libevent,
libsodium, libunwind, lz4, lzma, snappy, xz, zlib, zstd,
libfmt10, libcxx, boost181, openssl3, legacy-support,
macports-libcxx
Only compiler.whitelist macports-clang-16 works:
10:MacPorts-2.9.0 svacchanda$ port deps folly
Full Name: folly @2024.01.22.00_0
Build Dependencies: cmake, ninja, clang-16, pkgconfig
Library Dependencies: bzip2, double-conversion, gflags, google-glog, libevent,
libsodium, libunwind, lz4, lzma, snappy, xz, zlib, zstd,
libfmt10, libcxx, boost181, openssl3, legacy-support,
macports-libcxx
There is no overriding compiler.blacklist in the portfile, everything is appended.
Change History (8)
comment:1 Changed 2 years ago by barracuda156
| Description: | modified (diff) |
|---|
comment:2 follow-up: 3 Changed 2 years ago by kencu (Ken)
comment:3 follow-up: 6 Changed 2 years ago by barracuda156
Replying to kencu:
if all the possible compilers are blacklisted:
Warning: All compilers are either blacklisted or unavailable; defaulting to first fallback optionbase starts into the fallback compiler list.
You can read about that in portconfigure.tcl
Yes, but why are new clangs prohibited for 10.6.8 on x86_64?
comment:4 Changed 2 years ago by barracuda156
| Description: | modified (diff) |
|---|---|
| Summary: | compiler.blacklist does not work correctly now and prohibits new Clangs on 10.6 Intel → base prohibits new Clangs on 10.6 Intel |
comment:5 Changed 2 years ago by ryandesign (Ryan Carsten Schmidt)
Replying to barracuda156:
I thought C++17 will pick a newer clang
Per CompilerSelection, C++17 will select Apple clang 10 or later or llvm.org clang 5 or later.
comment:6 Changed 2 years ago by ryandesign (Ryan Carsten Schmidt)
Replying to barracuda156:
Yes, but why are new clangs prohibited for 10.6.8 on x86_64?
All the rules are in https://github.com/macports/macports-ports/blob/master/_resources/port1.0/compilers/clang_compilers.tcl and https://github.com/macports/macports-base/blob/51e0093cf8dad50a0d960566005f91dd5eadcd52/src/port1.0/portconfigure.tcl#L1167; you can read the commit history to discover why they're that way.
comment:7 Changed 2 years ago by ryandesign (Ryan Carsten Schmidt)
…by which I don't mean to claim there is a good reason. I haven't tried to read the history to find out. But that's where it could be found for those who want to investigate.
comment:8 Changed 2 years ago by kencu (Ken)
clangs newer than about clang-11 fail at times on 10.6.8.
using a newer linker like ld64-latest helps somewhat but macports defaults to ld64-127 on 10.6.8.
and then clang-17+ broke on a bunch of older systems with the verbose_abort issues

if all the possible compilers are blacklisted:
base starts into the fallback compiler list.
You can read about that in portconfigure.tcl