Julius: Apple silicon support

Created on 17 Jan 2021  路  8Comments  路  Source: bvschaik/julius

Hi.
The 1.6 version works great via roseta2 support. I have tried to build it for my self and it works. I installed dependencies via HomeBrew, but they have support only for arm (not-fat binary).
Also, I tried to build it via ci scripts by adding -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" and found that sdl 2.0.14 is a fat bin, but sdl_mixer 2.0.4 not (only x86_64 build).
I could build a fat binary on my mac, but I think it's better to have this solution on the CI.

question

Most helpful comment

Apologies, I was mixing arm stuff up since I also do mobile Android development. It's indeed telling me: ld: symbol(s) not found for architecture arm64 for all library functions that are provided by mpg123, etc.

Using homebrew (or ./configure) is not an option since those create 'thin' libraries that cannot be redistributed to other architectures.

I'm not familiar with the xcode build system or how to disable any libraries from there, so I'd rather wait for official support in SDL_mixer instead of sinking time into this. The game works using the x86_64 bridge, so there's no urgency here.

All 8 comments

I agree we should support Apple Silicon, however none of us have such a system to test things on. Would you be willing to test our CI build attempts?

yes, sure. I can help with testing.
I have tried to build it via ci, but the problem with sdl_mixer build. and I can't rebuild it for arm64.
I used bottles from homebrew and did arm only build.

julius.dmg.zip

The problem is indeed with SDL mixer not providing an ARM-enabled build. I've opened an issue at the SDL bug tracker, hopefully they'll add support soon.
If I don't hear back in a week or so I'll try to compile SDL_mixer on the CI, but I'd rather go the "official" route.

please, let me know about any updates. I want to help you with it

I think there's a pending 2.0.5 release, so hopefully they'll compile with Apple Silicon support then.

I really hope they do.

I just did some experiments: we need to compile SDL_mixer as a framework using xcodebuild so we get a redistributable library, rather than a non-portable one (like homebrew). If I try to compile SDL_mixer, it complains that mpg123, vorbis, flac, etc are missing support for arm7. If I then try to build mpg123, it throws compile errors at me. Some libraries don't even have an Xcode project file, so I really wonder how one is supposed to build the .framework bundle on Mac.

The only thing we can do right now is wait for support.

I really hope they do.

I just did some experiments: we need to compile SDL_mixer as a framework using xcodebuild so we get a redistributable library, rather than a non-portable one (like homebrew). If I try to compile SDL_mixer, it complains that mpg123, vorbis, flac, etc are missing support for arm7. If I then try to build mpg123, it throws compile errors at me. Some libraries don't even have an Xcode project file, so I really wonder how one is supposed to build the .framework bundle on Mac.

The only thing we can do right now is wait for support.

you don't need arm7 support, you need only arm64 and without other flac and other formats support.
ps - you could download binaries from homebrew https://formulae.brew.sh/api/formula/sdl2_mixer.json. Btw, homebrew uses the ./configure --prefix=/opt/homebrew/Cellar/sdl2_mixer/2.0.4 --disable-music-flac --disable-music-flac-shared --disable-music-mid build command. In theory could add CFLAGS="-arch arm64 -mmacosx-version-min=11.0 -arch x86_64" or only CFLAGS="-arch arm64" for build only arm build.
I'm able to reproduce it, but I can't build the game with those libs (lost in search paths)

Apologies, I was mixing arm stuff up since I also do mobile Android development. It's indeed telling me: ld: symbol(s) not found for architecture arm64 for all library functions that are provided by mpg123, etc.

Using homebrew (or ./configure) is not an option since those create 'thin' libraries that cannot be redistributed to other architectures.

I'm not familiar with the xcode build system or how to disable any libraries from there, so I'd rather wait for official support in SDL_mixer instead of sinking time into this. The game works using the x86_64 bridge, so there's no urgency here.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bvschaik picture bvschaik  路  7Comments

jdmillard picture jdmillard  路  7Comments

ArtySh0ck picture ArtySh0ck  路  3Comments

giggietto picture giggietto  路  8Comments

mirh picture mirh  路  9Comments