Opened 6 years ago

Closed 6 years ago

#57501 closed defect (fixed)

nodejs11 @11.0.0 : error: thread-local storage is not supported for the current target

Reported by: dubiousjim Owned by: ci42
Priority: Normal Milestone:
Component: ports Version: 2.5.4
Keywords: Cc:
Port: nodejs11

Description

sudo port install nodejs11 fails during build phase. The end of the log reads:

  /usr/bin/clang++ -o /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_nodejs11/nodejs11/work/node-v11.0.0/out/Release/obj.host/torque/deps/v8/src/torque/source-positions.o ../deps/v8/src/torque/source-positions.cc '-DV8_GYP_BUILD' '-DV8_TYPED_ARRAY_MAX_SIZE_IN_HEAP=0' '-D_DARWIN_USE_64_BIT_INODE=1' '-DV8_TARGET_ARCH_X64' '-DV8_EMBEDDER_STRING="-node.5"' '-DENABLE_DISASSEMBLER' '-DV8_PROMISE_INTERNAL_FIELD_COUNT=1' '-DV8_INTL_SUPPORT' '-DV8_CONCURRENT_MARKING' '-DDISABLE_UNTRUSTED_CODE_MITIGATIONS' '-DENABLE_HANDLE_ZAPPING' -I../deps/v8  -O3 -gdwarf-2 -fstrict-aliasing -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=gnu++1y -stdlib=libc++ -fno-rtti -fno-exceptions -fno-strict-aliasing -MMD -MF /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_nodejs11/nodejs11/work/node-v11.0.0/out/Release/.deps//opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_nodejs11/nodejs11/work/node-v11.0.0/out/Release/obj.host/torque/deps/v8/src/torque/source-positions.o.d.raw   -c
../deps/v8/src/torque/source-positions.cc:11:1: error: thread-local storage is not supported for the current target
DEFINE_CONTEXTUAL_VARIABLE(CurrentSourceFile)
^
../deps/v8/src/torque/contextual.h:81:12: note: expanded from macro 'DEFINE_CONTEXTUAL_VARIABLE'
    static thread_local VarName::VariableType* top = nullptr; \
           ^
../deps/v8/src/torque/source-positions.cc:12:1: error: thread-local storage is not supported for the current target
DEFINE_CONTEXTUAL_VARIABLE(CurrentSourcePosition)
^
../deps/v8/src/torque/contextual.h:81:12: note: expanded from macro 'DEFINE_CONTEXTUAL_VARIABLE'
    static thread_local VarName::VariableType* top = nullptr; \
           ^
../deps/v8/src/torque/source-positions.cc:13:1: error: thread-local storage is not supported for the current target
DEFINE_CONTEXTUAL_VARIABLE(SourceFileMap)
^
../deps/v8/src/torque/contextual.h:81:12: note: expanded from macro 'DEFINE_CONTEXTUAL_VARIABLE'
    static thread_local VarName::VariableType* top = nullptr; \
           ^
3 errors generated.
make[1]: *** [/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_nodejs11/nodejs11/work/node-v11.0.0/out/Release/obj.host/torque/deps/v8/src/torque/source-positions.o] Error 1
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_nodejs11/nodejs11/work/node-v11.0.0/out'
make: *** [node] Error 2
make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_nodejs11/nodejs11/work/node-v11.0.0'
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_nodejs11/nodejs11/work/node-v11.0.0" && /usr/bin/make -w all CC=/usr/bin/clang CXX=/usr/bin/clang++ CXX.host=/usr/bin/clang++ CPP=/usr/bin/cpp CFLAGS="-Os" CXXFLAGS="-Os -stdlib=libc++" LDFLAGS="-L/opt/local/lib -Wl,-headerpad_max_install_names" PYTHON=/opt/local/bin/python2.7 V=1 
Exit code: 2
Error: Failed to build nodejs11: command execution failed
DEBUG: Error code: CHILDSTATUS 80551 2
DEBUG: Backtrace: command execution failed
DEBUG:     while executing
DEBUG: "system {*}$notty {*}$nice $fullcmdstring"
DEBUG:     invoked from within
DEBUG: "command_exec build"
DEBUG:     (procedure "portbuild::build_main" line 8)
DEBUG:     invoked from within
DEBUG: "$procedure $targetname"
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_nodejs11/nodejs11/main.log for details.

(Building and) installing nodejs10 works fine.

Attachments (1)

main.log (652.6 KB) - added by dubiousjim 6 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 Changed 6 years ago by kencu (Ken)

Cc: ci42 removed
Owner: set to ci42
Status: newassigned
Summary: Can't build nodejs11nodejs11 @11.0.0 : error: thread-local storage is not supported for the current target

Please upload the whole main.log for us to look at.

What system is this on? 10.7+ should support thread_local with almost every compiler.

Last edited 6 years ago by kencu (Ken) (previous) (diff)

Changed 6 years ago by dubiousjim

Attachment: main.log added

comment:2 Changed 6 years ago by dubiousjim

OS X version 10.10.15.

Here are the compilers I have installed via MacPorts:

Name         Selected      Options
====         ========      =======
clang        mp-clang-5.0  mp-clang-3.9 mp-clang-4.0 mp-clang-5.0 mp-clang-6.0 none
gcc          mp-gcc6       mp-gcc6 mp-gcc7 mp-gcc8 none
llvm         mp-llvm-5.0   mp-llvm-3.7 mp-llvm-3.9 mp-llvm-4.0 mp-llvm-5.0 mp-llvm-6.0 none

But from a quick look at the build log, it looks like this is trying to build with /usr/bin/clang++.

comment:3 Changed 6 years ago by ci42

@dubiousjim

What's the output of

$ clang++ --version

?

comment:4 Changed 6 years ago by kencu (Ken)

ah, that's right. the Xcode clangs before 800 did not support thread_local. Something like this should do it:

# nodejs11 uses thread_local, which is not supported in Xcode < 8
compiler.blacklist-append {clang < 800}

you can likely build it manually like this until that rolls down the pipe:

sudo port -v install nodejs11 configure.compiler=macports-clang-5.0

comment:5 Changed 6 years ago by dubiousjim

clang++ --version gives:

clang version 5.0.2 (tags/RELEASE_502/final)
Target: x86_64-apple-darwin14.5.0
Thread model: posix
InstalledDir: /opt/local/libexec/llvm-5.0/bin

but that's /opt/local/bib/clang++. It looked like the build was using /usr/bin/clang++, whose --version gives:

Apple LLVM version 7.0.2 (clang-700.1.81)
Target: x86_64-apple-darwin14.5.0
Thread model: posix

comment:7 Changed 6 years ago by dubiousjim

Adding configure.compiler=macports-clang-5.0 to the install command enabled building and installing successfully. Thanks! (Looong build.)

comment:8 Changed 6 years ago by ci42

Resolution: fixed
Status: assignedclosed

In 5af7c725052f099cf5afd7441f098ccfc5932fa7/macports-ports (master):

nodejs11: blacklist clang < 800

Closes: #57501

Note: See TracTickets for help on using tickets.