AprilBSD
Worst *NIX user ever
I'm new here, so if this isn't the place to put this then let me know.
This tutorial is just from my experience building from source, Always test if it works for you before continuing on with a step.
If you use FreeBSD primarily, and you want to play SRB2, then building it can be quite the hassle if you've never done it before.
If you do not want to build SRB2, then just use wine or the Linuxulator, or use Linux jails.
EDIT: or you could just use the SRB2 on www.freshports.org.. yeah use this as a reminder to always check before you hop into something annoying and complicated.
Step 1. Packages Required
You will need to paste the following into your shell if you do not have the dependencies needed for SRB2
If you use sudo:
If you use doas:
Note: you might want to remove the version numbers from the packages if it becomes outdated.
Step 2. Clone the repository
If you're familiar with cloning git repositories, skip this part.
If you aren't then:
or with their gitlab (They suggest you use this)
Step 3. I hate Makefiles.
You cannot skip this part. Edit the Makefile with your favorite text editor at
The fun doesn't end here!
I can't be bothered to edit a Makefile very well, so the only thing I did was at line 253 of the Makefile was change it from:
to
since it wasn't linking properly.
If it links good for you, then you're lucky.
Step 4. Build
Assuming you didn't cd into src, you can now run
You should get a message after it finishes building that says:
It doesn't matter if $(HOME) is another directory, that just means you cloned the repo somewhere else.
Step 5. Missing pk3s
Remember the zip package from above? We will need that, if you don't have any pk3 files.
None of the pk3s are OS dependent, so you can actually rip them from the SRB2 .zip archive for Windows, and place them into
You might also want to move the models folder over to the build folder as well, on top of models.dat.
If you don't know how to do this, then use a file explorer that comes with your desktop environment to move these files (although copying them would be better.)
That's the end. If you ever wanted to play SRB2 on FreeBSD but struggled to do it because you're not a developer, this simple tutorial will help.
I got most of what I needed to know to build it from the SRB2 wiki & the github.
https://wiki.srb2.org/wiki/Source_code_compiling
This tutorial is just from my experience building from source, Always test if it works for you before continuing on with a step.
If you use FreeBSD primarily, and you want to play SRB2, then building it can be quite the hassle if you've never done it before.
If you do not want to build SRB2, then just use wine or the Linuxulator, or use Linux jails.
EDIT: or you could just use the SRB2 on www.freshports.org.. yeah use this as a reminder to always check before you hop into something annoying and complicated.
Step 1. Packages Required
You will need to paste the following into your shell if you do not have the dependencies needed for SRB2
If you use sudo:
sudo pkg install libopenmpt-0.8.4 FreeBSD-zlib-15.0 sdl2-2.32.10 sdl2_mixer-2.8.1 libnpupnp-6.2.3 miniupnpc-2.3.3_1 libgme-0.6.4 libopenmpt-0.8.4 zip gitIf you use doas:
doas pkg install libopenmpt-0.8.4 FreeBSD-zlib-15.0 sdl2-2.32.10 sdl2_mixer-2.8.1 libnpupnp-6.2.3 miniupnpc-2.3.3_1 libgme-0.6.4 libopenmpt-0.8.4 zip gitNote: you might want to remove the version numbers from the packages if it becomes outdated.
Step 2. Clone the repository
If you're familiar with cloning git repositories, skip this part.
If you aren't then:
git clone https://github.com/STJr/SRB2.git && cd SRB2or with their gitlab (They suggest you use this)
git clone https://git.do.srb2.org/STJr/SRB2.git && cd SRB2Step 3. I hate Makefiles.
You cannot skip this part. Edit the Makefile with your favorite text editor at
SRB2/src/Makefile and uncomment the line that says "FREEBSD=1", it will specify a *nix system other than Linux & Haiku.The fun doesn't end here!
I can't be bothered to edit a Makefile very well, so the only thing I did was at line 253 of the Makefile was change it from:
libs+=$(LDFLAGS)to
libs+=$(LDFLAGS) -lminiupnpc -lSDL2 -lgme -lz -lupnp -lopenmptsince it wasn't linking properly.
If it links good for you, then you're lucky.
Step 4. Build
Assuming you didn't cd into src, you can now run
gmake clean && gmake -j $(sysctl -n kern.smp.cores) sysctl -n kern.smp.cores just lists number of processors, which we will feed into -j.You should get a message after it finishes building that says:
=== Build is done, look for lsdl2srb2 at $(HOME)/SRB2/bin ===It doesn't matter if $(HOME) is another directory, that just means you cloned the repo somewhere else.
Step 5. Missing pk3s
Remember the zip package from above? We will need that, if you don't have any pk3 files.
None of the pk3s are OS dependent, so you can actually rip them from the SRB2 .zip archive for Windows, and place them into
SRB2/binYou might also want to move the models folder over to the build folder as well, on top of models.dat.
If you don't know how to do this, then use a file explorer that comes with your desktop environment to move these files (although copying them would be better.)
That's the end. If you ever wanted to play SRB2 on FreeBSD but struggled to do it because you're not a developer, this simple tutorial will help.
I got most of what I needed to know to build it from the SRB2 wiki & the github.
https://wiki.srb2.org/wiki/Source_code_compiling
Last edited: