fs-uae icon indicating copy to clipboard operation
fs-uae copied to clipboard

Problem using QEmu plugin on MacOS 12.6

Open walkero-gr opened this issue 1 year ago • 1 comments

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 avatar Oct 19 '22 20:10 walkero-gr