Open anthonykelly opened 1 month ago
Thanks for all the debug info. Do you have the log file too?
It looks like it doesn't even get far enough to start the logging.
See below, I removed. the log file tried to launch v4.0.1 and there is still no log file. I then launched v3.0.11 (which works) and the log file is populated.
akelly@MBP-JQ01WW22X1 ~/L/P/brewtarget> pwd
/Users/akelly/Library/Preferences/brewtarget
akelly@MBP-JQ01WW22X1 ~/L/P/brewtarget> rm brewtarget.log
akelly@MBP-JQ01WW22X1 ~/L/P/brewtarget> /Applications/brewtarget_4.0.1.app/Contents/MacOS/Brewtarget
fish: Job 1, '/Applications/brewtarget_4.0.1.…' terminated by signal SIGKILL (Forced quit)
akelly@MBP-JQ01WW22X1 ~/L/P/brewtarget [SIGKILL]> cat brewtarget.log
cat: brewtarget.log: No such file or directory
akelly@MBP-JQ01WW22X1 ~/L/P/brewtarget [1]> /Applications/brewtarget_3.0.11.app/Contents/MacOS/Brewtarget
*** lots of STDOUT output from v3.0.11 removed ***
akelly@MBP-JQ01WW22X1 ~/L/P/brewtarget> cat brewtarget.log
[11:05:10.332] (3z1zeps) INFO : Starting Brewtarget v 3.0.11 (app name "brewtarget" ) on "macOS 14.6" [main.cpp:195]
[11:05:10.332] (3z1zeps) INFO : Built at Sun Feb 4 15:06:55 UTC 2024 on darwin for darwin with clang compiler [main.cpp:198]
[11:05:10.332] (3z1zeps) INFO : Log directory: "/Users/akelly/Library/Preferences/brewtarget" [main.cpp:201]
[11:05:10.332] (3z1zeps) INFO : Using Qt runtime v 5.15.12 (compiled against Qt v 5.15.12 ) [main.cpp:202]
[11:05:10.332] (3z1zeps) INFO : Configuration directory: "/Users/akelly/Library/Preferences/brewtarget" [main.cpp:203]
[11:05:10.332] (3z1zeps) INFO : Data directory: "/Users/akelly/Library/Preferences/brewtarget" [main.cpp:204]
[11:05:10.332] (3z1zeps) INFO : void (anonymous namespace)::initResourceDir(QDir &) Determined resource directory is "/Applications/brewtarget_3.0.11.app/Contents/Resources" [Application.cpp:342]
[11:05:10.332] (3z1zeps) INFO : Resource directory: "/Applications/brewtarget_3.0.11.app/Contents/Resources" [main.cpp:205]
[11:05:10.391] (3z1zeps) INFO : bool Database::load() Known DB drivers: ("QSQLITE") [database/Database.cpp:638]
[11:05:10.391] (3z1zeps) INFO : bool Database::impl::loadSQLite(Database &) dbFileName = " /Users/akelly/Library/Preferences/brewtarget/database.sqlite "
dataDbFileName=" /Applications/brewtarget_3.0.11.app/Contents/MacOS/../Resources/default_db.sqlite " [database/Database.cpp:251]
[11:05:10.393] (3z1zeps) INFO : bool Database::impl::loadSQLite(Database &) SQLite version QVariant(QString, "3.39.2") [database/Database.cpp:303]
[11:05:10.395] (3z1zeps) INFO : bool Database::impl::updateSchema(Database &, bool *) Schema version in DB: 10 , current schema version in code: 10 [database/Database.cpp:399]
[11:05:10.817] (3z1zeps) WARNING : Populating font family aliases took 187 ms. Replace uses of missing font family "Sans Serif" with one that exists to avoid this cost. [:0]
I should add that when I first install v4.0.1 and try to run it I get this error:
Clicking the ?
on this message box show this Help:
After googling I came across this post on the macOS community and so ran xattr -c /Applications/brewtarget_4.0.1.app/
as suggested.
It's only then that I get the error reported above:
The line in the debug report Termination Reason: Namespace CODESIGNING, Code 2 Invalid Page
makes me think it some macOS security (code signing) getting in the way.
Hmm, I wonder if we have to work out how to sign the app - at least that seems to be what's suggested at https://github.com/ahrm/sioyek/issues/806
I was able to build 4.0.1 on my mac and it runs successfully.
However, my mac architecture is arm64 not x86-64 so I had to change one line in CMakeLists.txt
before running the build process.
set(CMAKE_OSX_ARCHITECTURES arm64) # Build arm64 for Apple silicon
#set(CMAKE_OSX_ARCHITECTURES x86_64) # Build intel 64-bit binary.
Perhaps you could try the following to include both architectures
set(CMAKE_OSX_ARCHITECTURES x86_64, arm64) # Build both x86_64 and arm64 for Apple silicon
I don't know if this is really the underlying problem with the release macOS build; perhaps the code signature issue doesn't apply when you build and run locally but for now this is enough for me to move to v4.
Ah, OK, brilliant. Glad you got it working.
Will have a look at the compiler flags. Maybe we can do an Arm and an Intel build.
Brewtarget 4.0.1 quits on startup on macOS:
The details from clicking on
Report..
are: