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

MacOS build instructions are building unopenable file #1387

Open
snorbik opened this issue Sep 3, 2022 · 5 comments
Open

MacOS build instructions are building unopenable file #1387

snorbik opened this issue Sep 3, 2022 · 5 comments
Assignees

Comments

@snorbik
Copy link

snorbik commented Sep 3, 2022

I followed your intructions in Readme file, but when I try to open the built file, it crashes immediately.

App openxcom quit unexpectedly.
Ignore / Report

Using MacBook Pro 14" with M1 PRO chip.

Any advise how to build it properly?

@jakestanley
Copy link

Are you having the same issue as this?

-------------------------------------
Translated Report (Full Report Below)
-------------------------------------

Process:               openxcom [92962]
Path:                  /Users/USER/*/openxcom.app/Contents/MacOS/openxcom
Identifier:            SupSuper.openxcom
Version:               1.0 ()
Code Type:             ARM-64 (Native)
Parent Process:        launchd [1]
User ID:               501

Date/Time:             2022-10-24 20:54:29.8105 +0100
OS Version:            macOS 12.6 (21G115)
Report Version:        12
Anonymous UUID:        96F98092-B2F5-562A-B704-E0AAD71B0E25

Sleep/Wake UUID:       7DCC4289-FCAE-4406-B4FE-B0D3E586FA5D

Time Awake Since Boot: 280000 seconds
Time Since Wake:       924 seconds

System Integrity Protection: enabled

Crashed Thread:        0

Exception Type:        EXC_BAD_ACCESS (SIGKILL (Code Signature Invalid))
Exception Codes:       UNKNOWN_0x32 at 0x0000000107408000
Exception Codes:       0x0000000000000032, 0x0000000107408000
Exception Note:        EXC_CORPSE_NOTIFY

Termination Reason:    Namespace CODESIGNING, Code 2 

@jakestanley
Copy link

I got past this stage by running

codesign --force --deep --sign - build/openxcom.app

I'd like to get to the bottom of why I need to sign it, but I now have another problem: Failed loading SDL2 library

@SupSuper
Copy link
Member

I think modern macOS versions require all executables to be signed (either a temporary developer signature or a permanent paid signature). Would be nice if it showed an error instead of a crash though.

Do these builds work for you: https://macsourceports.com/game/xcomufo
Might be worth asking how they did it.

I'd like to get to the bottom of why I need to sign it, but I now have another problem: Failed loading SDL2 library

Are you using the original SDL1.2 or sdl12-compat? sdl12-compat requires SDL2, as it's just a compatibility shim.

@avandriets
Copy link

I got past this stage by running

codesign --force --deep --sign - build/openxcom.app

I'd like to get to the bottom of why I need to sign it, but I now have another problem: Failed loading SDL2 library

In order to fix this issue you should install SDL2 lib.
Here is a video how to setup SDL2 on macos.

@jakestanley
Copy link

@avandriets I have SDL2 installed, both the framework under /Library/Frameworks as suggested in the video, and via brew. For some reason the framework however is not bundled in the executable and sdl2 isn't linked. I've been debugging CMakeLists but haven't made much progress. The app runs with the SDL2 framework installed. The app does boot after following the instructions in the video, but I want a clean build that runs outside of my environment.

@SupSuper I may get in touch with them actually. I'm using sdl12-compat, yes.

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

4 participants