28

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.

Swapnil Jain
  • 551
  • 1
  • 6
  • 9

3 Answers3

39

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

humazed
  • 74,687
  • 32
  • 99
  • 138
Redmen Ishab
  • 2,199
  • 18
  • 22
25

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().

Nikolai Ruhe
  • 81,520
  • 17
  • 180
  • 200
  • 1
    Yeah you're right, this was the problem indeed. Changing the deployment target to iOS 9.0 solves the problem. Thank you so much! – Swapnil Jain Sep 12 '18 at 21:09
  • 4
    Change the TARGET -> Your Project Name -> Deployment Info -> Deployment Target -> 9.0 solve the problem.... not working if you change the one under PROJECT – V-SHY Sep 29 '18 at 18:25
  • 2
    I'm having this with konan on Xcode 10 only, the same project on Xcode 9 builds fine... Changing the deployment target doesn't fix it for Xcode 10. A couple other solutions can be found in https://github.com/JetBrains/kotlin-native/issues/2084 which are konan-specific – Gobe Oct 08 '18 at 19:34
  • Rising deployment target is not a solution. – Cy-4AH Feb 12 '19 at 10:11
  • @Cy-4AH Maybe raising the deployment target is not an *option* for you but it definitely is a solution. – Nikolai Ruhe Feb 12 '19 at 17:38
23

enter image description here

Please change deployment target to 9.0 as shown in the image.

Sheetal Shinde
  • 489
  • 5
  • 7