Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Build error - targeted OS version does not support use of thread local variables

What does the below error means? I've never seen this before.

d: targeted OS version does not support use of thread local variables in __ZN12base_logging10LogMessage5FlushEv for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

I'm using cocoapod for google cast sdk and building in Xcode 10 beta and xcode 9.4.

like image 432
Swapnil Jain Avatar asked Sep 11 '18 19:09

Swapnil Jain


2 Answers

Changing the deployment target to 9.0 worked for me

open Xcode:

  1. select YOUR_PROJECT_NAME from target
  2. change Deployment target to 9.0 or greater under Deployment Info tab.

Hope it helps!

Edit: For visual/image reference

like image 105
ishab acharya Avatar answered Oct 03 '22 07:10

ishab acharya


Your project tries to link some C++ code which makes use of a C++11 concept not supported all iOS platforms.

I think thread_local is allowed beginning with iOS 9. Try to set the deployment target to iOS 9 or later.

The offending code is in base_logging::LogMessage::Flush().

like image 45
Nikolai Ruhe Avatar answered Oct 03 '22 07:10

Nikolai Ruhe