Zandronum 3.0 on Raspberry PI

General discussion of the port and Doom-related chat.
Post Reply
Mr.Holub
New User
Posts: 6
Joined: Mon Oct 09, 2017 6:03 pm

Zandronum 3.0 on Raspberry PI

#1

Post by Mr.Holub » Mon Oct 09, 2017 8:59 pm

Here are steps that I've compiled Zandronum 3.0 on Raspberry PI 3 successfully with.
The main difference against Wiki steps for 2.0 is to NOT apply raspberry patch and change of attributes of one variable from static char to signed static char in order to prevent compiler error.

Install packages necessary to perform build:

sudo apt-get install build-essential zlib1g-dev libsdl1.2-dev libjpeg-dev \
nasm tar libbz2-dev libgtk2.0-dev cmake mercurial libfluidsynth-dev libgl1-mesa-dev \
libssl-dev


Create and cd to your working directory:

$ mkdir $HOME/zandronum-build && cd $HOME/zandronum-build

Clone the Zandronum repository:

$ hg clone https://bitbucket.org/Torr_Samaho/zandronum .

Create and cd to the directory where build files will be outputted:

$ mkdir buildserver && cd buildserver

Change variable type from char to signed char in file p_spec.cpp line 1578:

Original declaration:

static const char hexenScrollies[24][2] =
{
{ 0, 1 }, { 0, 2 }, { 0, 4 },
{ -1, 0 }, { -2, 0 }, { -4, 0 },
{ 0, -1 }, { 0, -2 }, { 0, -4 },
{ 1, 0 }, { 2, 0 }, { 4, 0 },
{ 1, 1 }, { 2, 2 }, { 4, 4 },
{ -1, 1 }, { -2, 2 }, { -4, 4 },
{ -1, -1 }, { -2, -2 }, { -4, -4 },
{ 1, -1 }, { 2, -2 }, { 4, -4 }
};

modified declaration with added signed:

signed static const char hexenScrollies[24][2] =
{
{ 0, 1 }, { 0, 2 }, { 0, 4 },
{ -1, 0 }, { -2, 0 }, { -4, 0 },
{ 0, -1 }, { 0, -2 }, { 0, -4 },
{ 1, 0 }, { 2, 0 }, { 4, 0 },
{ 1, 1 }, { 2, 2 }, { 4, 4 },
{ -1, 1 }, { -2, 2 }, { -4, 4 },
{ -1, -1 }, { -2, -2 }, { -4, -4 },
{ 1, -1 }, { 2, -2 }, { 4, -4 }
};

Generate Makefiles

Run cmake, this generates the Makefiles.

$ make clean; \
cmake -DCMAKE_BUILD_TYPE=Release -DSERVERONLY=ON -DNO_ASM=1 ..

The -DNO_ASM=1 argument is important as it doesn't compile the architecture-dependent assembly code.

Girz0r
New User
Posts: 3
Joined: Thu Nov 09, 2017 11:03 pm

Re: Zandronum 3.0 on Raspberry PI

#2

Post by Girz0r » Thu Nov 16, 2017 11:35 pm

What OS are you using? I am using ArchLinux. (4.9.60-1-ARCH - armv7l - Raspberry Pi 2 B)

I attempted to do the build with these changes and received the following errors.

Code: Select all

Determining if the function strnicmp exists failed with the following output:
Change Dir: /home/alarm/zandronum-build/zandronum/buildserver/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_4f72d/fast"
/usr/bin/make -f CMakeFiles/cmTC_4f72d.dir/build.make CMakeFiles/cmTC_4f72d.dir/build
make[1]: Entering directory '/home/alarm/zandronum-build/zandronum/buildserver/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_4f72d.dir/CheckFunctionExists.c.o
/usr/bin/cc   -DCHECK_FUNCTION_EXISTS=strnicmp   -o CMakeFiles/cmTC_4f72d.dir/CheckFunctionExists.c.o   -c /usr/share/cmake-3.9/Modules/CheckFunctionExists.c
Linking C executable cmTC_4f72d
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_4f72d.dir/link.txt --verbose=1
/usr/bin/cc   -DCHECK_FUNCTION_EXISTS=strnicmp    -rdynamic CMakeFiles/cmTC_4f72d.dir/CheckFunctionExists.c.o  -o cmTC_4f72d 
CMakeFiles/cmTC_4f72d.dir/CheckFunctionExists.c.o: In function `main':
CheckFunctionExists.c:(.text+0x14): undefined reference to `strnicmp'
collect2: error: ld returned 1 exit status
make[1]: *** [CMakeFiles/cmTC_4f72d.dir/build.make:98: cmTC_4f72d] Error 1
make[1]: Leaving directory '/home/alarm/zandronum-build/zandronum/buildserver/CMakeFiles/CMakeTmp'
make: *** [Makefile:126: cmTC_4f72d/fast] Error 2


Determining if the function itoa exists failed with the following output:
Change Dir: /home/alarm/zandronum-build/zandronum/buildserver/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_9cd41/fast"
/usr/bin/make -f CMakeFiles/cmTC_9cd41.dir/build.make CMakeFiles/cmTC_9cd41.dir/build
make[1]: Entering directory '/home/alarm/zandronum-build/zandronum/buildserver/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_9cd41.dir/CheckFunctionExists.c.o
/usr/bin/cc   -Wall -Wno-pointer-sign -Wno-uninitialized -DCHECK_FUNCTION_EXISTS=itoa   -o CMakeFiles/cmTC_9cd41.dir/CheckFunctionExists.c.o   -c /usr/share/cmake-3.9/Modules/CheckFunctionExists.c
Linking C executable cmTC_9cd41
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_9cd41.dir/link.txt --verbose=1
/usr/bin/cc   -Wall -Wno-pointer-sign -Wno-uninitialized -DCHECK_FUNCTION_EXISTS=itoa    -rdynamic CMakeFiles/cmTC_9cd41.dir/CheckFunctionExists.c.o  -o cmTC_9cd41 
CMakeFiles/cmTC_9cd41.dir/CheckFunctionExists.c.o: In function `main':
CheckFunctionExists.c:(.text+0x14): undefined reference to `itoa'
collect2: error: ld returned 1 exit status
make[1]: *** [CMakeFiles/cmTC_9cd41.dir/build.make:98: cmTC_9cd41] Error 1
make[1]: Leaving directory '/home/alarm/zandronum-build/zandronum/buildserver/CMakeFiles/CMakeTmp'
make: *** [Makefile:126: cmTC_9cd41/fast] Error 2


Performing C++ SOURCE FILE Test DUMB_CAN_USE_SSE failed with the following output:
Change Dir: /home/alarm/zandronum-build/zandronum/buildserver/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_3d0d9/fast"
/usr/bin/make -f CMakeFiles/cmTC_3d0d9.dir/build.make CMakeFiles/cmTC_3d0d9.dir/build
make[1]: Entering directory '/home/alarm/zandronum-build/zandronum/buildserver/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_3d0d9.dir/src.cxx.o
/usr/bin/c++    -DDUMB_CAN_USE_SSE   -msse -o CMakeFiles/cmTC_3d0d9.dir/src.cxx.o -c /home/alarm/zandronum-build/zandronum/buildserver/CMakeFiles/CMakeTmp/src.cxx
c++: error: unrecognized command line option '-msse'; did you mean '-fdse'?
make[1]: *** [CMakeFiles/cmTC_3d0d9.dir/build.make:66: CMakeFiles/cmTC_3d0d9.dir/src.cxx.o] Error 1
make[1]: Leaving directory '/home/alarm/zandronum-build/zandronum/buildserver/CMakeFiles/CMakeTmp'
make: *** [Makefile:126: cmTC_3d0d9/fast] Error 2

Source file was:
int main() { return 0; }

Girz0r
New User
Posts: 3
Joined: Thu Nov 09, 2017 11:03 pm

Re: Zandronum 3.0 on Raspberry PI

#3

Post by Girz0r » Fri Nov 17, 2017 8:47 pm

Update.

Switched OS to Raspbian Stretch Lite. Great Success!

Confirmed Raspberry Pi 2 B is running a server on the latest alpha build.

Image

Post Reply