QW-Group/ezquake-source

BUG: MAC OSX 12.0 create_osx_bundle.sh error

Closed this issue · 4 comments

ezQuake version:
Attempted source code build for MAC OSX from Repo on 9th Jan 2022

OS/device including version:
Hardware Overview:

Model Name: MacBook Pro
Model Identifier: MacBookPro11,4
Processor Name: Quad-Core Intel Core i7
Processor Speed: 2.2 GHz
Number of Processors: 1
Total Number of Cores: 4
L2 Cache (per Core): 256 KB
L3 Cache: 6 MB
Hyper-Threading Technology: Enabled
Memory: 16 GB
System Firmware Version: 428.60.3.0.0
OS Loader Version: 540.60.2~89
SMC Version (system): 2.29f24

System Software Overview:

System Version: macOS 12.1 (21C52)
Kernel Version: Darwin 21.2.0
Secure Virtual Memory: Enabled
System Integrity Protection: Enabled

Describe the bug
Unable to build the ezQuake.app using the script provided. Following the MAC OSX build instructions using homebrew works perfectly to the point of issuing the make command

Executing the create_osx_bundle.sh script, trying to build ezQuake on MAC OSX Monteray, results in the following errors output

Andrews-MacBook-Pro:ezquake-source-master andrewjohnson$ sh misc/install/create_osx_bundle.sh
/Library/Developer/CommandLineTools/usr/bin/install_name_tool: fatal error: file not in an order that can be processed (link edit information does not fill the __LINKEDIT segment): ezQuake.app/Contents/MacOS/ezquake-darwin-x86_64
/Library/Developer/CommandLineTools/usr/bin/install_name_tool: fatal error: file not in an order that can be processed (link edit information does not fill the __LINKEDIT segment): ezQuake.app/Contents/MacOS/ezquake-darwin-x86_64
/Library/Developer/CommandLineTools/usr/bin/install_name_tool: fatal error: file not in an order that can be processed (link edit information does not fill the __LINKEDIT segment): ezQuake.app/Contents/MacOS/ezquake-darwin-x86_64
/Library/Developer/CommandLineTools/usr/bin/install_name_tool: fatal error: file not in an order that can be processed (link edit information does not fill the __LINKEDIT segment): ezQuake.app/Contents/MacOS/ezquake-darwin-x86_64
/Library/Developer/CommandLineTools/usr/bin/install_name_tool: fatal error: file not in an order that can be processed (link edit information does not fill the __LINKEDIT segment): ezQuake.app/Contents/MacOS/ezquake-darwin-x86_64
/Library/Developer/CommandLineTools/usr/bin/install_name_tool: fatal error: file not in an order that can be processed (link edit information does not fill the __LINKEDIT segment): ezQuake.app/Contents/MacOS/ezquake-darwin-x86_64
/Library/Developer/CommandLineTools/usr/bin/install_name_tool: fatal error: file not in an order that can be processed (link edit information does not fill the __LINKEDIT segment): ezQuake.app/Contents/MacOS/ezquake-darwin-x86_64
/Library/Developer/CommandLineTools/usr/bin/install_name_tool: fatal error: file not in an order that can be processed (link edit information does not fill the __LINKEDIT segment): ezQuake.app/Contents/Frameworks/libvorbisenc.2.dylib
/Library/Developer/CommandLineTools/usr/bin/install_name_tool: fatal error: file not in an order that can be processed (link edit information does not fill the __LINKEDIT segment): ezQuake.app/Contents/Frameworks/libvorbisenc.2.dylib

I believe this eminates from the fixbundle.sh subscript and may relate to something with code signing requirements of later OSX versions

Just wondering if there anyone has any experience building for the latest OSX versions or whether this is not likely to work at all due to Apple implementing tighter app security. Keen to get it working if possible

Expected behavior
App bundle correctly created.

I get the same messages on M1 machine. Hoever the bundle gets created nonetheless and it runs.

Does it not run for you?

All errors seem to the 3rd party libraries installed via homebrew. So perhaps that is something how these are getting generated. Again some particular change by Apple. If anyone knows some details..

EDIT:

it probably runs on your local machine, but copying the bundle somewhere else will probably be broken.

Could you try with this change:

diff --git a/misc/install/fixbundle.sh b/misc/install/fixbundle.sh
index ef96b53f..8e93931a 100644
--- a/misc/install/fixbundle.sh
+++ b/misc/install/fixbundle.sh
@@ -89,8 +89,8 @@ done
 
 function fix_symbols {
        for DEP in $(get_deps "$1"); do
-               codesign --remove-signature "$1"
                install_name_tool -change "$DEP" "@executable_path/../Frameworks/$(basename $(realpath $DEP))" "$1"
+               codesign --remove-signature "$1"
                codesign -s - "$1"
        done
 }

You will get a couple of warnings, but I guess it is okay to ignore them.

Thanks for the quick response. I will try this and see what happens, though i think i have another problem now since raising this issue to do with another Apple update breaking the make. Will feed back as soon as i can.

This works for me, thanks for the quick update.