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

Problem using QEmu plugin on MacOS 12.6 #314

Open
walkero-gr opened this issue Oct 19, 2022 · 1 comment
Open

Problem using QEmu plugin on MacOS 12.6 #314

walkero-gr opened this issue Oct 19, 2022 · 1 comment

Comments

@walkero-gr
Copy link

I am trying to use QEmu plugin on FS-UAE running on a MacOS 12.6 enabled system, but there is a problem with the signing of the library.

At first I was getting the following error on FS-UAE log file under cache folder

DLOPEN: dlopen(/Users/walkero/Documents/FS-UAE/System/QEMU-UAE/macOS/x86-64/qemu-uae.so, 0x0002): 
tried: '/Users/walkero/Documents/FS-UAE/System/QEMU-UAE/macOS/x86-64/qemu-uae.so' 
(code signature in <FEC8E612-....> 
'/Users/walkero/Documents/FS-UAE/System/QEMU-UAE/macOS/x86-64/qemu-uae.so' 
not valid for use in process: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.)
DLOPEN: Failed to open /Users/walkero/Documents/FS-UAE/System/QEMU-UAE/macOS/x86-64/qemu-uae.so

Then I used the following solution to ad-hoc sign that library, if possible
https://stackoverflow.com/questions/73844904/how-can-i-adhoc-sign-a-library

This didn't make it work, and the error I got in the logs was

PPC: Loading QEmu implementation
[PLUGINS] Looking up "qemu-uae"
[PLUGINS] Checking "/Applications/FS-UAE.app/Contents/MacOS/../qemu-uae/qemu-uae.so"
[PLUGINS] Checking "/Users/walkero/Documents/FS-UAE/Plugins/QEMU-UAE/macOS/x86-64/qemu-uae.framework/qemu-uae"
[PLUGINS] Checking "/Users/walkero/Documents/FS-UAE/Plugins/QEMU-UAE/macOS/x86-64/qemu-uae.so"
DLOPEN: dlopen(/Users/walkero/Documents/FS-UAE/Plugins/QEMU-UAE/macOS/x86-64/qemu-uae.so, 0x0002): 
tried: '/Users/walkero/Documents/FS-UAE/Plugins/QEMU-UAE/macOS/x86-64/qemu-uae.so' 
(code signature in <9539A983-9188-3F5C-AC95-13678B90F64A> 
'/Users/walkero/Documents/FS-UAE/Plugins/QEMU-UAE/macOS/x86-64/qemu-uae.so' not valid for use in process: 
mapped file has no Team ID and is not a platform binary (signed with custom identity or adhoc?))
DLOPEN: Failed to open /Users/walkero/Documents/FS-UAE/Plugins/QEMU-UAE/macOS/x86-64/qemu-uae.so
WARNING: Error loading qemu-uae plugin

For that, I found that with the latest versions of MacOS every library that needs to be used by a program needs to be signed either with apple or the same Team ID as the executable. That prevents right now the plugins from working with FS-UAE
https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_security_cs_disable-library-validation

Is there any way to make it work? Is there a plan to release a properly signed plugin for QEmu emulation?
Thank you for your time.

@walkero-gr
Copy link
Author

The only way I managed to have that working was by disabling the System Integrity Protection like it described at https://www.imore.com/how-turn-system-integrity-protection-macos

The thing is that this might decrease the system's security, so I think that a better way should be available.

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