[MacPorts] #57883: libcxx @5.0.1_3: error: thread-local storage is unsupported for the current target

MacPorts noreply at macports.org
Wed Jan 9 23:48:58 UTC 2019


#57883: libcxx @5.0.1_3: error: thread-local storage is unsupported for the current
target
-------------------------+-------------------------
  Reporter:  ryandesign  |      Owner:  jeremyhu
      Type:  defect      |     Status:  assigned
  Priority:  Normal      |  Milestone:
 Component:  ports       |    Version:
Resolution:              |   Keywords:  snowleopard
      Port:  libcxx      |
-------------------------+-------------------------

Comment (by ryandesign):

 Replying to [comment:3 kencu]:
 > if I whitelist the installed working compilers like this:
 > {{{
 >     if {${os.major} < 11} {
 >         variant emulated_tls description {build libcxxabi and libcxx
 with support for emulated thread_local storage} {}
 >     }
 >     # only selected clang versions support emulated-tls
 >     foreach ver {5.0} {
 >         if {[file exists ${prefix}/bin/clang-mp-${ver}] && ${os.major} <
 11} {
 >             default_variants-append +emulated_tls
 >             compiler.whitelist-append macports-clang-${ver}
 >         }
 >     }
 > }}}
 >
 > that should do what I'm after...

 I've now tried making this change.

 I have the following outdated ports:

 {{{
 $ port outdated libcxx clang-5.0
 The following installed ports are outdated:
 clang-5.0                      5.0.2_2 < 5.0.2_3
 libcxx                         5.0.1_2 < 5.0.1_3
 }}}

 If I try to upgrade clang-5.0, MacPorts tries to upgrade its dependency
 libcxx first, which tries to build with clang-5.0 @5.0.2_2, which fails:

 {{{
 $ sudo port upgrade clang-5.0
 --->  Computing dependencies for libcxx
 --->  Fetching archive for libcxx
 --->  Attempting to fetch
 libcxx-5.0.1_3+emulated_tls+universal.darwin_10.i386-x86_64.tbz2 from
 https://packages.macports.org/libcxx
 --->  Attempting to fetch
 libcxx-5.0.1_3+emulated_tls+universal.darwin_10.i386-x86_64.tbz2 from
 http://nue.de.packages.macports.org/libcxx
 --->  Attempting to fetch
 libcxx-5.0.1_3+emulated_tls+universal.darwin_10.i386-x86_64.tbz2 from
 http://sea.us.packages.macports.org/macports/packages/libcxx
 --->  Fetching distfiles for libcxx
 --->  Verifying checksums for libcxx
 --->  Extracting libcxx
 --->  Applying patches to libcxx
 --->  Configuring libcxx
 --->  Building libcxx
 Error: Failed to build libcxx: command execution failed
 Error: See
 /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_libcxx/libcxx/main.log
 for details.
 Error: Follow https://guide.macports.org/#project.tickets to report a bug.
 }}}

 {{{
 + for FILE in '../src/*.cpp'
 + /opt/local/bin/clang++-mp-5.0 -c -g -O3 -arch x86_64 -arch i386
 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_libcxx/libcxx/work/libcxxabi-5.0.1.src/include
 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_libcxx/libcxx/work/libcxx-5.0.1.src/include
 -Os -std=c++11 -stdlib=libc++ -nostdinc++ -fstrict-aliasing -Wstrict-
 aliasing=2 -Wsign-conversion -Wshadow -Wconversion -Wunused-variable
 -Wmissing-field-initializers -Wchar-subscripts -Wmismatched-tags
 -Wmissing-braces -Wshorten-64-to-32 -Wsign-compare -Wstrict-aliasing=2
 -Wstrict-overflow=4 -Wunused-parameter -Wnewline-eof
 -D_LIBCPP_BUILDING_LIBRARY -I../include ../src/cxa_thread_atexit.cpp
 ../src/cxa_thread_atexit.cpp:65:3: error: thread-local storage is not
 supported for the current target
   __thread DtorList* dtors = nullptr;
   ^
 ../src/cxa_thread_atexit.cpp:67:3: error: thread-local storage is not
 supported for the current target
   __thread bool dtors_alive = false;
   ^
 2 errors generated.
 }}}

 But if I try to upgrade libcxx first, MacPorts tries to upgrade its
 dependency clang-5.0 first, which succeeds, and then libcxx can build
 because it's building with clang-5.0 @5.0.2_3:

 {{{
 $ sudo port clean libcxx
 --->  Cleaning libcxx
 $ sudo port upgrade libcxx
 --->  Computing dependencies for clang-5.0
 --->  Fetching archive for clang-5.0
 --->  Attempting to fetch
 clang-5.0-5.0.2_3+analyzer+emulated_tls+libstdcxx.darwin_10.x86_64.tbz2
 from https://packages.macports.org/clang-5.0
 --->  Attempting to fetch
 clang-5.0-5.0.2_3+analyzer+emulated_tls+libstdcxx.darwin_10.x86_64.tbz2.rmd160
 from https://packages.macports.org/clang-5.0
 --->  Installing clang-5.0 @5.0.2_3+analyzer+emulated_tls+libstdcxx
 --->  Cleaning clang-5.0
 --->  Computing dependencies for clang-5.0
 Warning: All compilers are either blacklisted or unavailable; defaulting
 to first fallback option
 --->  Deactivating clang-5.0 @5.0.2_2+analyzer+libstdcxx
 --->  Cleaning clang-5.0
 --->  Activating clang-5.0 @5.0.2_3+analyzer+emulated_tls+libstdcxx
 --->  Cleaning clang-5.0
 --->  Computing dependencies for libcxx
 --->  Fetching archive for libcxx
 --->  Attempting to fetch
 libcxx-5.0.1_3+emulated_tls+universal.darwin_10.i386-x86_64.tbz2 from
 https://packages.macports.org/libcxx
 --->  Attempting to fetch
 libcxx-5.0.1_3+emulated_tls+universal.darwin_10.i386-x86_64.tbz2 from
 http://nue.de.packages.macports.org/libcxx
 --->  Attempting to fetch
 libcxx-5.0.1_3+emulated_tls+universal.darwin_10.i386-x86_64.tbz2 from
 http://sea.us.packages.macports.org/macports/packages/libcxx
 --->  Fetching distfiles for libcxx
 --->  Verifying checksums for libcxx
 --->  Extracting libcxx
 --->  Applying patches to libcxx
 --->  Configuring libcxx
 --->  Building libcxx
 --->  Staging libcxx into destroot
 --->  Installing libcxx @5.0.1_3+emulated_tls+universal
 --->  Cleaning libcxx
 --->  Deactivating libcxx @5.0.1_2+universal
 --->  Cleaning libcxx
 --->  Activating libcxx @5.0.1_3+emulated_tls+universal
 --->  Cleaning libcxx
 }}}

 This kind of unexpected behavior is what happens with circular
 dependencies, which is why we want to avoid them.

 And as I said elsewhere, I'm not using LibcxxOnOlderSystems, so I think
 this problem will affect all users upgrading ports on 10.6.

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


More information about the macports-tickets mailing list