#61418 closed defect (fixed)
Wrong minimum clang version when compiler.thread_local_storage is yes and compiler.cxx_standard is 2014
Reported by: | ryandesign (Ryan Carsten Schmidt) | Owned by: | chrstphrchvz (Christopher Chavez) |
---|---|---|---|
Priority: | Normal | Milestone: | MacPorts 2.7.0 |
Component: | base | Version: | 2.6.3 |
Keywords: | Cc: | dbevans (David B. Evans), MarcusCalhoun-Lopez (Marcus Calhoun-Lopez), chrstphrchvz (Christopher Chavez), mascguy (Christopher Nielsen) | |
Port: |
Description
When compiler.cxx_standard is 2011, MacPorts sets the min clang version to 500.2.75 unless compiler.thread_local_storage is also set in which case it sets the min clang version to 800.0.38. Great.
But when compiler.cxx_standard is 2014, MacPorts sets the min clang version to 602.0.49. It does not increase the min clang version to 800.0.38 if compiler.thread_local_storage is also set, which causes build failure. See for example [59c7bd2a635e363189bcb53e7205e9f8c2d0e5ab/macports-ports] where a port worked around this.
https://github.com/macports/macports-base/blob/master/src/port1.0/portconfigure.tcl#L856-L868
Change History (10)
comment:1 Changed 4 years ago by chrstphrchvz (Christopher Chavez)
comment:2 Changed 4 years ago by chrstphrchvz (Christopher Chavez)
Cc: | chrstphrchvz added |
---|
comment:3 Changed 4 years ago by kencu (Ken)
IMHO setting compiler.thread_local_storage
to yes
should implicitly set the compiler.cxx_standard
to at least 2011
if it's not already set to something greater (as obviously you need that at least for thread_local and c++).
Otherwise, the user sees an error about needing thread_local
, adds compiler.thread_local_storage yes
to the Portfile, and it doesn't work.
comment:4 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)
I thought the point was that there's thread local with C, and there's thread local with C++. Setting compiler.thread_local_storage
doesn't specify which it is. If the software is using thread local with C++, then it needs to set compiler.cxx_standard
correctly. If the software is using thread local with C only, then there's no need to impose the higher compiler requirements.
comment:6 Changed 4 years ago by chrstphrchvz (Christopher Chavez)
PR opened for change from comment:1: https://github.com/macports/macports-base/pull/214
comment:7 Changed 4 years ago by chrstphrchvz (Christopher Chavez)
Owner: | set to chrstphrchvz |
---|---|
Resolution: | → fixed |
Status: | new → closed |
comment:8 Changed 4 years ago by mascguy (Christopher Nielsen)
Cc: | mascguy added |
---|
comment:9 Changed 4 years ago by jmroot (Joshua Root)
Milestone: | → MacPorts 2.7.0 |
---|
I encountered an instance of this issue: https://github.com/macports/macports-ports/pull/8761#issuecomment-708126427
There may be more ports recently impacted by this, as I was cleaning up compiler blacklist usage that looked addressed by https://github.com/macports/macports-base/pull/161 even if
compiler.cxx_standard
was 2014 or later.Would the following work instead?