NBlood icon indicating copy to clipboard operation
NBlood copied to clipboard

Building/Installing or Raspberry PI

Open actraiser30 opened this issue 4 years ago • 29 comments

Hello are there any instructions to build on a raspberry pi ?

or i just build eduke32 and put the required files in eduke32 folder like this? i wanted to play blood/redneck rampage and Exhumed but i cannot find and info to build them only the info to build eduke32 engine but after that what i do?

thanks

actraiser30 avatar Mar 11 '20 09:03 actraiser30

cloning this respository and building using the eduke32 wiki should be enough though I can't tell how well it will run. I can probably run some tests on my Raspberry Pi 3 and see if it runs well enough to be playable

Jan200101 avatar Mar 11 '20 13:03 Jan200101

thanks you mean i clone NBlood and then in the same folder i clone eduke32 or i do it in seperate folders and overwrite the cloned eduke32 folder after with the cloned NBlood??

actraiser30 avatar Mar 11 '20 13:03 actraiser30

There is no need to clone eduke32 to build NBlood as it's a fork of eduke32 Simple replace the step where you clone eduke32 with cloning NBlood

Jan200101 avatar Mar 11 '20 14:03 Jan200101

alright I've done some testing myself and currently NBlood does not compile for the raspberry pi 3 duo to a upstream mistake but even then it runs badly at anything higher than 800x600

Jan200101 avatar Mar 11 '20 17:03 Jan200101

It's ok if it can run 800x600 it will be fine i dont think i was playing it on higher resolution on my pc 20 years ago if you can put the compiled archive or binary for the Raspberry Pi in your downloads with a warning about higher resolution will be great.

actraiser30 avatar Mar 11 '20 17:03 actraiser30

so if i campile eduke 32 in the line it has svn checkout https://svn.eduke32.com/eduke32

i replace it with: svn checkout https://github.com/nukeykt/NBlood.git ??

thats all i do different?

or i compile it with the second option: git svn clone https://github.com/nukeykt/NBlood.git ??

thanks

actraiser30 avatar Mar 12 '20 07:03 actraiser30

We're entirely on git here for NBlood etc so just use 'git clone https://github.com/nukeykt/NBlood.git'

Then to compile, just type 'make' to compile all the games/utils or 'make nblood' to just compile NBlood, or 'make rednukem' for Duke3D/Redneck games, 'make pcexhumed' etc.

You might need additional dependencies, which are outlined here https://wiki.eduke32.com/wiki/Building_EDuke32_on_Linux

sirlemonhead avatar Mar 12 '20 09:03 sirlemonhead

thanks,and if i want to put all the game files there are specific folders after compile finish eg blood folder redneck folder etc ?

actraiser30 avatar Mar 12 '20 09:03 actraiser30

Actually it is make blood (not nblood).

CommonLoon102 avatar Mar 12 '20 18:03 CommonLoon102

if i want to complie everything eg blood redneck duke exhumed i only type make?

actraiser30 avatar Mar 12 '20 19:03 actraiser30

yeah just typing Make works as I previously mentioned there are some problems with compiling NBlood on a Raspberry Pi mainly the zpl header not having a proper return if it does not succeed and libatomic not being linked

Here is a patch that should fix those until a fix is pushed upstream 0001-Fix-compilation-on-rpi.patch

Jan200101 avatar Mar 12 '20 20:03 Jan200101

what excatly i do with the 0001-Fix-compilation-on-rpi.patch.txt file how i use it ??

actraiser30 avatar Mar 13 '20 11:03 actraiser30

hi did you apply the patch upstream?

actraiser30 avatar Mar 15 '20 14:03 actraiser30

@actraiser30 These are the commands I have used to compile blood on my Raspberry Pi 3:

git clone https://github.com/nukeykt/NBlood.git
cd NBlood
wget https://github.com/nukeykt/NBlood/files/4326555/0001-Fix-compilation-on-rpi.txt
patch < 0001-Fix-compilation-on-rpi.txt
make blood USE_OPENGL=0

I couldn't get the patch file to work so I looked though the patch and realised there are a couple of simple edits. Instead I used STFP to manually edit the files as below:

  1. This line in Common.mak needs to be changed to LIBS += -lrt -latomic
  2. This line in zpl.h needs to be changed to return 0;

Save and compile using the make command.

I am running NBlood at 640x480, like I do the other ports on my system. I found that making this setting in the display menu gave me three small windows across the top of the screen. After exiting, I edited nblood.cfg that you can find in /home/pi/.config/nblood (note: .config is a hidden folder) and changed the ScreenMode to 1.

I was also getting an ALSA underrun error and the sound was cutting out. In the sound menu, I changed the sample rate to 44100Hz and applied settings which seems to have fixed the issue.

@Jan200101 I noticed in the log file that NBlood detects my PS3 controller. I'm wondering if there is gamepad support in NBlood, in particular the analog sticks. There appears to be no option to configure in the control setup menu.

It's not a major issue as I use xboxdrv to map my controller in other ports so I would be happy to do likewise for NBlood.

dudleydes avatar Mar 15 '20 15:03 dudleydes

there is minor gamepad support in NBlood but all menu interactions still require a keyboard and mouse and there is no way to remap them yet #42

Jan200101 avatar Mar 16 '20 12:03 Jan200101

Hello upon build on a Raspberry pi3 on Raspbian Stretch OS i got an error upon on rednukem build

failer building obj/rr/player.o from source/rr/src/player.cpp! GNUmakefile:1517 recipe for target 'obj/rr/player.o' failed make: *** [obj/rr/player.o] Error 1

the blood and pcexhumed builds are succefully build only the rednukem does this error

any suggestion on whats wrong?

actraiser30 avatar Dec 01 '20 07:12 actraiser30

That is not a complete Traceback

Even then it is likely a Atomic problem Consult this comment https://github.com/nukeykt/NBlood/issues/332#issuecomment-599223400

Jan200101 avatar Dec 01 '20 08:12 Jan200101

Thats the same comment here

symbios24 avatar Dec 01 '20 09:12 symbios24

I am not going to spoonfeed explanations for something that could be solve with minimal programming knowledge, a text editor and the ability to google

I am not aware what exact problem @actraiser30 is having since he did not provide a full traceback to why his build failed but it is probably related to libatomic not being linked by default. adding -latomic to the linker flags should be enough to solve it and the previously linked comment describes how to do so (and how to fix zpl but that was merged upstream to my knowledge)

Jan200101 avatar Dec 01 '20 09:12 Jan200101

i did add/edit this two files and i get this error i managed to build blood and pcexhumed (before i add the lines i could not) but rednukem is giving this error

actraiser30 avatar Dec 01 '20 09:12 actraiser30

I tried my self to build it by adding this lines to the files eg: common.mak and zpl.h, nblood an exhumed are working Rednukem building stops probably with the same error,i uploaded an image with the error

https://files.fm/u/qqgmuwxvx

symbios24 avatar Dec 01 '20 10:12 symbios24

I found a builded version about a month old but when i ran the rednukem i get a libm.so.6 / libc.so.6 Glibc_2.27 / Glibc_2.28 not found error What libraries are missing here to install them?

symbios24 avatar Dec 02 '20 12:12 symbios24

I have once again made a patch that fixes building and this time its more upstream compliant 0001-Temporary-Fix-to-allow-building-on-the-Raspberry-PI.patch.txt

It compiles nblood, exhumed and rednukem. I could only test Blood and I don't own the others and do not care enough to pirate them. Compilation was tested on a Raspberry Pi 3 Model B using a freshly installed version of RaspiOS with the 5.4.51-v7+ kernel Dependencies can be copy pasted from here the Wiki

here is a list of commands to apply the patch

wget https://github.com/nukeykt/NBlood/files/5631708/0001-Temporary-Fix-to-allow-building-on-the-Raspberry-PI.patch.txt
git config user.name "Name"
git config user.email "[email protected]"
git am < 0001-Temporary-Fix-to-allow-building-on-the-Raspberry-PI.patch.txt

all my testing (and the patch) has been done on commit 20904d63266e6e49091a278cb2cad6d212e6e0d6

Rednukem building stops probably with the same error,i uploaded an image with the error

I cannot recreate this behavior the gnu toolchain please provide more information

Jan200101 avatar Dec 02 '20 20:12 Jan200101

Hello thanks but the whole error from appear to finish is on the link below in the photo https://files.fm/u/qqgmuwxvx Did you saw it?? Did you also see the errors about the compiled version a month old that upon running shows this errors:libm.so.6 / libc.so.6 Glibc_2.27 / Glibc_2.28 not found Thanks

symbios24 avatar Dec 03 '20 07:12 symbios24

Hello thanks but the whole error from appear to finish is on the link below in the photo https://files.fm/u/qqgmuwxvx Did you saw it?? I saw it and I cannot replicate it Please provide more system information including:

  • Raspberry Pi Model
  • OS Version
  • compiler and library version

Did you also see the errors about the compiled version a month old that upon running shows this errors:libm.so.6 / libc.so.6 Glibc_2.27 / Glibc_2.28 not found Thanks I am unaware of the current glibc versions shipped on your OS but they are incompatible

Jan200101 avatar Dec 03 '20 07:12 Jan200101

Raspberry pi 3B Raspbian stretch Not sure for the compiler but all the depends from the duke wiki are installed How do i add the patch to the NBlood folder i cloned from github?

symbios24 avatar Dec 03 '20 08:12 symbios24

try updating your packages, it is possible the currently installed packages are out of date and incompatible with current upstream Nblood outside of that I cannot help a lot without direct hardware access to try and find the cause

Jan200101 avatar Dec 03 '20 08:12 Jan200101

Os is fully updated do i need to do an rpi-update also?

symbios24 avatar Dec 03 '20 08:12 symbios24

raspberry pi 4 raspbian 32bit os Linux raspberrypi 5.10.17-v7l+ #1403 armhf

everything compiled and runs fine thanks for all the work done here

and other build issues please note if using aarch64/arm64 or armhf/32bit

arrowgent avatar May 07 '21 22:05 arrowgent