I’ve been trying to figure out for a couple of days how to build the source of the DXX-Rebirth project, a F/OSS engine implementation of Descent I and II, under Haiku. However, I’m not very familiar with the Scons build system that the project uses for building.
All of the needed tools and libraries are available in HaikuPorts (full list on GitHub here), which is great, but I have to figure out how to add Haiku support into the Sconstruct file itself so that the build will succeed.
Can anyone share a pointer or two about how to work with Sconstruct files and adding Haiku support to one? I’d love to see DXX-Rebirth working in Haiku, and it would add to the growing list of games available for the platform.
Well, for starters, SCons is a Python library and the SConstruct file is a Python script that calls it. Python 3.x broke compatibility with Python 2.x so if you call SConstruct from the wrong version of Python that could cause problems. What version of Python are you using?
My Haiku VM has both Python 2.7.17 and Python 3.7.10 installed.
The issue isn’t the version of Python I have here; it’s declaring Haiku as a valid build host platform so that DXX-Rebirth can build. This is what happens currently when you run scons in Haiku:
~/dxx-rebirth> scons d1x-rebirth scons: Reading SConscript files ... ===== D1X-Rebirth v0.61.0 0.60.0-beta2-870-g0b141ea122a4 0b141ea122a4a5bd1d9cce546e5e3b26d2232a5b ===== ===== D2X-Rebirth v0.61.0 0.60.0-beta2-870-g0b141ea122a4 0b141ea122a4a5bd1d9cce546e5e3b26d2232a5b ===== scons: *** Invalid value for option host_platform: haiku1. Valid values are: ('darwin', 'linux', 'freebsd', 'openbsd', 'win32') File "/boot/home/dxx-rebirth/SConstruct", line 5331, in main
Microsoft Visual Studio is not supported at this time. Support for Microsoft Visual Studio will be added when it implements sufficient C++17 features for the code to build with few or no modifications.
SDL 1.2. SDL 2 is also supported, and will become the default soon.
My current VM (32-bit) has gcc 2.9.5 and 8.3.0 installed, and I just installed clang (llvm12) from HaikuDepot. Going to try with clang to see if it’ll work.
Built a 64-bit Haiku VM, installed all the needed libraries, and tried compiling dxx-rebirth again, but I’m still coming up short; the screenshot below can illustrate the issues I’m having compiling in 64-bit Haiku.
Specifically, twice I get this error:
g++: error: unrecognized command line option “-pthread”
Searches aren’t turning up any info about this particular option, so I’m at a bit of a loss here.
It’s been a while since we were on this thread, hasn’t it?
Some recent commits to the dxx-rebirth project have gotten the build system to recognize Haiku as a platform, after some back and forth and through an issue I opened up on the GitHub repo:
I’m doing a test build to see if it works properly, or at least to see how far it gets before any failures. But now we’re a little closer to having Descent and Descent II available for Haiku!