Recommendation for a Linux distro for building Oolite
Moderators: winston, another_commander, Getafix
- phkb
- Impressively Grand Sub-Admiral
- Posts: 4830
- Joined: Tue Jan 21, 2014 10:37 pm
- Location: Writing more OXPs, because the world needs more OXPs.
Recommendation for a Linux distro for building Oolite
Full disclosure: I am not a Linux user most of the time, and don’t really want to be an expert. But I do want to be able to test building Oolite on Linux. I’ve been trying with Mint in VirtualBox, but haven’t had much success. So, is there a distro recommendation that will, in the fewest possible steps, get me to “make” heaven without too much “sudo” mayhem?
-
- Quite Grand Sub-Admiral
- Posts: 6683
- Joined: Wed Feb 28, 2007 7:54 am
Re: Recommendation for a Linux distro for building Oolite
Have you considered the Windows Linux Subsystem?
https://docs.microsoft.com/en-us/window ... tall-win10
Edit to add: I believe the build system used for Linux releases and nightlies is Ubuntu-based, but I may be remembering something wrong.
https://docs.microsoft.com/en-us/window ... tall-win10
Edit to add: I believe the build system used for Linux releases and nightlies is Ubuntu-based, but I may be remembering something wrong.
- hiran
- Theorethicist
- Posts: 2403
- Joined: Fri Mar 26, 2021 1:39 pm
- Location: a parallel world I created for myself. Some call it a singularity...
Re: Recommendation for a Linux distro for building Oolite
It is Ubuntu based. I have however not yet seen graphical clients.another_commander wrote: ↑Mon Sep 06, 2021 1:04 pmHave you considered the Windows Linux Subsystem?
https://docs.microsoft.com/en-us/window ... tall-win10
Edit to add: I believe the build system used for Linux releases and nightlies is Ubuntu-based, but I may be remembering something wrong.
How do the official and nightly builds get compiled? https://github.com/OoliteProject/nightlies
Sunshine - Moonlight - Good Times - Oolite
-
- Quite Grand Sub-Admiral
- Posts: 6683
- Joined: Wed Feb 28, 2007 7:54 am
Re: Recommendation for a Linux distro for building Oolite
The official builds are done manually when it is time to release. It is actually a quite complicated process that takes anything from 4 to 8 hours for all platforrms, including virus check reports, getting the announcements up and getting the website updated for the upcoming release. Sometimes we can't finish everything in one go, so it may take more than one day to be ready.hiran wrote: ↑Mon Sep 06, 2021 2:41 pmHow do the official and nightly builds get compiled? https://github.com/OoliteProject/nightlies
The nightly builds are a different story. They involve external servers that run scripts checking for new commits on github and firing up sequential builds for Windows and Linux locally, plus a Mac build that is done remotely on another (Mac-powered) server, then collecting and uploading the results to the github nightlies repository. In the past this was done fully automatically, but I think that nowadays the build server has to be started up manually in order to execute the build scripts. Getafix may have more on this if he passes by one of these days and wishes to comment - it was his server and his scripts doing all the hard work.
- hiran
- Theorethicist
- Posts: 2403
- Joined: Fri Mar 26, 2021 1:39 pm
- Location: a parallel world I created for myself. Some call it a singularity...
Re: Recommendation for a Linux distro for building Oolite
This sounds not only that Oolite relies on a private machine to execute the builds, the scripts to build are all stored locally on that server and not available in any github project?another_commander wrote: ↑Mon Sep 06, 2021 5:23 pmThe official builds are done manually when it is time to release. It is actually a quite complicated process that takes anything from 4 to 8 hours for all platforrms, including virus check reports, getting the announcements up and getting the website updated for the upcoming release. Sometimes we can't finish everything in one go, so it may take more than one day to be ready.hiran wrote: ↑Mon Sep 06, 2021 2:41 pmHow do the official and nightly builds get compiled? https://github.com/OoliteProject/nightlies
The nightly builds are a different story. They involve external servers that run scripts checking for new commits on github and firing up sequential builds for Windows and Linux locally, plus a Mac build that is done remotely on another (Mac-powered) server, then collecting and uploading the results to the github nightlies repository. In the past this was done fully automatically, but I think that nowadays the build server has to be started up manually in order to execute the build scripts. Getafix may have more on this if he passes by one of these days and wishes to comment - it was his server and his scripts doing all the hard work.
Sunshine - Moonlight - Good Times - Oolite
-
- ---- E L I T E ----
- Posts: 675
- Joined: Sat Aug 09, 2014 4:16 pm
Re: Recommendation for a Linux distro for building Oolite
You'd only need "sudo" if you wanted to "install" your built system-wide. Otherwise, for your local user build, sudo should not be needed.
About distributions (already advertised on other threads, Slackware Linux user here) I'd guess most of the them have a pre-defined "workstation" or "development" layout for the installable packages out of the bat, such that you can get to that "make" heaven. E.g., in Slackware's case, that usually means you want to install the "d" (for "d"evelopment) series of packages and "l" (for "l"ibraries). In many of the other distributions, the libraries have a "-dev" version that needs to be installed alongside with their runtime only counterparts, if you wanted to run "make" and be able to conveniently link them against your sources.
Regardless of the distribution, you might need to do some tuneup on your Oolite build environment, in order to properly link and use for compilation the included dependencies. This is because the "official/recommended" build system relies on specific version of some of the system dependent packages to be installed, and that layout could had "shifted" due to evolving distribution/package version.
- phkb
- Impressively Grand Sub-Admiral
- Posts: 4830
- Joined: Tue Jan 21, 2014 10:37 pm
- Location: Writing more OXPs, because the world needs more OXPs.
Re: Recommendation for a Linux distro for building Oolite
I gave Slackware a spin, but it's minimalist nature was kind of offputting. So I revisited my Mint 20 install. Brand new VM, updated and patched.
Opened a terminal window and began running commands.
I was running the make process after each apt install in the list above to see that I was reducing the errors each time.
At this point, a build attempt looks like this:
So, some sort of issue with "lstdc++".
What I have tried to fix this (unsuccessfully)
I also got "apt-file" and tried searching for appropriate packages to install - but
Edit to add:
Just to confirm what libstdc++ versions I have installed:
Any suggestions welcome!
Opened a terminal window and began running commands.
Code: Select all
sudo apt install git
git clone https://github.com/OoliteProject/oolite.git
cd oolite
git submodule update --init
sudo apt install libgnustep-base-dev
sudo apt install libsdl1.2-dev
sudo apt install libvorbis-dev
sudo apt install libopenal-dev
sudo apt install libespeak-dev
export GNUSTEP_MAKEFILES=/usr/lib/GNUstep/Makefiles
At this point, a build attempt looks like this:
Code: Select all
nick@Mint20:~/oolite$ make -f Makefile release
make -f GNUmakefile debug=no strip=yes
make[1]: Entering directory '/home/nick/oolite'
This is gnustep-make 2.7.0. Type 'make print-gnustep-make-help' for help.
Running in gnustep-make version 2 strict mode.
/usr/share/GNUstep/Makefiles/objc.make:30: objc.make is deprecated. Please use tool.make instead
/usr/share/GNUstep/Makefiles/objc.make:30: objc.make is deprecated. Please use tool.make instead
Making all for objc_program oolite...
/usr/share/GNUstep/Makefiles/objc.make:30: objc.make is deprecated. Please use tool.make instead
/usr/share/GNUstep/Makefiles/objc.make:30: objc.make is deprecated. Please use tool.make instead
Linking objc_program oolite ...
/bin/sh: 1: nspr-config: not found
/usr/bin/ld: cannot find -lstdc++
collect2: error: ld returned 1 exit status
make[4]: *** [/usr/share/GNUstep/Makefiles/Instance/objc.make:79: obj.spk/oolite] Error 1
make[3]: *** [/usr/share/GNUstep/Makefiles/Instance/objc.make:64: internal-objc_program-all_] Error 2
make[2]: *** [/usr/share/GNUstep/Makefiles/Master/rules.make:297: oolite.all.objc-program.variables] Error 2
make[1]: *** [/usr/share/GNUstep/Makefiles/Master/objc.make:36: internal-all] Error 2
make[1]: Leaving directory '/home/nick/oolite'
make: *** [Makefile:115: release] Error 2
What I have tried to fix this (unsuccessfully)
Code: Select all
sudo apt install g++mingw-w64-i686
sudo apt install g++mingw-w64
sudo apt install libstdc++-7-dev
sudo apt install libstdc++-10-dev
sudo apt-file search libstdc++
returns 32000+ entries, which makes it hard to narrow down.Edit to add:
Just to confirm what libstdc++ versions I have installed:
Code: Select all
nick@Mint20:~/oolite$ sudo apt list --installed libstdc++*
Listing... Done
libstdc++-10-dev/focal-updates,focal-security,now 10.3.0-1ubuntu1~20.04 amd64 [installed]
libstdc++-7-dev/focal,now 7.5.0-6ubuntu2 amd64 [installed]
libstdc++6/focal-updates,focal-security,now 10.3.0-1ubuntu1~20.04 amd64 [installed]
-
- ---- E L I T E ----
- Posts: 675
- Joined: Sat Aug 09, 2014 4:16 pm
Re: Recommendation for a Linux distro for building Oolite
While "offputting" sounds ok, "minimalist" might be a bit ... stretched
You have some sort of issue with libstdc++ _and_ with nspr (-dev) libraries, it seems (for the latter you might want to pass use_deps=yes while running make).phkb wrote: ↑Tue Sep 07, 2021 3:26 am[...]
Linking objc_program oolite ...
/bin/sh: 1: nspr-config: not found
/usr/bin/ld: cannot find -lstdc++
[...]
So, some sort of issue with "lstdc++".
What I have tried to fix this (unsuccessfully)Any suggestions welcome!Code: Select all
sudo apt install g++mingw-w64-i686 sudo apt install g++mingw-w64 sudo apt install libstdc++-7-dev sudo apt install libstdc++-10-dev [...] libstdc++-10-dev/focal-updates,focal-security,now 10.3.0-1ubuntu1~20.04 amd64 [installed] libstdc++-7-dev/focal,now 7.5.0-6ubuntu2 amd64 [installed] libstdc++6/focal-updates,focal-security,now 10.3.0-1ubuntu1~20.04 amd64 [installed]
I am not sure why would you install mingw c++ compiler (I guess because it came up due to ++ ?) -- unless you want to compile exes/dlls for windows under Linux.
From the last listing, it seems you successfully installed "-dev" versions 7 and 10 for your libstdc++ (and also have a version 6 runtime only available -- I'd suspect a dependency), and it seems they are not enough. A good way to check what version of "-dev" libstdc++ you need installed, is to check your c++ compiler version ("g++ --version").
I really have no clue what are the versioning principles for Debian based distros, but from your listing I'd suspect that versions 10 and 6 of your libstdc++ are for g++ version 10.3.0 and version 7 is for g++ version 7.5.0. The bottom line is that you'd have to install the version that creates the /usr/lib64/libstdc++.so file for your compiler (usually symbolic link).
Hope this helps.
- phkb
- Impressively Grand Sub-Admiral
- Posts: 4830
- Joined: Tue Jan 21, 2014 10:37 pm
- Location: Writing more OXPs, because the world needs more OXPs.
Re: Recommendation for a Linux distro for building Oolite
Neither am I! I was just trying as many possibilities as I could to try and get things to compile. I've removed them now, anyway.
g++ --version revealed I didn't have a g++ compiler installed. sudo apt install g++ sorted that out and I've moved on...
To this:
Code: Select all
Linking objc_program oolite ...
/bin/sh: 1: nspr-config: not found
/usr/bin/ld: deps/Linux-deps/x86_64/mozilla/libjs_static.a(jsapi.o): in function `JS_SetContextThread':
jsapi.cpp:(.text+0x93e): undefined reference to `PR_Unlock'
/usr/bin/ld: deps/Linux-deps/x86_64/mozilla/libjs_static.a(jsapi.o): in function `JS_DropPrincipals':
jsapi.cpp:(.text+0x122e): undefined reference to `PR_AtomicDecrement'
/usr/bin/ld: deps/Linux-deps/x86_64/mozilla/libjs_static.a(jsapi.o): in function `StartRequest(JSContext*)':
jsapi.cpp:(.text+0x18dd): undefined reference to `PR_Lock'
/usr/bin/ld: jsapi.cpp:(.text+0x1903): undefined reference to `PR_WaitCondVar'
/usr/bin/ld: jsapi.cpp:(.text+0x1959): undefined reference to `PR_AtomicIncrement'
/usr/bin/ld: deps/Linux-deps/x86_64/mozilla/libjs_static.a(jsapi.o): in function `StopRequest(JSContext*)':
jsapi.cpp:(.text+0x1a2a): undefined reference to `PR_Lock'
/usr/bin/ld: jsapi.cpp:(.text+0x1a7f): undefined reference to `PR_NotifyCondVar'
/usr/bin/ld: jsapi.cpp:(.text+0x1a9e): undefined reference to `PR_AtomicDecrement'
/usr/bin/ld: deps/Linux-deps/x86_64/mozilla/libjs_static.a(jsapi.o): in function `JS_TriggerAllOperationCallbacks':
jsapi.cpp:(.text+0x40ac): undefined reference to `PR_Lock'
/usr/bin/ld: deps/Linux-deps/x86_64/mozilla/libjs_static.a(jsapi.o): in function `JS_TriggerOperationCallback':
jsapi.cpp:(.text+0x431e): undefined reference to `PR_Lock'
/usr/bin/ld: deps/Linux-deps/x86_64/mozilla/libjs_static.a(jsapi.o): in function `JS_ClearContextThread':
jsapi.cpp:(.text+0x4386): undefined reference to `PR_Lock'
/usr/bin/ld: jsapi.cpp:(.text+0x43a7): undefined reference to `PR_Unlock'
/usr/bin/ld: deps/Linux-deps/x86_64/mozilla/libjs_static.a(jsapi.o): in function `JSRuntime::~JSRuntime()':
jsapi.cpp:(.text+0x44fe): undefined reference to `PR_DestroyLock'
/usr/bin/ld: jsapi.cpp:(.text+0x450f): undefined reference to `PR_DestroyCondVar'
/usr/bin/ld: jsapi.cpp:(.text+0x4520): undefined reference to `PR_DestroyCondVar'
/usr/bin/ld: jsapi.cpp:(.text+0x4531): undefined reference to `PR_DestroyLock'
/usr/bin/ld: jsapi.cpp:(.text+0x4542): undefined reference to `PR_DestroyCondVar'
/usr/bin/ld: jsapi.cpp:(.text+0x4553): undefined reference to `PR_DestroyLock'
...and more like the above...
/usr/bin/ld: deps/Linux-deps/x86_64/mozilla/libjs_static.a(jsscript.o): in function `js_CallNewScriptHook(JSContext*, JSScript*, JSFunction*)':
jsscript.cpp:(.text+0x43a): undefined reference to `PR_AtomicDecrement'
/usr/bin/ld: deps/Linux-deps/x86_64/mozilla/libjs_static.a(RegexJIT.o): in function `JSC::Yarr::jitCompileRegex(JSC::ExecutableAllocator&, JSC::Yarr::RegexCodeBlock&, JSLinearString const&, unsigned int&, int&, bool&, bool, bool)':
RegexJIT.cpp:(.text+0x5e5): undefined reference to `PR_AtomicDecrement'
/usr/bin/ld: RegexJIT.cpp:(.text+0x8c5): undefined reference to `PR_AtomicDecrement'
/usr/bin/ld: deps/Linux-deps/x86_64/mozilla/libjs_static.a(RegexCompiler.o): in function `JSC::Yarr::spacesCreate()':
RegexCompiler.cpp:(.text+0x984): undefined reference to `PR_AtomicIncrement'
/usr/bin/ld: deps/Linux-deps/x86_64/mozilla/libjs_static.a(RegexCompiler.o): in function `JSC::Yarr::compileRegex(JSLinearString const&, JSC::Yarr::RegexPattern&)':
RegexCompiler.cpp:(.text+0x19c2): undefined reference to `PR_AtomicDecrement'
/usr/bin/ld: deps/Linux-deps/x86_64/mozilla/libjs_static.a(RegexCompiler.o): in function `JSC::Yarr::CharacterClass::CharacterClass(JSC::Yarr::CharacterClassTable*)':
RegexCompiler.cpp:(.text._ZN3JSC4Yarr14CharacterClassC1EPNS0_19CharacterClassTableE[_ZN3JSC4Yarr14CharacterClassC1EPNS0_19CharacterClassTableE]+0x70): undefined reference to `PR_AtomicIncrement'
collect2: error: ld returned 1 exit status
make[4]: *** [/usr/share/GNUstep/Makefiles/Instance/objc.make:79: obj.spk/oolite] Error 1
make[3]: *** [/usr/share/GNUstep/Makefiles/Instance/objc.make:64: internal-objc_program-all_] Error 2
make[2]: *** [/usr/share/GNUstep/Makefiles/Master/rules.make:297: oolite.all.objc-program.variables] Error 2
make[1]: *** [/usr/share/GNUstep/Makefiles/Master/objc.make:36: internal-all] Error 2
make[1]: Leaving directory '/home/nick/oolite'
make: *** [Makefile:115: release] Error 2
- phkb
- Impressively Grand Sub-Admiral
- Posts: 4830
- Joined: Tue Jan 21, 2014 10:37 pm
- Location: Writing more OXPs, because the world needs more OXPs.
Re: Recommendation for a Linux distro for building Oolite
And after running one more install
I got this:
Very close now, I think!
Code: Select all
sudo apt install libnspr4-dev
Code: Select all
nick@Mint20:~/oolite$ make -f Makefile release
make -f GNUmakefile debug=no strip=yes
make[1]: Entering directory '/home/nick/oolite'
This is gnustep-make 2.7.0. Type 'make print-gnustep-make-help' for help.
Running in gnustep-make version 2 strict mode.
/usr/share/GNUstep/Makefiles/objc.make:30: objc.make is deprecated. Please use tool.make instead
/usr/share/GNUstep/Makefiles/objc.make:30: objc.make is deprecated. Please use tool.make instead
Making all for objc_program oolite...
/usr/share/GNUstep/Makefiles/objc.make:30: objc.make is deprecated. Please use tool.make instead
/usr/share/GNUstep/Makefiles/objc.make:30: objc.make is deprecated. Please use tool.make instead
Linking objc_program oolite ...
/usr/share/GNUstep/Makefiles/mkinstalldirs oolite.app
/usr/share/GNUstep/Makefiles/mkinstalldirs oolite.app/Resources
tools/mkmanifest.sh > oolite.app/Resources/manifest.plist
cp -rf -u Resources/README.TXT oolite.app/Resources
cp -rf -u Resources/InfoPlist.strings oolite.app/Resources
cp -rf -u Resources/AIs oolite.app/Resources
cp -rf -u Resources/Config oolite.app/Resources
cp -rf -u Resources/Scenarios oolite.app/Resources
cp -rf -u Resources/Scripts oolite.app/Resources
cp -rf -u Resources/Shaders oolite.app/Resources
cp -rf -u Resources/Binary/Images oolite.app/Resources
cp -rf -u Resources/Binary/Models oolite.app/Resources
cp -rf -u Resources/Binary/Music oolite.app/Resources
cp -rf -u Resources/Binary/Sounds oolite.app/Resources
cp -rf -u Resources/Binary/Textures oolite.app/Resources
cp -rf -u Schemata oolite.app/Resources
cp -rf -u src/Cocoa/Info-Oolite.plist oolite.app/Resources/Info-gnustep.plist
cp -rf -u obj.spk/oolite oolite.app/oolite
strip oolite.app/oolite
make[1]: Leaving directory '/home/nick/oolite'
mkdir -p AddOns && rm -rf AddOns/Basic-debug.oxp && cp -rf DebugOXP/Debug.oxp AddOns/Basic-debug.oxp
- phkb
- Impressively Grand Sub-Admiral
- Posts: 4830
- Joined: Tue Jan 21, 2014 10:37 pm
- Location: Writing more OXPs, because the world needs more OXPs.
Re: Recommendation for a Linux distro for building Oolite
Running the app gives me this:
I seem to recall seeing someone else with this issue somewhere. I'll try and find the thread and post back.
Edit: I think this thread is the one, although my attempt to implement the solution hasn't worked yet. Still playing though.
I seem to recall seeing someone else with this issue somewhere. I'll try and find the thread and post back.
Edit: I think this thread is the one, although my attempt to implement the solution hasn't worked yet. Still playing though.
- phkb
- Impressively Grand Sub-Admiral
- Posts: 4830
- Joined: Tue Jan 21, 2014 10:37 pm
- Location: Writing more OXPs, because the world needs more OXPs.
Re: Recommendation for a Linux distro for building Oolite
Well, that thread is the same one, as I'm getting the same error in the log file:
However, the solution in that thread didn't work for me.18:07:02.527 [texture.load.png.warning]: ----- A PNG loading warning occurred for (null): Application built with libpng-1.4.7 but running with 1.6.37.
Same errors in the log after doing this. Did I miss a step?Commander_X wrote: ↑Fri Apr 09, 2021 7:04 pmFixing the PNG loading issue is mainly related with starting up Oolite.
Here are the main steps (for a terminal window):
1. create a "deps" folder in the same folder where your oolite executable is
2. copy libpng14.so.* from "<oolite_source_root_folder>/deps/Linux-deps/x86_64/lib" to this folder
3. make sure you are in the oolite executable file's folder, and run:This should let the runtime linker know of the "deps" folder as a source for dynamic libraries, and load the PNG library Oolite was compiled with and expects.Code: Select all
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:deps ./oolite
Last edited by phkb on Tue Sep 07, 2021 9:02 am, edited 1 time in total.
- phkb
- Impressively Grand Sub-Admiral
- Posts: 4830
- Joined: Tue Jan 21, 2014 10:37 pm
- Location: Writing more OXPs, because the world needs more OXPs.
Re: Recommendation for a Linux distro for building Oolite
Solved!
And this seemed to be the trick that made it work:
And this seemed to be the trick that made it work:
Doing that, and rebuilding, got it working! No idea why, though. But I'm just going to plough on regardless.vaxon wrote: ↑Tue Oct 13, 2020 1:51 amEventually resolved the problem by removing png headers from deps:Code: Select all
rm deps/Linux-deps/include/png*
- phkb
- Impressively Grand Sub-Admiral
- Posts: 4830
- Joined: Tue Jan 21, 2014 10:37 pm
- Location: Writing more OXPs, because the world needs more OXPs.
Re: Recommendation for a Linux distro for building Oolite
OK, one last error being reported, although I think it's fairly minor:
Edit: It was this thread, although cim seems to indicate it was a bug which was fixed in 1.81. So, not sure on this one. Anyway, i've got my Linux build now, so ultimately I'm really happy. Thanks Commander_X, for your help with this.
Again, I seem to recall that was reported once before. I'll try to track the thread down.18:21:19.440 [texture.load.png.warning]: ----- A PNG loading warning occurred for /home/nick/oolite/oolite.app/Resources/Textures/trumblekit.png: iCCP: profile 'ICC Profile': 'RGB ': RGB color space not permitted on grayscale PNG.
Edit: It was this thread, although cim seems to indicate it was a bug which was fixed in 1.81. So, not sure on this one. Anyway, i've got my Linux build now, so ultimately I'm really happy. Thanks Commander_X, for your help with this.
- Cody
- Sharp Shooter Spam Assassin
- Posts: 16081
- Joined: Sat Jul 04, 2009 9:31 pm
- Location: The Lizard's Claw
- Contact:
Re: Recommendation for a Linux distro for building Oolite
<applauds>
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
And any survivors, their debts I will certainly pay. There's always a way!