Open zzj0402 opened 1 year ago
I don't have a mac device right now, so I can't help you much, but I remember having this issue when I tried to compile on a mac, I don't exactly remember how I fixed it though. MacOS requires the executable to be signed to execute. I think executing the raw sioyek executable (instead of the packaged app) works if I remember correctly.
I don't have a mac device right now, so I can't help you much, but I remember having this issue when I tried to compile on a mac, I don't exactly remember how I fixed it though. MacOS requires the executable to be signed to execute. I think executing the raw sioyek executable (instead of the packaged app) works if I remember correctly.
What do you mean by "raw sioyek executable (instead of the packaged app)"? In the build fold, there is only one .app which requires signing.
% codesign --sign - sioyek.app
sioyek.app: code object is not signed at all
In subcomponent: build/sioyek.app/Contents/MacOS/keys_user.config
I managed to sign the app with:
codesign --force --deep --sign - sioyek.app
But it is asking for libpng in a location that doesn't exist:
'/usr/lib/libpng16.16.dylib' (no such file, not in dyld cache)Library not loaded: @loader_path/../../../../../../../opt/pcre2/lib/libpcre2-16.0.dylib
Is this hardcoded in a script somewhere?
The locally build version:
/build/sioyek.app/Contents/MacOS/sioyek ; exit;
dyld[1065]: Library not loaded: @loader_path/../../../../../../../opt/libpng/lib/libpng16.16.dylib
As a comparison, the publicly released version:
Desktop/sioyek.app/Contents/MacOS/sioyek ; exit;
default_config_path: /Users/zingg/Desktop/sioyek.app/Contents/MacOS/prefs.config
default_keys_path: /Users/zingg/Desktop/sioyek.app/Contents/MacOS/keys.config
user_config_path: [ 0 ] /Users/zingg/.config/sioyek/prefs_user.config
user_config_path: [ 1 ] /Users/zingg/Library/Application Support/sioyek/prefs_user.config
user_keys_path: [ 0 ] /Users/zingg/.config/sioyek/keys_user.config
user_keys_path: [ 1 ] /Users/zingg/Library/Application Support/sioyek/keys_user.config
database_file_path: /Users/zingg/Library/Application Support/sioyek/test.db
local_database_file_path: /Users/zingg/Library/Application Support/sioyek/local.db
global_database_file_path: /Users/zingg/Library/Application Support/sioyek/shared.db
tutorial_path: /Users/zingg/Desktop/sioyek.app/Contents/MacOS/tutorial.pdf
last_opened_file_address_path: /Users/zingg/Library/Application Support/sioyek/last_document_path.txt
shader_path: /Users/zingg/Desktop/sioyek.app/Contents/MacOS/shaders
Creating shared memory block...
Shared memory created: this is the primary application.
Starting IPC server...
IPC server started.
In the build fold, there is only one .app which requires signing.
You can open the .app like a directory and find the executable inside.
I am following the "install from source" guide to test build on my m1 Macbook Air. It builds successfully but the app would not run: