[MacPorts] #60638: cgal5 @5.0.2: error: thread-local storage is not supported for the current target

MacPorts noreply at macports.org
Tue Jun 23 04:28:00 UTC 2020


#60638: cgal5 @5.0.2: error: thread-local storage is not supported for the current
target
-------------------------+----------------------
  Reporter:  ryandesign  |      Owner:  Veence
      Type:  defect      |     Status:  closed
  Priority:  Normal      |  Milestone:
 Component:  ports       |    Version:  2.6.2
Resolution:  fixed       |   Keywords:  haspatch
      Port:  cgal5       |
-------------------------+----------------------

Comment (by ryandesign):

 Replying to [comment:5 kencu]:
 > {{{thread_local}}} always implies {{{std=c++11}}} or greater.
 <https://en.cppreference.com/w/cpp/keyword/thread_local>

 In https://github.com/macports/macports-base/pull/161/files it says:

 > {{{
 > # macOS has supported thread-local storage since Mac OS X Lion.
 > # So __thread (GNU extension) and _Thread_local (C11) could be used.
 > # However, the C++11 keyword was not supported until Xcode 8
 > }}}

 I took this to mean that MacPorts base 2.6.2's
 `compiler.thread_local_storage yes` works for projects that don't use the
 C++11 keyword, but doesn't work for projects that do use the C++11
 keyword. Since this port didn't indicate that it used C++11, I began by
 presuming that it did not. That seemed to be contradicted by the results
 from the buildbot after making this change which is why I added the second
 change, which resulted in successful builds.

 > don't forget that many build systems will test for certain standards and
 use them if available. Just because the build line indicated
 {{{-std=gnu++14}}} on this particular system, it does not necessarily mean
 that  the software actually requires that. Just that it used that during
 this build.

 Well you're right about that. Checking the 10.9 build log, I see it used
 `-std=gnu++1y` instead. So I'll reduce the cxx_standard to 2011.

 > Not a big deal -- it will probably just mean that ports that might have
 built with an older compiler will be forced to build with a newer one, but
 I know you don't like that.

 You're right, I don't like requiring a newer compiler when that's not
 necessary. In this case, however, it is necessary, due to the thread local
 storage requirement. C++11 requires clang 500; C++14 requires clang 602;
 thread local storage requires clang 800.

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


More information about the macports-tickets mailing list