#67322 closed defect (fixed)

scip @8.0.3: error: thread-local storage is not supported for the current target

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: catap (Kirill A. Korinsky)
Priority: Normal Milestone:
Component: ports Version: 2.8.1
Keywords: snowleopard lion mountainlion mavericks yosemite Cc:
Port: scip

Description

Building scip @8.0.3 fails on Yosemite and earlier:

https://build.macports.org/builders/ports-10.10_x86_64-builder/builds/223417/steps/install-port/logs/stdio

[ 17%] Building CXX object src/CMakeFiles/scip.dir/scip/exprinterpret_cppad.cpp.o
cd /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_math_scip/scip/work/build/src && /usr/bin/clang++ -DSCIP_STATIC_DEFINE -I/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_math_scip/scip/work/scip-8.0.3/src/amplmp/include -I/opt/local/lib/cmake/soplex/../../../include -I/opt/local/include/coin-or -I/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_math_scip/scip/work/build -I/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_math_scip/scip/work/scip-8.0.3/src -isystem /opt/local/include -isystem /opt/local/libexec/boost/1.76/include -pipe -I/opt/local/libexec/boost/1.76/include -Os -DNDEBUG -I/opt/local/libexec/boost/1.76/include -I/opt/local/include -stdlib=libc++ -O3 -DNDEBUG -arch x86_64 -mmacosx-version-min=10.10 -pedantic -Wall -W -Wpointer-arith -Wcast-align -Wwrite-strings -Wshadow -Wredundant-decls -Wdisabled-optimization -Wno-long-long -Wno-unknown-pragmas -Wno-unused-parameter -Wno-unknown-warning-option -Wctor-dtor-privacy -Wnon-virtual-dtor -Wreorder -Woverloaded-virtual -Wsign-promo -Wsynth -Wcast-qual -Wno-strict-overflow -Wno-psabi -Wno-shadow -std=gnu++14 -MD -MT src/CMakeFiles/scip.dir/scip/exprinterpret_cppad.cpp.o -MF CMakeFiles/scip.dir/scip/exprinterpret_cppad.cpp.o.d -o CMakeFiles/scip.dir/scip/exprinterpret_cppad.cpp.o -c /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_math_scip/scip/work/scip-8.0.3/src/scip/exprinterpret_cppad.cpp
/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_math_scip/scip/work/scip-8.0.3/src/scip/exprinterpret_cppad.cpp:117:8: error: thread-local storage is not supported for the current target
static thread_local int thread_number{-1};
       ^

I already added compiler.thread_local_storage yes which didn't fix it, but that would only take effect if a certain C or C++ standard is required, and the port doesn't indicate that, and doing that is probably the fix.

Which values should they be set to? As far as I can tell, thread-local storage is a feature introduced both in C11 and C++11. I see -std=c99 and -std=gnu++14 (on 10.10) or -std=gnu++1y (on 10.8 and 10.9) so probably compiler.c_standard 1999 and compiler.cxx_standard 2014 is correct.

Change History (2)

comment:1 Changed 12 months ago by catap (Kirill A. Korinsky)

Thanks to creating the issue. I've fixed it locally and will open a PR soon.

I'm taking care of #67175 and similar issue at mumps and near :)

Last edited 12 months ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:2 Changed 12 months ago by catap (Kirill A. Korinsky)

Resolution: fixed
Status: assignedclosed

In 58d0b62cfafeeb105d4d64a64f5b5cf583b389b6/macports-ports (master):

scip: fix build on macOS 10.10

Closes: #67322

Note: See TracTickets for help on using tickets.