Prerequisites (package/port name in parentheses):
- OpenAL Soft (openal)
- SDL2 (sdl2)
- Fluidsynth (fluidsynth, optional)
- CMake (cmake)
- libsndfile (libsndfile)
- libogg (libogg)
- GCC from ports/package repository (gcc, g++, available separately)
- Git (git)
- Install the prerequisites like this as root:Where name-of-package is the name of prerequisite to install. You can optionally install the first 6 prerequisites from the upstreams but the last two must be installed from OpenBSD package repository.
Code: Select all
pkg_add name-of-package
- Clone the GZDoom and ZMusic upstream git repository:
Code: Select all
git clone --recursive https://github.com/coelckers/gzdoom git clone https://github.com/coelckers/ZMusic
- Compile ZMusic:
Code: Select all
cd ZMusic mkdir build cmake -S ./ -B ./build/ -DCMAKE_C_COMPILER=egcc -DCMAKE_CXX_COMPILER=eg++ cd build make make install # run this as root
- Compile GZDoom:
Code: Select all
cd gzdoom mkdir build cmake -S ./ -B ./build/ -DCMAKE_C_COMPILER=egcc -DCMAKE_CXX_COMPILER=eg++ -DCMAKE_PREFIX_PATH=/path/to/ZMusic/build/source/ cd build make
If you successfully built GZDoom, you should see an executable named "gzdoom" inside the build directory. Copy your IWADs to this directory.
Now launch GZDoom, you should see it making to the title screen.
Problems:
- I get a black screen after GZDoom launches.
Cause: Likely related to some dumb changes the OpenBSD developers made to the GLX component (I believe) in Xenocara Mesa3D that causes OpenGL context creation to fail internally despite being reported as being successful to the SDL2 application.
Solution: Launch GZDoom with EGL forced like this:This will force SDL2 to use EGL instead of GLX for OpenGL.Code: Select all
SDL_VIDEO_X11_FORCE_EGL=1 ./gzdoom
- Size mismatch messages followed by a segmentation fault
Cause: This will happen if you type "make install" as root after building GZDoom without launching it first from the build directory, causing the OpenBSD executable loader to think that the RTTI classes/structs have different sizes across C++ libraries, leading to a segmentation fault.
Solution: Launch it first from the build directory before running "make install" as root. - GZDoom's crash reporter does not work properly.
Cause: GZDoom launches the "gdb" program when a crash happens, which in OpenBSD is very old and non-working as compared to GDB from ports which is named "egdb".
Solution: I will do a solution later, once I figure it out. - Vulkan isn't working.
Cause: ICD files are not available.
Solution: Create an ICD file by yourself and save them in ~/.local/share/vulkan/icd.d/. See https://github.com/KhronosGroup/Vulkan- ... ile-format for the format.