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

libassimp.dylib is not compiled with macos arm64 support #160

Open
gelvinp opened this issue Sep 7, 2022 · 0 comments
Open

libassimp.dylib is not compiled with macos arm64 support #160

gelvinp opened this issue Sep 7, 2022 · 0 comments

Comments

@gelvinp
Copy link

gelvinp commented Sep 7, 2022

Trying to build my monogame project that imported a .fbx file on an AS mac gave me the following error:

error: Importer 'FbxImporter' had unexpected failure!
Assimp.AssimpException: Error loading unmanaged library from path: libassimp.dylib

I noticed that the dotnet-mgcb runtimes folder had a osx-x64 entry, so I tried copying that and renaming it osx-arm64.
The error changed to the following:

error: Importer 'FbxImporter' had unexpected failure!
Assimp.AssimpException: Error loading unmanaged library from path: /Users/patrick/.nuget/packages/dotnet-mgcb/3.8.1.263/tools/net6.0/any/runtimes/osx-arm64/native/libassimp.dylib

I then used homebrew to install assimp directly, and copied libassimp.5.2.0.dylib into the runtime directory, but while this did let mgcb load the library, it still failed to build with the following error:

error: Importer 'FbxImporter' had unexpected failure!
System.OverflowException: Arithmetic operation resulted in an overflow.

I assumed that the version was newer than what was expected, and checked the original x64 dylib which reported version 4.1.0.
By downloading the source for assimp from the 4.1.0 release and compiling it myself to make an arm64 library, then copying that library into runtimes/osx-arm64/native, I was able to build and run my monogame project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant