Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

thread-local storage is not supported for the current target #3690

Closed
matthewswallace opened this issue Mar 6, 2021 · 4 comments
Closed
Labels
Bug Global flag to mark a deviation from expected behaviour
Milestone

Comments

@matthewswallace
Copy link

the bug

  • 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

Screen Shot 2021-03-06 at 3 24 23 PM

@RichardTea
Copy link
Contributor

I'm of the opinion that the STB image loaders shouldn't be in the assimp library at all.

Formats with embedded PNG images should pass the raw image file to the application. If nothing else, PNG contains a lot of metadata that stb_image doesn't support and applications may require.

@matthewswallace
Copy link
Author

I was able to solve the issue. The ports/iOS/build.sh needed to be updated.

Line 25 needs to be set to version 10. It was still set to version 6. MIN_IOS_VERSION="10.0"

I'll be issuing a pull request.

@matthewswallace
Copy link
Author

@RichardTea I issued a pull request to fix this issue. Would you mind taking a look and let me know if you can pull that into master?

@lvalencia
Copy link

Hey I ran into this issue also, it might be helpful if this issue was left open until that PR is merged so someone else looking for a solution to this can find it more easily.

@kimkulling kimkulling added this to the Release 5.1 milestone Aug 24, 2021
@kimkulling kimkulling added this to ToDo in Planning for Release V5.1 via automation Aug 24, 2021
@kimkulling kimkulling added the Bug Global flag to mark a deviation from expected behaviour label Aug 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Global flag to mark a deviation from expected behaviour
Projects
No open projects
Development

No branches or pull requests

4 participants