Page 1 of 1

Zandronum 3.0 on Raspberry PI

Posted: Mon Oct 09, 2017 8:59 pm
by Mr.Holub
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.

Re: Zandronum 3.0 on Raspberry PI

Posted: Thu Nov 16, 2017 11:35 pm
by Girz0r
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; }

Re: Zandronum 3.0 on Raspberry PI

Posted: Fri Nov 17, 2017 8:47 pm
by Girz0r
Update.

Switched OS to Raspbian Stretch Lite. Great Success!

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

Image

Re: Zandronum 3.0 on Raspberry PI

Posted: Sun Jan 07, 2018 3:44 pm
by Nekrofage
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

Re: Zandronum 3.0 on Raspberry PI

Posted: Fri Mar 02, 2018 8:02 pm
by oddbenk
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!

Re: Zandronum 3.0 on Raspberry PI

Posted: Mon Mar 05, 2018 9:03 pm
by Torr Samaho
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

Re: Zandronum 3.0 on Raspberry PI

Posted: Fri Mar 23, 2018 10:04 pm
by Mr.Holub
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).

Re: Zandronum 3.0 on Raspberry PI

Posted: Fri Dec 28, 2018 6:32 pm
by Mr.Holub
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

Re: Zandronum 3.0 on Raspberry PI

Posted: Fri Jan 04, 2019 7:05 am
by TDRR
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?

Re: Zandronum 3.0 on Raspberry PI

Posted: Tue Jan 22, 2019 3:08 pm
by Tracker303
Another compatibility-related question: would it run on DietPi, and what changes do I have to do for it to work?

Re: Zandronum 3.0 on Raspberry PI

Posted: Fri Jan 25, 2019 5:22 pm
by PPablo
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

Re: Zandronum 3.0 on Raspberry PI

Posted: Fri Jan 25, 2019 5:25 pm
by PPablo
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)

Re: Zandronum 3.0 on Raspberry PI

Posted: Sun Jan 27, 2019 7:05 pm
by Torr Samaho
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.

Re: Zandronum 3.0 on Raspberry PI

Posted: Sun Feb 24, 2019 9:49 am
by Tracker303
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.

Re: Zandronum 3.0 on Raspberry PI

Posted: Fri Jun 14, 2019 10:12 pm
by sleepydev
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?

Re: Zandronum 3.0 on Raspberry PI

Posted: Wed Jul 17, 2019 6:31 pm
by lorecast162
For some reason it doesn't compile on my Pi2 with Raspbian 10 buster.
Image

Re: Zandronum 3.0 on Raspberry PI

Posted: Thu Jul 18, 2019 2:30 pm
by lorecast162
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

Re: Zandronum 3.0 on Raspberry PI

Posted: Fri Jul 19, 2019 12:46 am
by lorecast162
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

Re: Zandronum 3.0 on Raspberry PI

Posted: Wed Aug 14, 2019 9:27 pm
by squelch41
Did you manage to get the compile working?
I am running into the same problem

Re: Zandronum 3.0 on Raspberry PI

Posted: Sun Aug 18, 2019 10:03 pm
by squelch41
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