Why do I get a "thread-local storage is not supported for the current target" error when compiling assimp for iOS
Asked Answered
K

0

10

I am currently trying to use the assimp library http://assimp.org in an Unreal Engine project. I'm able to compile both the Windows and Mac versions of the library so that I can link them to my project.

The issue I'm facing now is getting the iOS version to compile. I keep running into the following issue when compiling as noted here in the github issue that I filed with the project. https://github.com/assimp/assimp/issues/3690

I do not believe this is an issue with assimp it self. I believe this is an issue with macOS and how it compiles c++ code.

Here is my github issue that I filed. I believe it has all the information needed to explain the error that I'm running into. I'm just not sure how to solve it at this point.

On macOS I've built assimp from cmake --build cd into port/iOS/ ./build.sh I get the following error.

[ 92%] Building CXX object code/CMakeFiles/assimp.dir/AssetLib/Assjson/json_exporter.cpp.o

In file included from ~/assimp/code/Pbrt/PbrtExporter.cpp:87:
~/assimp/code/Pbrt/stb_image.h:931:1: error: thread-local storage is not supported for the
      current target
STBI_THREAD_LOCAL
^
~/assimp/code/Pbrt/stb_image.h:592:39: note: expanded from macro 'STBI_THREAD_LOCAL'
      #define STBI_THREAD_LOCAL       thread_local
                                      ^
~/assimp/code/Pbrt/stb_image.h:1070:8: error: thread-local storage is not supported for the
      current target
static STBI_THREAD_LOCAL int stbi__vertically_flip_on_load_local, stbi__vertically_flip_on_load_set;
       ^
~/assimp/code/Pbrt/stb_image.h:592:39: note: expanded from macro 'STBI_THREAD_LOCAL'
      #define STBI_THREAD_LOCAL       thread_local
                                      ^
~/assimp/code/Pbrt/stb_image.h:1070:8: error: thread-local storage is not supported for the
      current target
~/assimp/code/Pbrt/stb_image.h:592:39: note: expanded from macro 'STBI_THREAD_LOCAL'
      #define STBI_THREAD_LOCAL       thread_local
[ 92%] Building CXX object code/CMakeFiles/assimp.dir/AssetLib/Assjson/mesh_splitter.cpp.o

**Desktop **

OS: macOS 11.2.1 M1 mac mini 2021 computer trying to compile for iOS

Katt answered 7/3, 2021 at 13:58 Comment(2)
fyi (not sure if it's a dup or not) #28095294Dymoke
@Katt can you the solution if it worked for you.Malicious

© 2022 - 2024 — McMap. All rights reserved.