-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[macOS] [Arm] Build: List of issues when building locally on an M1 Mac #15008
Comments
I found a CMake post here about the Apple Clang 15 linker issue, and apparently it's recommended to use the old linker with I tried adding It was mentioned in that post that
|
@shinra-electric Maybe it's caused by homebrew? Take a look at this issue, its exception message looks similar to yours: link I haven't figured out how cmake copies dylibs into rpcs3.app, but using install_name_tool to correct the rpath of libfreetype.dylib should work. |
Using
Whereas if I use
So we can see the executable path is correct, but the path referencing |
When trying to change the path with
I'm looking for a way to force the change, but I haven't found one yet.... |
Actually, if anyone is getting the
|
I'm not sure if the workaround for the
Although the next line gives me System ConfigurationM3 Max |
If the app can be run, then you built it successfully. But the crash you are having sounds like issue #14997. I never had that crash, so I haven't been able to look into it... |
I couldn’t get the build to run following your instructions on Sonoma. Something about the code didn’t install the library into the contents folder when running |
Are you sure you had all the dependencies installed? Which library are you referring to? If you export the terminal output into a
Do not expect the Arm build to run anything at all. Only a handful of games are know to work. If you want to play games, download the x64 build and run through Rosetta. |
Here's the log |
From a quick glance it looks like you didn’t apply the fixes from PR #14452 |
I'm still stuck at the result in terminal. For context, I never had an RPCS3 install prior to trying to install on Sonoma. Just wanted to mention since I saw references to applying Ventura fixes/workarounds to the Sonoma version. |
For anyone following this, it's no longer necessary to patch in the |
This comment was marked as off-topic.
This comment was marked as off-topic.
I've added an issue with ffmpeg 7 to the original post, and added a workaround to the build instructions |
On latest master, we have native arm64 support added to LLVM on macos. You can now play games with full LLVM JIT to maximize performance. |
Will there be available prebuilt binaries for macOS-arm64? |
#12599. We need someone to add CI. |
Well, there's this #14028 if someone is willing to resurrect it from the grave. |
Is this still valid? I can't find any occurrences of frame_number in media_utils.cpp |
Definitely not, when I build locally I don't do any weird customization. Just install the same deps we have for x64 and build. The one thing I do for better compatibility is to use llvm@18 instead of llvm@16 for the improved CPU detection. |
I didn't have to do anything with cubeb either, though I don't build x64 rpcs3 on macos these days so it is likely a conflict with the x64 build setup on affected systems. |
Thanks for pointing this out. It's not needed anymore, I'll remove it from the original post
The cubeb issue is only if you have homebrew cubeb installed at the same time. For some reason it interferes with the build, so my workaround was just to remove the local install and re-install afterwards (if it exists). I couldn't see any Here is a log: Edit: I don't have any x64 homebrew installations, so it's unlikely to be caused by CPU architecture issues. |
Quick summary
I haven't been able to build on macOS Sonoma and Xcode 15 since I upgraded. (I can't downgrade to Ventura as it's a work laptop).
But over Christmas I had access to an M1 with Ventura still installed and managed to work through some of the issues I was having. I was able to build a working app with Ventura
and a broken app with Sonoma. I suspect the Sonoma app is broken due to the new Linker in Xcode 15.Fixed. See below for detailsNote that the app built with Ventura will work fine on Sonoma.
I thought I'd list the issues and workarounds here so someone more knowledgeable than me might be able to fix some of them.
Details
Old-style-cast errors:Fixed by Fix Apple Clang build #15240glslang:
needs to be uninstalled from homebrew, or else the build will fail. This is documented in [macOS] [Arm] Building on Arm fails if glslang is installed locally via homebrew #13540Fixedcubeb: needs to be uninstalled from homebrew, or else the build will fail.
Log file:
cubeb.txt
llvm: CMake complains that llvm 17 or 18 are not acceptable, and that llvm@16 is required. However this warning can be ignored.
libfreetype.6.dylib: incorrect loader_path.
brew reinstall freetype
should fix this. If not, another workaround is in the comments below.ffmpeg 7: There has been a change to a variable name in ffmpeg 7. (Workaround below)fixed.It's possible to build with the following instructions:
Sonoma crash
The Sonoma build crashes on launch saying it cannot find the bundled libraries. However, they are correctly bundled within the app.Crash report:
rpcs3 arm crash report sonoma.txt
This is fixed. The issue was with
libfreetype.6.dylib
. The@loader_path
was incorrect. Referring back to the Ventura build withotool
I could see it should be@executable_path
, and it was pointing to the wrong place. Butinstall_name_tool
refused to change it, saying it would invalidate the signature. So I removed the signature and then changed it. This was successful.Edit: Reinstalling with
brew reinstall freetype
seems to have fixed the underlying issue for me. The workaround may not be required.System configuration
M1 Pro
Ventura 13.6.3 & Xcode 14.3.1
Sonoma 14.3 Beta & Xcode 15.1
Edit: Removed advice about using the interpreter. LLVM is now working.
The text was updated successfully, but these errors were encountered: