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

libSDL2 Dependency Issue when setting up on ARM MacOS #380

Open
CalixBarrus opened this issue Dec 31, 2024 · 5 comments
Open

libSDL2 Dependency Issue when setting up on ARM MacOS #380

CalixBarrus opened this issue Dec 31, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@CalixBarrus
Copy link

CalixBarrus commented Dec 31, 2024

I ran into a problem with getting the dependencies to load when loading yafc for the first time. I found a workaround, but it wasn't obvious, others might possibly into the same problem.

YAFC version 2.5.0

Possibly related to this issue Failed start on apple silicon mac #90

Setting up YAFC on a fresh system, (Apple OSX, ARM), ran into a System DllNotFoundException, even after installing the SDL2 dependencies per the nice OSX install instructions.

Based on the error message excerpt:

Unhandled exception. System.DllNotFoundException: Unable to load shared library 'libSDL2_image.dylib' or one of its dependencies. 
...
  Reason: tried: ..., '/opt/homebrew/Cellar/jpeg-xl/0.11.1/lib/libjxl.0.10.dylib' (no such file), 
...

It seemed like there was a mismatch of the jpeg-xl version installed by brew on my system. jpeg-xl was installed by brew in the directory indicated above, but the file was file libjxl.0.11.dylib. I created a symlink libjxl.0.10.dylib -> libjxl.0.11.dylib, and Yafc loaded without issue (yay!). (This was done per ChatGPT's suggestion, I'm not sure if the workaround will cause any bad behavior, probably not).

Seems like the issue is a mismatch of the jpeg-xl latest version with the dependency of libSDL2_image.dylib.

@CalixBarrus CalixBarrus added the bug Something isn't working label Dec 31, 2024
@CalixBarrus CalixBarrus changed the title Problem Getting setup on MacOS libSDL2 Dependency Issue when setting up on ARM MacOS Dec 31, 2024
@shpaass
Copy link
Owner

shpaass commented Dec 31, 2024

So, from what I understand, there may be a hard-coded version in libSDL2_image.dylib,
and it needs to be upgraded for jpeg-xl.
The question is how to re-generate the file.
@artanin, could you please provide the instructions to reproduce the binaries from your PR? (#191)

Edit: If we have no say in how brew install SDL2_image is executed, I might have misunderstood the issue.

@artanin
Copy link

artanin commented Dec 31, 2024 via email

@shpaass
Copy link
Owner

shpaass commented Dec 31, 2024

@CalixBarrus

I created a symlink libjxl.0.10.dylib -> libjxl.0.11.dylib

So in other words, there was no file [...]/libjxl.0.10.dylib,
but there was a file [...]/libjxl.0.11.dylib?

@CalixBarrus
Copy link
Author

On my machine, brew installed version 0.11.1 of jpeg-xl; so there is no file [...]/libjxl.0.10.dylib,

This discussion from SDL_image seems relevant SDL_image issue #450. The discussion gives me the impression that the problem isn't on yafc's side of things.

@zzh8829
Copy link

zzh8829 commented Jan 6, 2025

I remember having some errors like this. Homebrew always runs on latest version and always causes problems with dylib loading. I always copy paste dylib directly into yafc folder or build from source to prevent this kind of issue. It is indeed a big pain for less technical users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants