Prepare for Descent


49 posts   Page 2 of 2   1, 2
by derhass » Mon Aug 13, 2012 5:33 pm
derhass wrote:gcc-4.7 with optimizations turned on seems to have some alignment issues, the game might crash with SIGBUS anytime, with the kernel complaing:
Code: Select all
[  183.220793] Alignment trap: not handling instruction edd16a01 at [<000c2acc>]
[  183.228520] Unhandled fault: alignment exception (0x011) at 0x00eed33a

OK, this is not gcc's fault. It is just not guaranteed by the game logic that some values are aligned. Fortunately, the game already has some #ifdef codepaths which seem to do exactly what we need, so I updated my patch to add that preprocessor definition. My binaries are also updated, now compiled with gcc-4.7. Everything seems to work fine, so far.

I'm still confused why this did not happen with gcc-4.6 (although I was able to reproduce it when I compiled with -Os).
User avatar
Posts: 18
Joined: Thu Aug 09, 2012 4:33 pm
by zerophnx » Thu Aug 16, 2012 3:03 pm
Can't wait to try this. Played D3 multiplayer on and off until a few years ago and can't recall if I legitimately beat D2 (think I level skipped).

Thanks to everyone for their binaries (until I have some time for compiling) and derhass for bringing this to light!
User avatar
Posts: 16
Joined: Wed Aug 15, 2012 5:43 pm
Location: NY, USA
by Apple2PI » Thu Dec 06, 2012 9:59 pm
Oooh... my all-time favorite game: coOol...

Here's a good reason to get my RPI up and running... and connect all those PS/2 game controllers I kept in storage, waiting for this moment (throttle + joystick + rudder pedals).
Posts: 1
Joined: Thu Dec 06, 2012 9:51 pm
by Newk³ » Wed Mar 27, 2013 1:36 am
did anyone got this running smoothly on the raspberry pi 512mb ?
Posts: 10
Joined: Wed Mar 27, 2013 1:28 am
by Newk³ » Thu Mar 28, 2013 3:03 am
I have tried to follow these steps here:
http://blog.sheasilverman.com/2012/08/descent-tutorial/

first error but no biggie: the source packages have moved to:
Code: Select all
wget http://www.dxx-rebirth.com/download/dxx/d1x-rebirth_v0.57.3-src.tar.gz
wget http://www.dxx-rebirth.com/download/dxx/d2x-rebirth_v0.57.3-src.tar.gz

(check http://www.dxx-rebirth.com/news/downloa ... ing-works/)

second: i included scons and libphysfs-dev to the apt-get like in step 1

and lastly: i run into an error at step 11

Code: Select all
scons raspberrypi=1
scons: Reading SConscript files …

===== D1X-Rebirth v0.57.3 =====

compiling on *NIX
/bin/sh: 1: sdl-config: not found
OSError: ‘sdl-config –cflags’ exited 127:
File “/home/pi/descent/d1x-rebirth_v0.57.3-src/SConstruct”, line 348:
env.ParseConfig(‘sdl-config –cflags’)
File “/usr/lib/scons/SCons/Environment.py”, line 1551:
return function(self, self.backtick(command))
File “/usr/lib/scons/SCons/Environment.py”, line 593:
raise OSError(“‘%s’ exited %d” % (command, status))


how come i dont have that sdl-config ?
please help! :?

best regards, Newk
Posts: 10
Joined: Wed Mar 27, 2013 1:28 am
by kalehrl » Thu Mar 28, 2013 2:52 pm
Try this:
Code: Select all
sudo apt-get install libsdl1.2-dev
Posts: 342
Joined: Tue Jul 24, 2012 10:49 am
by Newk³ » Sat Mar 30, 2013 4:00 pm
kalehrl: thank you, that worked!

now i get other errors during compiling:
Code: Select all
Compiling 3d/interp.c ...
In file included from 3d/interp.c:26:0:
include/byteswap.h: In function ‘GET_INTEL_INT64’:
include/byteswap.h:61:2: warning: implicit declaration of function ‘memcpy’ [-Wimplicit-function-declaration]
include/byteswap.h:61:2: warning: incompatible implicit declaration of built-in function ‘memcpy’ [enabled by default]
include/byteswap.h: In function ‘GET_INTEL_INT’:
include/byteswap.h:67:2: warning: incompatible implicit declaration of built-in function ‘memcpy’ [enabled by default]
include/byteswap.h: In function ‘GET_INTEL_SHORT’:
include/byteswap.h:73:2: warning: incompatible implicit declaration of built-in function ‘memcpy’ [enabled by default]
Compiling 3d/matrix.c ...
Compiling 3d/points.c ...
Compiling 3d/rod.c ...
Compiling 3d/setup.c ...
Compiling arch/ogl/gr.c ...
In file included from /opt/vc/include/interface/vcos/vcos.h:116:0,
                 from /opt/vc/include/interface/vmcs_host/vc_dispmanx.h:33,
                 from /opt/vc/include/bcm_host.h:46,
                 from arch/ogl/gr.c:11:
/opt/vc/include/interface/vcos/pthreads/vcos_platform.h: In function ‘vcos_event_signal’:
/opt/vc/include/interface/vcos/pthreads/vcos_platform.h:524:8: warning: variable ‘ok’ set but not used [-Wunused-but-set-variable]
In file included from /opt/vc/include/bcm_host.h:50:0,
                 from arch/ogl/gr.c:11:
/opt/vc/include/interface/vmcs_host/vcgencmd.h: At top level:
/opt/vc/include/interface/vmcs_host/vcgencmd.h:33:27: fatal error: vchost_config.h: No such file or directory
compilation terminated.
scons: *** [arch/ogl/gr.o] Error 1
scons: building terminated because of errors.
Posts: 10
Joined: Wed Mar 27, 2013 1:28 am
by kalehrl » Sat Mar 30, 2013 7:16 pm
It can't find that file so it complains about it.
Run:
Code: Select all
export CFLAGS="-I/opt/vc/include/interface/vmcs_host/linux"

before compiling.
You may need to start all over again with compilation.
I cross compiled d1x-rebirth if you want to try it:
https://mega.co.nz/#!VwJWyAgY!WjNKKCX0a ... Jiau3PCCDU
Posts: 342
Joined: Tue Jul 24, 2012 10:49 am
by Davespice » Tue Apr 02, 2013 10:31 am
This is one of my favorite games of the 90's. Also one of the first games I played multiplayer over a serial cable, and later on a coax BNC Novell network. Memories :D

The Pi is such a great platform for retro gaming, the community just keeps on giving.

SSilver2k2 wrote:I just posted a tutorial on how to build Descent (as well as binaries).

http://blog.sheasilverman.com/2012/08/descent-tutorial/

Hi SSilver2k2. I’ve just been checking out your site and saw all the other tutorials you’ve done. Jolly good work, I really like your site. I presume you’ve been keeping the instructions updated as people have been noticing issues etc?
User avatar
Raspberry Pi Foundation Employee & Forum Moderator
Raspberry Pi Foundation Employee & Forum Moderator
Posts: 1438
Joined: Fri Oct 14, 2011 8:06 pm
Location: London, United Kingdom
by Davespice » Wed Apr 03, 2013 9:25 am
derhass wrote:I'm very interested in having some other users beta-test this.

Hi there, I just wanted to give a quick report on how this went for me :D

Compilation went fine as per instructions however I needed to use the fix, mentioned by kalehrl above, regarding the vmcs_host interface.

One slight difference is that I am using the hog/ham files from the original games since I own both. Descent 1 on floppy and Descent 2 on CD. I already had Descent 1 installed, but I used Dos Box to install D2 to a folder on disk.

After copying the data files I was able to get both games to load however only Descent 1 was actually playable (although sound was a little choppy). Descent 2 start up and game menus were fine but it had a major hall of mirrors effect (link) after I moved forwards with the ship. After this I noticed that the game menus lost their background texture and were just a big white box etc. This makes me wonder if my Descent 2 hog/ham files are corrupted. I know that the CD is quite badly scratched.

One thing I did try was to download the 1.2 D2 patch and then run it under Dos Box to modify the vanilla 1.0 data files from the CD. I was hopeful that this would cure the hall of mirrors but it didn’t, so either my data files are bad or something is wrong in the code.

I’m going to try another copy of the CD that I’ll borrow from a friend and see if I get the same results.

I’m happy to share my data files if anyone wants to try and reproduce this.

EDIT: FIXED IT. I needed to set 128/128 GPU memory split in raspi-config :)
User avatar
Raspberry Pi Foundation Employee & Forum Moderator
Raspberry Pi Foundation Employee & Forum Moderator
Posts: 1438
Joined: Fri Oct 14, 2011 8:06 pm
Location: London, United Kingdom
by SSilver2k2 » Wed Apr 03, 2013 11:32 pm
Davespice wrote:This is one of my favorite games of the 90's. Also one of the first games I played multiplayer over a serial cable, and later on a coax BNC Novell network. Memories :D

The Pi is such a great platform for retro gaming, the community just keeps on giving.

SSilver2k2 wrote:I just posted a tutorial on how to build Descent (as well as binaries).

http://blog.sheasilverman.com/2012/08/descent-tutorial/

Hi SSilver2k2. I’ve just been checking out your site and saw all the other tutorials you’ve done. Jolly good work, I really like your site. I presume you’ve been keeping the instructions updated as people have been noticing issues etc?


I haven't been keeping up with Descent as much as I should :( Been working on PiMAME. My big idea is to put everything on one distro :)

I'll take a look at the updates for this
My blog of various geeky things - http://blog.sheasilverman.com
DeskCade.com - Mini Raspberry Pi Arcade Cabinet
PiMAME - http://pimame.org
Posts: 177
Joined: Wed Jun 06, 2012 1:51 am
Location: United States
by Davespice » Thu Apr 04, 2013 1:46 pm
SSilver2k2 wrote:I'll take a look at the updates for this

I think you only need to fix the links for the two source code tar balls, those seem to have been moved to the dxx-rebirth.com server (here) and add the extra export line for the vmcs_host interface. Then it'll be good.
Code: Select all
export CFLAGS="-I/opt/vc/include/interface/vmcs_host/linux"
User avatar
Raspberry Pi Foundation Employee & Forum Moderator
Raspberry Pi Foundation Employee & Forum Moderator
Posts: 1438
Joined: Fri Oct 14, 2011 8:06 pm
Location: London, United Kingdom
by derhass » Thu Apr 04, 2013 8:05 pm
Hi all,

Thnx for the hints.

I've currently not much time left over for this project, but I will make the suggested improvements, soon. Note that in the meantime, my RPi patches have been integrated into the official dxx-rebirth repo, which has now moved from bzr to git and can be found at: https://github.com/dxx-rebirth/dxx-rebirth/

Note that for some reason, the patches are in the d2x-rebirth/master and bzr/d2x-rebirth/master branch, but currently not in the d1x-branches (nor in master). I will investigate this.

I also think that further improvements regarding sound and performance/resource consumption might be possible, but they would require some deeper changes.

Regards,
derhass
User avatar
Posts: 18
Joined: Thu Aug 09, 2012 4:33 pm
by Davespice » Fri Apr 05, 2013 1:21 pm
I would agree on the sound actually. I would say that is the only issue. Everything works really well, sound though is quite often choppy or cutting out. Even if I use the -nosdlmixer switch :)
User avatar
Raspberry Pi Foundation Employee & Forum Moderator
Raspberry Pi Foundation Employee & Forum Moderator
Posts: 1438
Joined: Fri Oct 14, 2011 8:06 pm
Location: London, United Kingdom
by derhass » Sat May 04, 2013 7:21 pm
To give a short status update:

The rpi support for d1x/d2x can now be found in the d1x-rebirth/master and d2x-rebirth/master branches of the git repo at https://github.com/dxx-rebirth/dxx-rebirth. These branches are the basis for the upcomong 0.58 release of the game, so there will be an "official" tarball with rpi support soon. Maybe I can try to build some raspbian binary packages, too.

The sound issue is still open, I haven't looked into it, yet.
User avatar
Posts: 18
Joined: Thu Aug 09, 2012 4:33 pm
by XEON » Sat Sep 14, 2013 8:49 am
derhass wrote:To give a short status update:

The rpi support for d1x/d2x can now be found in the d1x-rebirth/master and d2x-rebirth/master branches of the git repo at https://github.com/dxx-rebirth/dxx-rebirth. These branches are the basis for the upcomong 0.58 release of the game, so there will be an "official" tarball with rpi support soon. Maybe I can try to build some raspbian binary packages, too.

The sound issue is still open, I haven't looked into it, yet.


A suggestion when dealing with the music.
You can have the original midi music exported at realtime to a mp3 using customizeable instrument packs like goemon or timidi

I suggest goemon and i helped with a port for descent for the psp once.
goemon instrument set will blow these kids ears off into musical putty.

There are was to very quickly export the midi to mp3.
if you want i'll dig up the source for the psp port.

-descent veteran.
i lost my legs but i can still pilot a pyro.
XD
www.recall.co.nr
User avatar
Posts: 23
Joined: Sun Jul 14, 2013 12:51 pm
by TechyBen » Mon Sep 23, 2013 12:14 pm
Thank you so much! I have a special project planned for this, and really, being new to it all require a step by step instruction.
I have a copy of Descent 2 waiting, and am happy to get a copy of the first too for the project.

I'll give you 3 guesses at what the project will be (as a hint, I have a battery pack, battery powered speakers, and am looking for a screen and mini keyboard). ;)

Trying an install now. If anyone has any ideas for a display, I'm all ears.

PS, not sure if I can figure out how to patch it. When I type out the patch command, the terminal just stays blank. :/

So finally it said "scon" not a recognized command. I'm guessing I forgot to install something? Is it easier (less steps) to compile directly from the 0.58 binaries and the game files (from disk)? As said, I don't know a single Linux terminal command, so would not be able to figure this out myself. :(
Posts: 5
Joined: Tue Aug 27, 2013 6:33 pm
by derhass » Sat Sep 28, 2013 1:35 pm
Hi there,

TechyBen wrote:PS, not sure if I can figure out how to patch it. When I type out the patch command, the terminal just stays blank. :/

No output on unix usually means sucess, btw. ;) But, first of all: which version did you (try to) patch? With the current 0.58.x release, you do not need to patch anything. Just grab the source tarballs from the official site:
Code: Select all
wget http://www.dxx-rebirth.com/download/dxx/d1x-rebirth_v0.58.1-src.tar.gz
wget http://www.dxx-rebirth.com/download/dxx/d2x-rebirth_v0.58.1-src.tar.gz


TechyBen wrote:So finally it said "scon" not a recognized command. I'm guessing I forgot to install something? Is it easier (less steps) to compile directly from the 0.58 binaries and the game files (from disk)? As said, I don't know a single Linux terminal command, so would not be able to figure this out myself. :(


You'll need sconss for building, and some other libraries, too. On a raspbian, it should be enough to do the following:
Code: Select all
sudo apt-get install scons libsdl1.2-dev libsdl-mixer1.2-dev libphysfs-dev

After you installed that, you can untar the source tarballs, and try to build the game:
Code: Select all
tar xf d1x-rebirth_v0.58.1-src.tar.gz
cd d1x-rebirth_v0.58.1-src
scons rasperrypi=1

This will take about half an hour on the pi. You will finally get a binray called d1x-rebirth which can be executed (and you can copy it to where you like). You just need the game data files. The INSTALL.txt file does explain where you have to place those files (or how to tell the game where to look for them). The same procedure will work for d2x-rebirth, too.
User avatar
Posts: 18
Joined: Thu Aug 09, 2012 4:33 pm
by TechyBen » Thu Nov 14, 2013 12:14 pm
Thank you so much. The last of the hardware arrived today, so I will give it another go at compiling from the start. If anything goes astray (it's me here, bound to happen) I will pop back. If it's a success, I'll upload a video on how well it works. :)

PS, I've successfully (I hope) compiled. Copied over the filed to the share folder from the CD (installed on Windows first to extract). But clicking the executable resulted in nothing. :( No icon on the desktop either.

Do I need to change the share folder to d2x-rebirth or change the disk files to lowercase names?
Posts: 5
Joined: Tue Aug 27, 2013 6:33 pm
by derhass » Thu Nov 14, 2013 8:04 pm
Don't worry. We will get this running.

TechyBen wrote:PS, I've successfully (I hope) compiled. Copied over the filed to the share folder from the CD (installed on Windows first to extract). But clicking the executable resulted in nothing. :( No icon on the desktop either.

Do I need to change the share folder to d2x-rebirth or change the disk files to lowercase names?


You should try to run the binary on a text console (either directly without X, or with a terminal emulator on X). When starting the binary, there should at least some message. If you see an error message like:
Code: Select all
Error: Could not find a valid hog file

you can try to start it with the -hogdir /path/to/your/data_dir option.

If there is some error message, please report back so we can find out what is going on.

Regards,
derhass
User avatar
Posts: 18
Joined: Thu Aug 09, 2012 4:33 pm
by TechyBen » Mon Dec 02, 2013 11:26 am
Thanks. Will give it a go. Have the monitor now. Only think left to do is make the custom case (and get Descent running :P ).
Posts: 5
Joined: Tue Aug 27, 2013 6:33 pm
by david1024 » Sat Jul 05, 2014 6:54 pm
If we fast-forward to July 2014.... A lot of the problems/work-arounds in this thread are non-issues... (Thanks to everyone that fixed it up for us!)

--Don't need the patches anymore, don't have to do any wild hacks... The dependencies are still a pain, but they all work now:

BTW, this post is for current as-ofJuly2014 version of the world:
The PI:
pi@play-pi ~/Missions $ uname -a
Linux play-pi 3.12.20+ #687 PREEMPT Fri May 30 16:39:11 BST 2014 armv6l GNU/Linux
It is a ModelB with 512meg ram (UK built)

I only built Descent1Rebirth:
d1x-rebirth_v0.58.1-src.tar.gz
NOTE: the patches are already 'mainlined' in 0.58.1

install the dependencies listed in the other posts in this thread. Plus
sudo apt-get install libsdl-mixer1.2-dev

procedure...

download d1x-rebirth_v0.58.1-src.tar.gz to ~/src folder

open a lxterminal and 'cd ~/src' folder and ...

"tar -xvf d1x-rebirth_v0.58.1-src.tar.gz"

then 'cd d1x-rebirth_v0.58.1-src/'

to build... " sudo scons raspberrypi=1 install |tee buildlog.txt"
(take a 30min break--if you have a class10 card--longer if not)

after the build... have to "sudo chmod +x /usr/local/bin/d1x-rebirth"

I put all the .HOG/.MSN and other files (mp3s for level audio,etc) in a folder off the 'pi' home directory... (named 'Missions') and just run d1x-rebirth from there like this:
"d1x-rebirth -hogdir ."
I suppose I could run it more properly like this though:
"d1x-rebirth -hogdir /home/pi/Missions"
(getting the files is a whole project in itself--i purchased at gog.com, downloaded... installed under wine->dosbox on a ubuntu12.04 machine and then moved the files to the Pi--and then downloaded minerva and some other multiplayer levels too!)

NOTE: In contrast to a build on an ubuntu 12.04LTS machine, I did see a lot more warnings when compiling on the RPi... But as long as it can link a binary.. you should have a working program. I've attached my build's STDOUT/STDERR from the console window.

DO NOT FORGET TO CHECK YOUR MEMORY SPLIT! (sudo raspi-config) and make sure you have 128MEG allocated to the graphics.

I did not overclock at all, and my FPS was 60. (game reported) would sometimes dip to 53 or so, but never above 60...

since the bbs won't let me upload the file... here it is inline:
[code]pi@play-pi ~/src/d1x-rebirth_v0.58.1-src $ sudo scons raspberrypi=1 install
scons: Reading SConscript files ...
D1X-Rebirth: compiling on *NIX

===== D1X-Rebirth v0.58.1 =====

D1X-Rebirth: LittleEndian machine detected
D1X-Rebirth: building with OpenGL ES
D1X-Rebirth: including SDL_mixer
using Raspberry Pi vendor libs in /opt/vc
scons: done reading SConscript files.
scons: Building targets ...
Compiling 2d/2dsline.c ...
Compiling 2d/bitblt.c ...
Compiling 2d/bitmap.c ...
Compiling 2d/box.c ...
Compiling 2d/canvas.c ...
Compiling 2d/circle.c ...
Compiling 2d/disc.c ...
Compiling 2d/font.c ...
Compiling 2d/gpixel.c ...
Compiling 2d/line.c ...
Compiling 2d/palette.c ...
Compiling 2d/pcx.c ...
Compiling 2d/pixel.c ...
Compiling 2d/poly.c ...
Compiling 2d/rect.c ...
Compiling 2d/rle.c ...
Compiling 2d/scalec.c ...
Compiling 3d/clipper.c ...
Compiling 3d/draw.c ...
Compiling 3d/globvars.c ...
Compiling 3d/instance.c ...
Compiling 3d/interp.c ...
Compiling 3d/matrix.c ...
Compiling 3d/points.c ...
Compiling 3d/rod.c ...
Compiling 3d/setup.c ...
Compiling arch/sdl/event.c ...
Compiling arch/sdl/init.c ...
Compiling arch/sdl/joy.c ...
Compiling arch/sdl/key.c ...
Compiling arch/sdl/mouse.c ...
Compiling arch/sdl/rbaudio.c ...
Compiling arch/sdl/timer.c ...
Compiling arch/sdl/window.c ...
Compiling arch/sdl/digi.c ...
Compiling arch/sdl/digi_audio.c ...
Compiling iff/iff.c ...
Compiling main/ai.c ...
Compiling main/aipath.c ...
Compiling main/automap.c ...
Compiling main/bm.c ...
Compiling main/bmread.c ...
Compiling main/cntrlcen.c ...
Compiling main/collide.c ...
Compiling main/config.c ...
Compiling main/console.c ...
Compiling main/controls.c ...
Compiling main/credits.c ...
Compiling main/custom.c ...
Compiling main/digiobj.c ...
Compiling main/dumpmine.c ...
Compiling main/effects.c ...
Compiling main/endlevel.c ...
Compiling main/fireball.c ...
Compiling main/fuelcen.c ...
Compiling main/fvi.c ...
Compiling main/game.c ...
Compiling main/gamecntl.c ...
Compiling main/gamefont.c ...
Compiling main/gamemine.c ...
Compiling main/gamerend.c ...
Compiling main/gamesave.c ...
Compiling main/gameseg.c ...
Compiling main/gameseq.c ...
Compiling main/gauges.c ...
Compiling main/hostage.c ...
Compiling main/hud.c ...
Compiling main/inferno.c ...
Compiling main/kconfig.c ...
Compiling main/kmatrix.c ...
Compiling main/laser.c ...
Compiling main/lighting.c ...
Compiling main/menu.c ...
Compiling main/mglobal.c ...
Compiling main/mission.c ...
Compiling main/morph.c ...
Compiling main/multi.c ...
Compiling main/multibot.c ...
Compiling main/newdemo.c ...
Compiling main/newmenu.c ...
Compiling main/object.c ...
Compiling main/paging.c ...
Compiling main/physics.c ...
Compiling main/piggy.c ...
Compiling main/player.c ...
Compiling main/playsave.c ...
Compiling main/polyobj.c ...
Compiling main/powerup.c ...
Compiling main/render.c ...
Compiling main/robot.c ...
Compiling main/scores.c ...
Compiling main/slew.c ...
Compiling main/snddecom.c ...
Compiling main/songs.c ...
Compiling main/state.c ...
main/state.c: In function ‘state_save_old_game’:
main/state.c:677:8: warning: unused variable ‘gl_draw_buffer’ [-Wunused-variable]
main/state.c: In function ‘state_save_all_sub’:
main/state.c:825:8: warning: unused variable ‘gl_draw_buffer’ [-Wunused-variable]
Compiling main/switch.c ...
Compiling main/terrain.c ...
Compiling main/texmerge.c ...
Compiling main/text.c ...
Compiling main/titles.c ...
Compiling main/vclip.c ...
Compiling main/wall.c ...
Compiling main/weapon.c ...
Compiling maths/fixc.c ...
Compiling maths/rand.c ...
Compiling maths/tables.c ...
Compiling maths/vecmat.c ...
Compiling mem/mem.c ...
Compiling misc/args.c ...
Compiling misc/dl_list.c ...
Compiling misc/error.c ...
Compiling misc/hash.c ...
Compiling misc/hmp.c ...
Compiling misc/ignorecase.c ...
Compiling misc/physfsx.c ...
Compiling misc/strio.c ...
Compiling misc/strutil.c ...
Compiling texmap/ntmap.c ...
Compiling texmap/scanline.c ...
Compiling arch/ogl/gr.c ...
In file included from /opt/vc/include/interface/vcos/vcos.h:116:0,
from /opt/vc/include/interface/vmcs_host/vc_dispmanx.h:33,
from /opt/vc/include/bcm_host.h:46,
from arch/ogl/gr.c:11:
/opt/vc/include/interface/vcos/pthreads/vcos_platform.h: In function ‘vcos_event_signal’:
/opt/vc/include/interface/vcos/pthreads/vcos_platform.h:538:8: warning: variable ‘ok’ set but not used [-Wunused-but-set-variable]
arch/ogl/gr.c: In function ‘ogl_ugpixel’:
arch/ogl/gr.c:841:8: warning: unused variable ‘gl_draw_buffer’ [-Wunused-variable]
arch/ogl/gr.c: At top level:
/opt/vc/include/interface/vcos/vcos_timer.h:112:6: warning: inline function ‘vcos_timer_delete’ declared but never defined [enabled by default]
/opt/vc/include/interface/vcos/vcos_timer.h:109:6: warning: inline function ‘vcos_timer_reset’ declared but never defined [enabled by default]
/opt/vc/include/interface/vcos/vcos_timer.h:102:6: warning: inline function ‘vcos_timer_cancel’ declared but never defined [enabled by default]
/opt/vc/include/interface/vcos/vcos_timer.h:95:6: warning: inline function ‘vcos_timer_set’ declared but never defined [enabled by default]
/opt/vc/include/interface/vcos/vcos_timer.h:80:15: warning: inline function ‘vcos_timer_create’ declared but never defined [enabled by default]
/opt/vc/include/interface/vcos/vcos_thread.h:269:6: warning: inline function ‘vcos_thread_resume’ declared but never defined [enabled by default]
/opt/vc/include/interface/vcos/vcos_thread.h:262:5: warning: inline function ‘vcos_thread_running’ declared but never defined [enabled by default]
/opt/vc/include/interface/vcos/vcos_thread.h:251:15: warning: inline function ‘vcos_change_preemption’ declared but never defined [enabled by default]
/opt/vc/include/interface/vcos/vcos_thread.h:234:6: warning: inline function ‘vcos_thread_relinquish’ declared but never defined [enabled by default]
/opt/vc/include/interface/vcos/vcos_thread.h:186:15: warning: inline function ‘vcos_thread_get_affinity’ declared but never defined [enabled by default]
/opt/vc/include/interface/vcos/vcos_timer.h:112:6: warning: inline function ‘vcos_timer_delete’ declared but never defined [enabled by default]
/opt/vc/include/interface/vcos/vcos_timer.h:109:6: warning: inline function ‘vcos_timer_reset’ declared but never defined [enabled by default]
/opt/vc/include/interface/vcos/vcos_timer.h:102:6: warning: inline function ‘vcos_timer_cancel’ declared but never defined [enabled by default]
/opt/vc/include/interface/vcos/vcos_timer.h:95:6: warning: inline function ‘vcos_timer_set’ declared but never defined [enabled by default]
/opt/vc/include/interface/vcos/vcos_timer.h:80:15: warning: inline function ‘vcos_timer_create’ declared but never defined [enabled by default]
/opt/vc/include/interface/vcos/vcos_thread.h:269:6: warning: inline function ‘vcos_thread_resume’ declared but never defined [enabled by default]
/opt/vc/include/interface/vcos/vcos_thread.h:262:5: warning: inline function ‘vcos_thread_running’ declared but never defined [enabled by default]
/opt/vc/include/interface/vcos/vcos_thread.h:251:15: warning: inline function ‘vcos_change_preemption’ declared but never defined [enabled by default]
/opt/vc/include/interface/vcos/vcos_thread.h:234:6: warning: inline function ‘vcos_thread_relinquish’ declared but never defined [enabled by default]
/opt/vc/include/interface/vcos/vcos_thread.h:186:15: warning: inline function ‘vcos_thread_get_affinity’ declared but never defined [enabled by default]
Compiling arch/ogl/ogl.c ...
arch/ogl/ogl.c: In function ‘ogl_texture_stats’:
arch/ogl/ogl.c:304:6: warning: ‘dbl’ is used uninitialized in this function [-Wuninitialized]
arch/ogl/ogl.c:309:19: warning: ‘idx’ is used uninitialized in this function [-Wuninitialized]
Compiling arch/sdl/digi_mixer.c ...
Compiling arch/sdl/digi_mixer_music.c ...
Compiling arch/sdl/jukebox.c ...
Compiling main/net_udp.c ...
Compiling main/vers_id.c ...
Linking d1x-rebirth ...
Install file: "d1x-rebirth" as "/usr/local/bin/d1x-rebirth"
scons: done building targets.
[/code]
Posts: 1
Joined: Sat Jul 05, 2014 5:26 pm
by derhass » Sun Jul 06, 2014 5:09 pm
david1024 wrote:NOTE: In contrast to a build on an ubuntu 12.04LTS machine, I did see a lot more warnings when compiling on the RPi... But as long as it can link a binary.. you should have a working program. I've attached my build's STDOUT/STDERR from the console window.


So let's have a look at the warnings you got:

david1024 wrote:
Code: Select all
main/state.c: In function ‘state_save_old_game’:
main/state.c:677:8: warning: unused variable ‘gl_draw_buffer’ [-Wunused-variable]
main/state.c: In function ‘state_save_all_sub’:
main/state.c:825:8: warning: unused variable ‘gl_draw_buffer’ [-Wunused-variable]
[...]
arch/ogl/ogl.c: In function ‘ogl_texture_stats’:
arch/ogl/ogl.c:304:6: warning: ‘dbl’ is used uninitialized in this function [-Wuninitialized]
arch/ogl/ogl.c:309:19: warning: ‘idx’ is used uninitialized in this function [-Wuninitialized]

This ones are minor issues with rebirth's code, but totally harmles. I already had some patches to clean this up, but they somehow did not end up in 0.58.1.
david1024 wrote:
Code: Select all
Compiling arch/ogl/gr.c ...
In file included from /opt/vc/include/interface/vcos/vcos.h:116:0,
from /opt/vc/include/interface/vmcs_host/vc_dispmanx.h:33,
from /opt/vc/include/bcm_host.h:46,
from arch/ogl/gr.c:11:
/opt/vc/include/interface/vcos/pthreads/vcos_platform.h: In function ‘vcos_event_signal’:
/opt/vc/include/interface/vcos/pthreads/vcos_platform.h:538:8: warning: variable ‘ok’ set but not used [-Wunused-but-set-variable]
arch/ogl/gr.c: In function ‘ogl_ugpixel’:
arch/ogl/gr.c:841:8: warning: unused variable ‘gl_draw_buffer’ [-Wunused-variable]
arch/ogl/gr.c: At top level:
/opt/vc/include/interface/vcos/vcos_timer.h:112:6: warning: inline function ‘vcos_timer_delete’ declared but never defined [enabled by default]
/opt/vc/include/interface/vcos/vcos_timer.h:109:6: warning: inline function ‘vcos_timer_reset’ declared but never defined [enabled by default]
/opt/vc/include/interface/vcos/vcos_timer.h:102:6: warning: inline function ‘vcos_timer_cancel’ declared but never defined [enabled by default]
/opt/vc/include/interface/vcos/vcos_timer.h:95:6: warning: inline function ‘vcos_timer_set’ declared but never defined [enabled by default]
/opt/vc/include/interface/vcos/vcos_timer.h:80:15: warning: inline function ‘vcos_timer_create’ declared but never defined [enabled by default]
/opt/vc/include/interface/vcos/vcos_thread.h:269:6: warning: inline function ‘vcos_thread_resume’ declared but never defined [enabled by default]
/opt/vc/include/interface/vcos/vcos_thread.h:262:5: warning: inline function ‘vcos_thread_running’ declared but never defined [enabled by default]
/opt/vc/include/interface/vcos/vcos_thread.h:251:15: warning: inline function ‘vcos_change_preemption’ declared but never defined [enabled by default]
/opt/vc/include/interface/vcos/vcos_thread.h:234:6: warning: inline function ‘vcos_thread_relinquish’ declared but never defined [enabled by default]
/opt/vc/include/interface/vcos/vcos_thread.h:186:15: warning: inline function ‘vcos_thread_get_affinity’ declared but never defined [enabled by default]
/opt/vc/include/interface/vcos/vcos_timer.h:112:6: warning: inline function ‘vcos_timer_delete’ declared but never defined [enabled by default]
/opt/vc/include/interface/vcos/vcos_timer.h:109:6: warning: inline function ‘vcos_timer_reset’ declared but never defined [enabled by default]
/opt/vc/include/interface/vcos/vcos_timer.h:102:6: warning: inline function ‘vcos_timer_cancel’ declared but never defined [enabled by default]
/opt/vc/include/interface/vcos/vcos_timer.h:95:6: warning: inline function ‘vcos_timer_set’ declared but never defined [enabled by default]
/opt/vc/include/interface/vcos/vcos_timer.h:80:15: warning: inline function ‘vcos_timer_create’ declared but never defined [enabled by default]
/opt/vc/include/interface/vcos/vcos_thread.h:269:6: warning: inline function ‘vcos_thread_resume’ declared but never defined [enabled by default]
/opt/vc/include/interface/vcos/vcos_thread.h:262:5: warning: inline function ‘vcos_thread_running’ declared but never defined [enabled by default]
/opt/vc/include/interface/vcos/vcos_thread.h:251:15: warning: inline function ‘vcos_change_preemption’ declared but never defined [enabled by default]
/opt/vc/include/interface/vcos/vcos_thread.h:234:6: warning: inline function ‘vcos_thread_relinquish’ declared but never defined [enabled by default]
/opt/vc/include/interface/vcos/vcos_thread.h:186:15: warning: inline function ‘vcos_thread_get_affinity’ declared but never defined [enabled by default]

These ones are actually issues with the header files from the vidcore library of the RPi firmware, and also totally harmless. One could tweak the compile flags to supress the warnings, but I abstained from that.

There is nothing to worry about, for any end user. Some small code cleanups should still be done, but Rebirth's code base is currently undergoing a major overhaul anyways ("unification" between the d1 and d2 code base, so that a lot of indentical code is shared and the same source can be used to build both. They also added some C++11 here and there, into the 20 year old C code base.). I'll have to take a look at this to make sure it continues to build and run on the pi.
User avatar
Posts: 18
Joined: Thu Aug 09, 2012 4:33 pm
by jamesh » Sun Jul 06, 2014 7:38 pm
Had a quick play yesterday -brought back a lot of memories! Nice job to all involved!
Soon to be unemployed software engineer currently specialising in camera drivers and frameworks, but can put mind to most embedded tasks. Got a job in N.Cambridge or surroundings? I'm interested!
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 11563
Joined: Sat Jul 30, 2011 7:41 pm