[SOLVED] How to compile Dungeon Crawl?

Stuff that has yet to be sorted into a category.
Message
Author
djnrempel
Posts: 34
Joined: Tue 29 Sep 2009, 03:58

[SOLVED] How to compile Dungeon Crawl?

#1 Post by djnrempel »

Hey Hive mind, I hope you can help.

I'm trying to compile my favourite nerdiest game, Dungeon Crawl: Stone Soup. There's a PET file for version 0.4.5 but the game is now at version 0.5.1 so I hope to create a PET for the new version.

I've checked INSTALL.TXT and made sure I have all the needed libraries (sdl, ncursesw, libpng, yacc, lex, freetype2

I execute "make" and it runs normally for some time, just some warnings about variables declared but not used etc., and then it finally borks after a long string of very similar errors.

Here are the final few lines:
/usr/include/SDL/SDL_opengl.h:6542: error: typedef 'PFNGLSTRINGMARKERGREMEDYPROC' is initialized (use __typeof__ instead)
/usr/include/SDL/SDL_opengl.h:6542: error: 'GLsizei' was not declared in this scope
/usr/include/SDL/SDL_opengl.h:6542: error: expected primary-expression before 'const'
There were pages and pages of errors like the above ones, and then these were the very last lines:
tilereg.cc: In member function 'void Region::set_transform()';
tilereg.cc:198: error: 'glLoadIdentity was not declared in this scope
tilereg.cc:199: error: 'glTranslatef' was not declared in this scope
tilereg.cc:200: error: 'glScalef' was not declared in this scope
tilereg.cc: In member function 'virtual void MessageRegion::render()':
tilereg.cc:2864: error: 'glLoadIdentity' was not declared in this scope
tilereg.cc: In constructor 'Titelregion::Titleregion(int, int)':
tilereg.cc:3259: error: 'GL_QUADS' was not declared in this scope
make[1]: *** [tilereg.o] Error 1
make[1]: Leaving directory '/root/Downloads/stone-soup-0.5.1-src/source'
make: *** [all] Error 2
Any further insight would be appreciated!
Last edited by djnrempel on Wed 07 Oct 2009, 20:35, edited 1 time in total.
User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#2 Post by technosaurus »

did you specifically compile SDL with openGL support? - if I recall that is not enabled by default
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].
djnrempel
Posts: 34
Joined: Tue 29 Sep 2009, 03:58

#3 Post by djnrempel »

:( and what will I have to compile in order to compile SDL? And will that in turn require me to compile something else?

Sorry about the whining. Thanks for the pointer. I just installed SDL from a PET I found around here.

So now I downloaded the source for SDL. I ran the ./configure and noticed one line that said "Checking for OpenGL support ... no". Does that mean the option is disabled, or that my system does not support OpenGL? Do I need to compile OpenGL first?

This isn't easy for someone who's not a developer. :cry:
User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#4 Post by technosaurus »

sorry - I should have asked more questions. You need to download the xorg upgrade package from pet get xorg_dri should work but you may need xorg_full_dri (use that one unless you are limited on resources) that and the corresponding DEV should at least let you compile your program it is at ibiblio.or/pub/linux/distributions/puppylinux/petpackages4 (<-- not sure the exact address and can't access that site at work - just start at ibiblio.org and navigate from there if you can't find it) If you compile everything and it doesn't run you may need to rerun the xorg wizard Sorry for the long convoluted instructions, I'm pulling this from memory.


P. S. we are going to have an official SDL for 4.4 CE
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].
djnrempel
Posts: 34
Joined: Tue 29 Sep 2009, 03:58

#5 Post by djnrempel »

Are you saying this will let me compile SDL or this will let me compile Dungeon Crawl?

Guess I can find out by trying to compile Dungeon Crawl again. (scurries off to command line...)

I'm determined to get this program compiled. I know it's possible!
djnrempel
Posts: 34
Joined: Tue 29 Sep 2009, 03:58

Broken Xorg

#6 Post by djnrempel »

I installed the xorg-full-dri package as well as the DEV package and ran the xorg wizard like you suggested. Now Xorg doesn't work any more.

Incidentally, according to this thread I didn't need the full dri package.

But this is moot if Xorg is borked. Good thing I have a save of my pupsave file!

Maybe I will just have to be content with playing Dungeon Crawl 0.4.5.

In terms of compiling with options - how do I set these options? When I ran ./configure for SDL, I was not presented with any options. Obviously there's no GUI for this. Is there a text file to edit?

Is there a PET somewhere of SDL with OpenGL support? I think that's all I need.
djnrempel
Posts: 34
Joined: Tue 29 Sep 2009, 03:58

#7 Post by djnrempel »

Now I'm mostly replying just to document this.

I found that someone (wow) has posted a PET of SDL with opengl support over at http://www.murga-linux.com/puppy/viewto ... 424#283424. Can't wait to try that tonight!
User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#8 Post by technosaurus »

./configure --help will list your options (look in pet packaging... in my signature for more detailed info for manually building packages and a even GUI helper tool)

I am assuming that you are determined to do this yourself and that's why you haven't posted a link to the source yet?
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].
djnrempel
Posts: 34
Joined: Tue 29 Sep 2009, 03:58

#9 Post by djnrempel »

I thought I had posted a link in my first post but apparently not! It's http://sourceforge.net/projects/crawl-ref/files/

I'm trying to compile the "tiles" version (which has a graphical interface instead of ASCII) I believe there is a makefile-tiles.unix which is not set as the default makefile.

Warning -- the game is addictive but very tough. I'm surprised it doesn't have a larger cult following in the *nix world.

I'm about to try compiling with my new magical OpenGL-enabled SDL package (crosses fingers).
djnrempel
Posts: 34
Joined: Tue 29 Sep 2009, 03:58

#10 Post by djnrempel »

Buggernuts - same errors with the new SDL package (though I had uninstalled xorg-full-dri - but I can't use that without breaking X. Hm.
djnrempel
Posts: 34
Joined: Tue 29 Sep 2009, 03:58

#11 Post by djnrempel »

I don't know if this helps shed any light on the problem, from Ubuntu Forums:
1. download the stone soup code from, http://sourceforge.net/project/downl...-0.4.5-src.zip. Remember where it is!
2. install the following prerequisites before we compile
3. sudo apt-get install libpng3
4. sudo apt-get install bison
5. sudo apt-get install libpng12-dev
6. sudo apt-get install g++
7. sudo apt-get install libx11-dev
8. sudo apt-get install flex
9. navigate to the directory where you saved the stone_soup-0.4.5-src.zip file you downloaded in step #1.
10. unzip stone_soup-0.4.5-src.zip
11. cd stone_soup-0.4.5-src.zip
12. cd source
13. gedit makefile, at the start of the file change it from
MAKEFILE ?= makefile.unix
#MAKEFILE ?= makefile.dos
#MAKEFILE ?= makefile.osx
#MAKEFILE ?= makefile.mgw
#MAKEFILE ?= makefile_tiles.mgw
#MAKEFILE ?= makefile.x11
to look like
#MAKEFILE ?= makefile.unix
#MAKEFILE ?= makefile.dos
#MAKEFILE ?= makefile.osx
#MAKEFILE ?= makefile.mgw
#MAKEFILE ?= makefile_tiles.mgw
MAKEFILE ?= makefile.x11
and save the file.

14. you should still be in the stone_soup-0.4.5-src/source directory. Type make.
I have checked to make sure I have all those libraries but I'm not sure if I'm right on that.
User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#12 Post by technosaurus »

I downloaded and started building the first thing I notice is -DCLUA_BINDINGS ... probably means you also need LUA... but it has a static build for lua include and sqlite3 as well - I heavily patched the makefile_tiles.unix to get it to build (attached) I modified it to build against puppy's shared sqlite library and added the X11R7 include path hardcoded the lib path to GL and GLU, changed the group:user to root:root as well as added some optimization flags and made some minor adjustments.

it was called stone-soup?
but it is here: (along with other pets for testing for the 4.4 CE)
http://puppylinux.asia/members/T/444/
puppy:linux
Attachments
stone_soup_DOC-0.5.1-src-i486.pet
(177.94 KiB) Downloaded 394 times
makefile_tiles.unix.gz
(3.37 KiB) Downloaded 340 times
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].
djnrempel
Posts: 34
Joined: Tue 29 Sep 2009, 03:58

#13 Post by djnrempel »

Wow, it would have taken me a long time to figure out that I needed to do all that. Thanks. Thanks!!!

I found the binary in usr/games/crawl/ but when I ran it it said something to the effect of "Failed to load icon: Couldn't open dat/tiles/stone_soup_icon-32x32.png"

I noticed that there was a "dat" folder within crawl's "data" folder so I copied "dat" into "crawl" folder itself. This solved this error.

However, on running ./crawl again I got an error "Failed to set video mode: X11 driver not configured with OpenGL"

I assume this means I need to rerun the xorgwizard with xorg-full-dri installed to enable OpenGL. Unfortunately this seems to have the effect of disabling video altogether.

Hm. Any suggestions on that?

Thanks for all the help/work, greatly appreciated!
User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#14 Post by technosaurus »

Same reason I didn't test it yet...

There are some threads here in the hardware section that cover most video card I didn't get to test it either since my intel card likes to eat my computer in DRI mode. The best luck I have had with my intel video was by manually compositing a bunch of xorg.conf files from puppy and other live distros.
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].
djnrempel
Posts: 34
Joined: Tue 29 Sep 2009, 03:58

#15 Post by djnrempel »

Welll I reran xorgwizard after installing xorg-full-dri but no dice - same OpenGL error. Is it possible that my video card can't support OpenGL?
manually compositing a bunch of xorg.conf files from puppy and other live distros
Do you mean cobbling together my own xorg.conf file based on snippets from other xorg.conf files?

Do you know how I can get Puppy to tell me what video card I have?
User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#16 Post by technosaurus »

gzip & post your xorg.conf (in /etc/X11) I just needed to restart x & it works great
Attachments
dc1.png
(37.56 KiB) Downloaded 1248 times
dc.png
(51.76 KiB) Downloaded 1357 times
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].
User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#17 Post by technosaurus »

Here are my SDL Pets that I used if it helps... you need the image pet as well (some people package them all together)
Attachments
SDL_image-1.2.7-i486.pet
(18.5 KiB) Downloaded 663 times
SDL-1.2.13-i486.pet
(151.67 KiB) Downloaded 640 times
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].
djnrempel
Posts: 34
Joined: Tue 29 Sep 2009, 03:58

#18 Post by djnrempel »

Those screengrabs make me very happy! I can almost smell goblin blood...

I think this is my Xorg.conf.

Incidentally, I'm now getting a different error:

./crawl: error while loading shared libraries: libGLU.so.1: cannot open shared object file: No such file or directory
Attachments
xorg.conf.Brookdale_G_Graphics_ChipAcerAL2216W.gz
(1.78 KiB) Downloaded 248 times
djnrempel
Posts: 34
Joined: Tue 29 Sep 2009, 03:58

#19 Post by djnrempel »

Okay, I removed all the previous SDL and xorg-dri packages that I'd accumulated. Then I installed your two SDL pets and the basic xorg-xorg-dri pet.

Now I get this error:
Failed to set video mode: couldn't find matching GLX visual
I'm not sure, but I feel that this is closer, perhaps just an xorg.conf edit away?
djnrempel
Posts: 34
Joined: Tue 29 Sep 2009, 03:58

#20 Post by djnrempel »

IT WORKS IT WORKS IT WORKS!!!

Huzzah!

I just exited X, ran xorgwizard one more time, restarted x, and fired up the game, and instead of som nasty error it gave me a beautiful big screen with the game.

I have named my first character Technosaurus, in your honour, a Draconian Paladin.

Now I have to go to bed.

I know you've done so much already, but there are just two minor things to fix:
- the location of the dat folder
- create an icon in the Games menu
Post Reply