Zandronum 3.0 on Raspberry PI

General discussion of the port and Doom-related chat.
Post Reply
Mr.Holub
New User
Posts: 15
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

Nekrofage
Registered just to make one post
Posts: 1
Joined: Sun Jan 07, 2018 3:41 pm

Re: Zandronum 3.0 on Raspberry PI

#4

Post by Nekrofage » Sun Jan 07, 2018 3:44 pm

Hi,

If you want to compile the Zandronum client, I suggest you to use this repo: https://bitbucket.org/ptitSeb/zandronum
With my diff file: https://github.com/Nekrofage/zandronum3

User avatar
oddbenk
New User
Posts: 18
Joined: Sat Dec 10, 2016 7:36 pm

Re: Zandronum 3.0 on Raspberry PI

#5

Post by oddbenk » Fri Mar 02, 2018 8:02 pm

My question is to the author that if i manage to create the server... where and how can i set the playmode and the maps and music and stuff

I know it might sound like a stupid question but i would like to know before i set it up.

Also if i use custom pk3 files where people can get it from? Will it be an automatic download for them trought the doomseeker or should i upload it somewhere and link it to the srv deacription in doomseeker?

Again
Please forgive me if this is a dumb question. Aimoly i do not kbow this and want to get informed.

Thanks for the answers!

User avatar
Torr Samaho
Lead Developer
Posts: 1543
Joined: Fri May 25, 2012 6:03 pm
Location: Germany

Re: Zandronum 3.0 on Raspberry PI

#6

Post by Torr Samaho » Mon Mar 05, 2018 9:03 pm

The Raspi server behaves like a Linux server, i.e. you have to configure it either via the command line call you use to start the server or with its text console. You can find some more information on the Wiki: https://wiki.zandronum.com/Creating_a_Game_Server

Mr.Holub
New User
Posts: 15
Joined: Mon Oct 09, 2017 6:03 pm

Re: Zandronum 3.0 on Raspberry PI

#7

Post by Mr.Holub » Fri Mar 23, 2018 10:04 pm

I've tried to compile it for OrangePI ZERO now but my problem is that client of Zandronum 3.0 (official Windows build) claims that version of server's protocol is different. Where can I get correct version of source files compatible with official Zandronum build version 3.0?
It appears that there is some development version now but cannot find version used for official builds (to have server compatible).

Mr.Holub
New User
Posts: 15
Joined: Mon Oct 09, 2017 6:03 pm

Re: Zandronum 3.0 on Raspberry PI

#8

Post by Mr.Holub » Fri Dec 28, 2018 6:32 pm

I've revisited this and added specific version (3.0) in order not to mirror head version (which is not compatible with official clients).
I was able to compile/run this on different hardware based on armv7l (other than Raspberry PI).

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 ZA_3.0 repository:

$ hg clone -r ZA_3.0 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:

$ 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.

Build Zandronum:

make

User avatar
TDRR
Forum Regular
Posts: 214
Joined: Thu Jun 28, 2018 9:13 pm
Location: Venezuela

Re: Zandronum 3.0 on Raspberry PI

#9

Post by TDRR » Fri Jan 04, 2019 7:05 am

Sorry if this is a bit off topic, but how does it perform in the different Raspberry Pis? I assume RP1 is basically unplayable on anything else that isn't a vanilla-compatible map but what about the others?
"I will find joy in Yahweh. I will delight in my Elohim. He has dressed me in the clothes of salvation. He has wrapped me in the robe of righteousness like a bridegroom with a priest’s turban, like a bride with her jewels."
-Isaiah 61:10 (Names of God Bible)

Tracker303
New User
Posts: 4
Joined: Thu Nov 29, 2018 1:20 pm

Re: Zandronum 3.0 on Raspberry PI

#10

Post by Tracker303 » Tue Jan 22, 2019 3:08 pm

Another compatibility-related question: would it run on DietPi, and what changes do I have to do for it to work?

PPablo
New User
Posts: 4
Joined: Tue Jan 22, 2019 1:53 am
Location: Valparaiso, Chile
Contact:

Re: Zandronum 3.0 on Raspberry PI

#11

Post by PPablo » Fri Jan 25, 2019 5:22 pm

Hi

I've followed your instructions to compile Zandro 3.0 on my RPi 3 with Raspbian, and it works but after running the server appears the following error: "Can't find masterhostname master.zandronum.com! Either correct masterhostname or set sv_updatemaster to false". The server only shows on Doomsekeer on LAN but doesn't appear outside the network, i've opened the ports 10666 - 10700 on my router and i've made the IP address of the RPi static

PPablo
New User
Posts: 4
Joined: Tue Jan 22, 2019 1:53 am
Location: Valparaiso, Chile
Contact:

Re: Zandronum 3.0 on Raspberry PI

#12

Post by PPablo » Fri Jan 25, 2019 5:25 pm

Tracker303 wrote:
Tue Jan 22, 2019 3:08 pm
Another compatibility-related question: would it run on DietPi, and what changes do I have to do for it to work?
Those intructions are suitable for DebianOS and since DietPi is based on Debian so yes, it should it work (in mi case i've compiled Zandronum on Raspbian which is also based on Debian)

User avatar
Torr Samaho
Lead Developer
Posts: 1543
Joined: Fri May 25, 2012 6:03 pm
Location: Germany

Re: Zandronum 3.0 on Raspberry PI

#13

Post by Torr Samaho » Sun Jan 27, 2019 7:05 pm

PPablo wrote:
Fri Jan 25, 2019 5:22 pm
I've followed your instructions to compile Zandro 3.0 on my RPi 3 with Raspbian, and it works but after running the server appears the following error: "Can't find masterhostname master.zandronum.com! Either correct masterhostname or set sv_updatemaster to false". The server only shows on Doomsekeer on LAN but doesn't appear outside the network, i've opened the ports 10666 - 10700 on my router and i've made the IP address of the RPi static
See my reply in your other thread. Sounds like the DNS lookup for "master.zandronum.com" doesn't work.

Tracker303
New User
Posts: 4
Joined: Thu Nov 29, 2018 1:20 pm

Re: Zandronum 3.0 on Raspberry PI

#14

Post by Tracker303 » Sun Feb 24, 2019 9:49 am

PPablo wrote:
Fri Jan 25, 2019 5:25 pm
Those intructions are suitable for DebianOS and since DietPi is based on Debian so yes, it should it work (in mi case i've compiled Zandronum on Raspbian which is also based on Debian)
Great, I tried it and it does work, thanks!
Sorry for not answering earlier.

sleepydev
Registered just to make one post
Posts: 1
Joined: Fri Jun 14, 2019 10:07 pm

Re: Zandronum 3.0 on Raspberry PI

#15

Post by sleepydev » Fri Jun 14, 2019 10:12 pm

Sorry for the bump. Just wondering, did anyone ever find a fix for the DNS issue? Trying to create a small duel server with my pi.
Torr Samaho wrote:
Sun Jan 27, 2019 7:05 pm
Sounds like the DNS lookup for "master.zandronum.com" doesn't work.
I noticed there seemed to be a lot of warnings for network.cpp during compilation. So maybe that has something to do with this?

lorecast162
New User
Posts: 4
Joined: Wed Jul 17, 2019 6:27 pm
Clan: MentaLabs Inc.

Re: Zandronum 3.0 on Raspberry PI

#16

Post by lorecast162 » Wed Jul 17, 2019 6:31 pm

For some reason it doesn't compile on my Pi2 with Raspbian 10 buster.
Image

lorecast162
New User
Posts: 4
Joined: Wed Jul 17, 2019 6:27 pm
Clan: MentaLabs Inc.

Re: Zandronum 3.0 on Raspberry PI

#17

Post by lorecast162 » Thu Jul 18, 2019 2:30 pm

I tried it without the hexenScrollies type modification and it went up to 97%, but now this is the error: Image
Here is the whole part where that error is https://pastebin.com/XAyFqurj

lorecast162
New User
Posts: 4
Joined: Wed Jul 17, 2019 6:27 pm
Clan: MentaLabs Inc.

Re: Zandronum 3.0 on Raspberry PI

#18

Post by lorecast162 » Fri Jul 19, 2019 12:46 am

I tried actually doing 3.0 (was on latest repo tag oops) and now I have another error, which is quite close to this one.
Here is the full output from make from start to finish: https://pastebin.com/mU5CTbvC

squelch41
New User
Posts: 4
Joined: Wed Aug 14, 2019 8:50 pm

Re: Zandronum 3.0 on Raspberry PI

#19

Post by squelch41 » Wed Aug 14, 2019 9:27 pm

Did you manage to get the compile working?
I am running into the same problem

squelch41
New User
Posts: 4
Joined: Wed Aug 14, 2019 8:50 pm

Re: Zandronum 3.0 on Raspberry PI

#20

Post by squelch41 » Sun Aug 18, 2019 10:03 pm

squelch41 wrote:
Wed Aug 14, 2019 9:27 pm
Did you manage to get the compile working?
I am running into the same problem
I case anyone else has the same problem in future -
For me, the only way to make it work was to flash my SD card with 2017 raspian stretch image (2017-09-07-raspbian-stretch.zip) and used an original Pi B.
Then, using the above method, it would compile.

Trying before on raspbian buster on a pi3 just failed at about 98% every time

Post Reply