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

SDL2 library requiring x86 version despite specifying AppleSilicon #156

Open
imtan opened this issue Nov 16, 2023 · 0 comments
Open

SDL2 library requiring x86 version despite specifying AppleSilicon #156

imtan opened this issue Nov 16, 2023 · 0 comments

Comments

@imtan
Copy link

imtan commented Nov 16, 2023

I'm currently experiencing an unexpected issue on my macOS system (Version: 13.5.1, Build: 22G90) with an M1 CPU. Despite compiling my project for the ARM architecture using Nim, the system insists on requiring the x86 version of the SDL2 library, which is incompatible with the ARM architecture of the M1 chip.

Compile Command:

nimble build --cpu:arm64 --os:macosx --define:nimDebugDlOpen
./compiled

Error Message:

dlopen(libSDL2.dylib, 0x0002): tried: '/opt/homebrew/lib/libSDL2.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), 'libSDL2.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OSlibSDL2.dylib' (no such file), '/usr/lib/libSDL2.dylib' (no such file, not in dyld cache), 'libSDL2.dylib' (no such file)
could not load: libSDL2.dylib

This error arises when attempting to run the compiled program. It seems like an architecture mismatch issue, specifically between the SDL2 library and the M1 chip's ARM architecture.

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