Skip to content

Fixing macOS build#2

Draft
got4n wants to merge 1 commit into
Blounard:masterfrom
got4n:tmp-macos
Draft

Fixing macOS build#2
got4n wants to merge 1 commit into
Blounard:masterfrom
got4n:tmp-macos

Conversation

@got4n
Copy link
Copy Markdown

@got4n got4n commented Jun 22, 2025

This is an attempt at fixing Dolphin PyCore builds on MacOS.
Basically so far I removed the duplicate EmitUpdateMembase() in Jit.h, fixed the State::Save arguments and State::Load arguments in DolphinNoGUI (which was fixed by the PR by Kam1k4z3 already for Linux).

Now this is where I would need more testing.

In theory this might be able to compile just fine but, this needs two hacky workarounds that I don't like. The thing is that I've always had weird issues when compiling Dolphin on macOS and I didn't find solutions to it. Since I have no idea if the other issues that will be mentioned right after are just because of my weird macOS environnement or actual issues, I'd rather have other people try and compile this to see how it goes for them.
The three main issues will be:

1/ issue with libMoltenVK.dylib not getting generated:

No rule to make target Externals/MoltenVK/MoltenVK-prefix/src/MoltenVK/Package/Release/MoltenVK/dynamic/dylib/macOS/libMoltenVK.dylib', needed by Binaries/DolphinQt.app/Contents/Frameworks/libMoltenVK.dylib'.

I have no idea how to fix this one but this might just be my weird macOS setup, because I've had this even with regular Dolphin builds and I didn't find anyone else having this one. No libMoltenVK.dylib gets built so the way I do it is very hacky: download a precompiled build from Dolphin's site (whichever version the PyCore branch is up to date with), get into the Dolphin.app content, then Contents/Frameworks, copy the libMoltenVK.dylib from there to "Externals/MoltenVK/MoltenVK-prefix/src/MoltenVK/Package/Release/MoltenVK/dynamic/dylib/macOS" (inside the build folder, create the folders if they're not here after src/MoltenVK)

2/ verify_app failed while signing the libraries inside Dolphin.app
Like the first issue, I didn't see anyone getting this for Dolphin and I have no idea how to fix this one properly, so the way I do it is just disabling the verification process by going into CMake/DolphinPostprocessBundle.cmake, changing the last line to this: fixup_bundle("${DOLPHIN_BUNDLE_PATH}" "${extra_libs}" "${extra_dirs}" NO_VERIFY)

3/ After this I get one last issue, which is:

Library not loaded: @executable_path/../Frameworks/Python.framework/Versions/3.13/Resources/Python.app/Contents/MacOS/Python
[..] Binaries/Dolphin.app/Contents/MacOS/Dolphin
  Reason: tried: [...]/Binaries/Dolphin.app/Contents/Frameworks/Python.framework/Versions/3.13/Resources/Python.app/Contents/MacOS/Python' (cannot link against a main executable '[..] /Binaries/Dolphin.app/Contents/Frameworks/Python.framework/Versions/3.13/Resources/Python.app/Contents/MacOS/Python')

Might be related to the way I fixed issue 2, but I fix this one by using install_name_tool.

After this, it should run fine with PyCore working.

That's why I'm keeping this as a draft for the moment, I wanna see if these issues are actually related to the code itself or just my weird macOS environnement by seeing if any other macOS users get this to compile.

@got4n got4n marked this pull request as draft June 22, 2025 20:12
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

Successfully merging this pull request may close these issues.

1 participant