carlosonunez / obs-installer-for-apple-silicon

Conveniently build and install OBS from source on your ultra-fast Apple M1 MacBook or Mac
206 stars 23 forks source link

Fresh install of MacOS and OBS still triggers Rosetta install on run #33

Closed spm1001 closed 2 years ago

spm1001 commented 2 years ago

Sorry if this is silly one - I've not previously used OBS and wanted to go straight to this M1 version.

Compilation completed without error (using M1 version of Homebrew too if that matters.)

On trying to run the newly minted OBS I get the 'To open 'OBS' you need to install Rosetta' dialog so am assuming there's an x86 binary lurking somewhere? Ideally I'd like to live without Rosetta at all.

Tried using file to discover it - seems to be one stray x86_64 for virtualcam which might be the trigger?

% find . * -exec file {} \; > results.out
% cat results.out | grep x86
...
./Contents/Resources/data/obs-mac-virtualcam.plugin/Contents/MacOS/obs-mac-virtualcam: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit bundle x86_64] [arm64:Mach-O 64-bit bundle arm64]
./Contents/Resources/data/obs-mac-virtualcam.plugin/Contents/MacOS/obs-mac-virtualcam (for architecture x86_64):    Mach-O 64-bit bundle x86_64
...

Removing the plugin from the OBS folder still gives the error but I'm not sure when MacOS interrogates the app to see if it needs Rosetta.

It might be nice if it didn't trigger the Rosetta install but not sure if that's possible.

carlosonunez commented 2 years ago

Thanks for raising this, @spm1001. Unfortunately I can't reproduce this in my environment. Furthermore, I can confirm that VirtualCam is compiled as a universal binary and its object file targets arm64:

/Applications/OBS.app//Contents/Resources/obs-plugins/mac-virtualcam.so: Mach-O 64-bit bundle arm64
/Applications/OBS.app//Contents/Resources/data/obs-plugins/mac-virtualcam/obs-mac-virtualcam.plugin/Contents/MacOS/obs-mac-virtualcam: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit bundle x86_64] [arm64:Mach-O 64-bit bundle arm64]
/Applications/OBS.app//Contents/Resources/data/obs-plugins/mac-virtualcam/obs-mac-virtualcam.plugin/Contents/MacOS/obs-mac-virtualcam (for architecture x86_64):    Mach-O 64-bit bundle x86_64
/Applications/OBS.app//Contents/Resources/data/obs-plugins/mac-virtualcam/obs-mac-virtualcam.plugin/Contents/MacOS/obs-mac-virtualcam (for architecture arm64): Mach-O 64-bit bundle arm64

Universal binaries will run using the same architecture as its parent process; see here for more information.

Confirm that the shell that you're running ./install.sh from is running using arm64 instructions:

$: arch
arm64
Rodentia commented 2 years ago

I have the same issue on a fresh macOS 12.0.1 install. All binaries and libs seem to have arm64 versions or bundles, but double clicking the app still tries to install Rosetta. Some interesting messages from console:

error 12:30:59.157670-0700 Finder LAUNCH: User preference exists for x86_64 but runtime support is not installed. error 12:30:59.157774-0700 Finder LAUNCH: Launch failure with -10669/ <private> error 12:30:59.158874-0700 CoreServicesUIAgent handle LS launch error: {\n Action = oapp;\n AppMimimumSystemVersion = "10.8.5";\n AppPath = "/Applications/OBS.app";\n ErrorCode = "-10669";\n}

Any idea where this "user preference" comes from or is stored?

Rodentia commented 2 years ago

Interestingly, launching from the command line works:

% open /Applications/OBS.app/Contents/MacOS/OBS error: CheckAppWithSameBundleID: Could not find bundle identifier info: CPU Name: Apple M1 Max info: Physical Cores: 10, Logical Cores: 10 info: Physical Memory: 65536MB Total info: OS Name: Mac OS X info: OS Version: Version 12.0.1 (Build 21A559) info: Kernel Version: 21.1.0 error: hotkeys-cocoa: Getting keyboard keys failed info: hotkeys-cocoa: Using layout 'com.apple.keylayout.US' info: Current Date/Time: 2021-11-13, 12:43:05 info: Browser Hardware Acceleration: true info: Portable mode: false QMetaObject::connectSlotsByName: No matching signal for on_tbar_position_valueChanged(int) QMetaObject::connectSlotsByName: No matching signal for on_actionShowTransitionProperties_triggered() QMetaObject::connectSlotsByName: No matching signal for on_actionHideTransitionProperties_triggered() info: OBS 27.1.3-modified (mac)

carlosonunez commented 2 years ago

That's a weird one. Unfortunately, I'm not sure. You might want to try running fs_usage while you start up OBS to see which plist Finder is accessing here. Strangely enough, I can't find any documentation on that specific error on the Internet.

rgaufman commented 2 years ago

I have a clean Mac install (installed 1 hour ago!) - I haven't installed anything else yet except for homebrew.

I am running install.sh:

hackeron@Romans-MacBook-Pro obs-installer-for-apple-silicon % arch
arm64
hackeron@Romans-MacBook-Pro obs-installer-for-apple-silicon % ./install.sh
[Sun  6 Feb 2022 19:57:53 GMT] INFO: Deleting OBS, StreamFX, and Virtual Camera. Type your password in when prompted...
[Sun  6 Feb 2022 19:57:53 GMT] INFO: ---> Deleting /Applications/OBS.app
Password:
...
... TRUNCATED COMPILE OUTPUT
/tmp/obsdeps/lib/./libjansson.4.dylib -> /Users/hackeron/Downloads/OBS.app/Contents/Resources/bin/./libjansson.4.dylib
[Sun  6 Feb 2022 19:59:48 GMT] INFO: Removing VLC and CEF...
[Sun  6 Feb 2022 19:59:48 GMT] INFO: Removing OBS sources...
[Sun  6 Feb 2022 19:59:49 GMT] INFO: Installation succeeded! Move OBS from your Downloads folder into your Applications folder when the window pops up.
hackeron@Romans-MacBook-Pro obs-installer-for-apple-silicon %
hackeron@Romans-MacBook-Pro obs-installer-for-apple-silicon % echo $?
0

When I click on the OBS executable, it tries to install rosetta.

However, if I run it like this, it doesn't!

hackeron@Romans-MacBook-Pro obs-installer-for-apple-silicon % ~/Downloads/OBS.app/Contents/MacOS/OBS

Very strange!

carlosonunez commented 2 years ago

Hey, Roman; thanks for using this!

Can you try running this in Bash instead of zsh? On Feb 6, 2022, 14:01 -0600, Roman Gaufman @.***>, wrote:

I have a clean Mac install (installed 1 hour ago!) - I haven't installed anything else yet except for homebrew. I am running install.sh: @. obs-installer-for-apple-silicon % arch arm64 @. obs-installer-for-apple-silicon % ./install.sh [Sun 6 Feb 2022 19:57:53 GMT] INFO: Deleting OBS, StreamFX, and Virtual Camera. Type your password in when prompted... [Sun 6 Feb 2022 19:57:53 GMT] INFO: ---> Deleting /Applications/OBS.app Password: ... ... TRUNCATED COMPILE OUTPUT /tmp/obsdeps/lib/./libjansson.4.dylib -> /Users/hackeron/Downloads/OBS.app/Contents/Resources/bin/./libjansson.4.dylib [Sun 6 Feb 2022 19:59:48 GMT] INFO: Removing VLC and CEF... [Sun 6 Feb 2022 19:59:48 GMT] INFO: Removing OBS sources... [Sun 6 Feb 2022 19:59:49 GMT] INFO: Installation succeeded! Move OBS from your Downloads folder into your Applications folder when the window pops up. @. obs-installer-for-apple-silicon % @. obs-installer-for-apple-silicon % echo $? 0 When I click on the OBS executable, it tries to install rosetta. However, if I run it like this, it doesn't! @. obs-installer-for-apple-silicon % ~/Downloads/OBS.app/Contents/MacOS/OBS Very strange! — Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you modified the open/close state.Message ID: @.>