20:50:56.275 [gnustep]: 2023-03-05 20:50:56.275 oolite[161474:161474] src/Core/Scripting/OOJavaScriptEngine.h:121 Assertion failed in OOJSAcquireContext. Attempt to use JavaScript context before JavaScript engine is initialized.
20:50:56.275 [startup.exception]: ***** Unhandled exception during startup: NSInternalInconsistencyException (src/Core/Scripting/OOJavaScriptEngine.h:121 Assertion failed in OOJSAcquireContext. Attempt to use JavaScript context before JavaScript engine is initialized.).
Should I build it with some special flags or macroses or whatever?
Thanks!
As a result of your compilation you should have an "oolite.app" folder under your build folder, which should contain "oolite" (the "exe" file), and a "Resources" folder.
For running, you'd have to use the same libraries the compiler used when created the executable "oolite". Some of these libraries should be part of your OS (i.e. /usr/lib[64], and/or /usr/local/lib[64]) some will come from the dependencies recommended to use (those under "deps/Linux-deps" in the source tree). Also a necessity might be to run the GNUstep's initialization script before starting Oolite.
It could be interesting to know if the errors you show from the Latest.log file were accompanied by other errors that in the terminal/console window (i.e. try to start the game from a terminal and check if there are any complaints there, too).
Can you please provide some information about what exact steps you follow to compile?
The Linux build was switched to statically linking with the mozilla spidermonkey some time ago because at some point all the compile error reports we were getting for Linux had to do with libjs and its different incarnations accross distros and local setups. The static link with the library we are providing ensures that the actual libjs that we want is going to be linked and embedded in the executable.
Without claiming to have any Linux knowledge, my recommendation would be to ensure that you are linking with the static library in oolite-linux-dependencies/x86_64/mozilla/. The headers corresponding to that library are also included in that same folder. Building your own libjs should not be required anymore.
Yes, what another_commander stated above seems about right. If you compiled with the static version of mozjs, having the javascript engine initialized would be your last concern
For the record, following most of the instructions in the README.md file of the source code, 2 options I usually pass to make at compilation time are "debug=no use_deps=yes".
./Resources
./Resources/Scripts
./Resources/Scripts/<big list of js scripts>
./Resources/InfoPlist.strings
./Resources/Music
./Resources/Music/OoliteTheme.ogg
./Resources/Music/BlueDanube.ogg
./Resources/README.TXT
./Resources/oolite-icon.icns
./Resources/Textures
./Resources/Textures/<big list of textures>
./Resources/Shaders
./Resources/Shaders/<list of shaders>
./Resources/Images
./Resources/Images/<list of images>
./Resources/Models
./Resources/Models/<big list of models>
./Resources/Info-gnustep.plist
./Resources/AIs
./Resources/AIs/<big list of AIs>
./Resources/oolite-document.icns
./Resources/AIReference.html
./Resources/Scenarios
./Resources/Scenarios/<list of scenarios>
./Resources/Sounds
./Resources/Sounds/<big list of sounds>
./Resources/oolite-expansion-document.icns
./Resources/Config
./Resources/Config/<big list of configs>
./oolite
./Contents
If this experience could be collected into a Github Workflow at https://github.com/OoliteProject/oolite ... /workflows it would be a real asset. Github would then automatically build the Linux version upon each an every change.