-
Notifications
You must be signed in to change notification settings - Fork 75.2k
Closed
Labels
subtype:macOSmacOS Build/Installation issuesmacOS Build/Installation issuestype:build/installBuild and install issuesBuild and install issues
Description
System information
- Have I written custom code (as opposed to using a stock example script provided in TensorFlow): no
- OS Platform and Distribution (e.g., Linux Ubuntu 16.04): macOS High Sierra 10.13.3
- TensorFlow installed from (source or binary): source
- TensorFlow version (use command below): 1.6.0
- Python version: 2.7.14
- Bazel version (if compiling from source): 0.9.0
- GCC/Compiler version (if compiling from source): Xcode 9.3:
Apple LLVM version 9.1.0 (clang-902.0.39.1) - CUDA/cuDNN version: n/a
- GPU model and memory: n/a
- Exact command to reproduce:
tensorflow/contrib/makefile/build_all_ios.sh -g /path/to/model.pb
Describe the problem
As of Xcode 9.3 (was working fine on 9.2), compiling TF for iOS using build_all_ios.sh fails, complaining that "thread-local storage is not supported for the current target". This is related to #12573, which introduced the thread_local attribute for iOS builds.
Source code / logs
$ tensorflow/contrib/makefile/build_all_ios.sh -g /path/to/model.pb
[...]
gcc --std=c++11 -DIS_SLIM_BUILD -fno-exceptions -DNDEBUG -O3 -DANDROID_TYPES=__ANDROID_TYPES_FULL__ -DSELECTIVE_REGISTRATION -DSUPPORT_SELECTIVE_REGISTRATION -mios-simulator-version-min=9.0 -arch i386 -mno-sse -fembed-bitcode -D__thread=thread_local -DUSE_GEMM_FOR_CONV -Wno-c++11-narrowing -DTF_LEAN_BINARY -D__ANDROID_TYPES_FULL__ -fno-exceptions -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk -MT /Users/json/everalbum/ios-sdk/submodules/tensorflow/tensorflow/contrib/makefile/gen/obj/ios_I386/tensorflow/core/common_runtime/local_device.o -MMD -MP -MF /Users/json/everalbum/ios-sdk/submodules/tensorflow/tensorflow/contrib/makefile/gen/dep/ios_I386//tensorflow/core/common_runtime/local_device.Td -I. -I/Users/json/everalbum/ios-sdk/submodules/tensorflow/tensorflow/contrib/makefile/downloads/ -I/Users/json/everalbum/ios-sdk/submodules/tensorflow/tensorflow/contrib/makefile/downloads/eigen -I/Users/json/everalbum/ios-sdk/submodules/tensorflow/tensorflow/contrib/makefile/downloads/gemmlowp -I/Users/json/everalbum/ios-sdk/submodules/tensorflow/tensorflow/contrib/makefile/downloads/nsync/public -I/Users/json/everalbum/ios-sdk/submodules/tensorflow/tensorflow/contrib/makefile/downloads/fft2d -I/Users/json/everalbum/ios-sdk/submodules/tensorflow/tensorflow/contrib/makefile/gen/proto/ -I/Users/json/everalbum/ios-sdk/submodules/tensorflow/tensorflow/contrib/makefile/gen/proto_text/ -I/Users/json/everalbum/ios-sdk/submodules/tensorflow/tensorflow/contrib/makefile/gen/protobuf-host/include -I/usr/local/include -c tensorflow/core/common_runtime/local_device.cc -o /Users/json/everalbum/ios-sdk/submodules/tensorflow/tensorflow/contrib/makefile/gen/obj/ios_I386/tensorflow/core/common_runtime/local_device.o
In file included from tensorflow/core/common_runtime/local_device.cc:18:
In file included from ./tensorflow/core/common_runtime/local_device.h:19:
In file included from ./tensorflow/core/common_runtime/device.h:35:
In file included from ./tensorflow/core/framework/allocator.h:23:
In file included from ./tensorflow/core/framework/numeric_types.h:21:
In file included from ./third_party/eigen3/unsupported/Eigen/CXX11/Tensor:1:
In file included from /Users/json/everalbum/ios-sdk/submodules/tensorflow/tensorflow/contrib/makefile/downloads/eigen/unsupported/Eigen/CXX11/Tensor:79:
In file included from /Users/json/everalbum/ios-sdk/submodules/tensorflow/tensorflow/contrib/makefile/downloads/eigen/unsupported/Eigen/CXX11/ThreadPool:58:
/Users/json/everalbum/ios-sdk/submodules/tensorflow/tensorflow/contrib/makefile/downloads/eigen/unsupported/Eigen/CXX11/src/ThreadPool/SimpleThreadPool.h:153:5: error:
thread-local storage is not supported for the current target
EIGEN_THREAD_LOCAL PerThread per_thread;
^
/Users/json/everalbum/ios-sdk/submodules/tensorflow/tensorflow/contrib/makefile/downloads/eigen/unsupported/Eigen/CXX11/src/ThreadPool/ThreadLocal.h:15:35: note:
expanded from macro 'EIGEN_THREAD_LOCAL'
#define EIGEN_THREAD_LOCAL static __thread
^
<command line>:6:18: note: expanded from here
#define __thread thread_local
lauriebyrum, mikegreen7892003, fdoumet, ujeshpatel, adis300 and 2 more
Metadata
Metadata
Assignees
Labels
subtype:macOSmacOS Build/Installation issuesmacOS Build/Installation issuestype:build/installBuild and install issuesBuild and install issues