Page 1 of 15

Trying to compile GZDoom with Linux

Posted: Mon Feb 26, 2007 10:42
by ducon
Hi,

I tried to compile GZDoom in my Linux box, and I had to:

Code: Select all

ln -s src/gl/gl_texture.h src/sdl/gl_texture.h
I don’t know if the engine will accept this but the compilator didn’t complain.
Then, the compilation stops here:

Code: Select all

g++ -c -pipe -Wall -Wno-unused -O2 -fomit-frame-pointer -DHAVE_FILELENGTH -D__forceinline=inline -Izlib -IFLAC `sdl-config --cflags` -Dstricmp=strcasecmp -Dstrnicmp=strncasecmp -DNEED_STRUPR -Isrc/ -Isrc/g_doom/ -Isrc/g_heretic/ -Isrc/g_hexen/ -Isrc/g_raven/ -Isrc/g_shared/ -Isrc/g_strife/ -Isrc/oplsynth/ -Isrc/sound/ -Isrc/sdl/ -DUSEASM=1 -DNDEBUG -o releaseobj/glstubs.o -c
g++: no input files
make[1]: *** [releaseobj/glstubs.o] Erreur 1
make[1]: quittant le répertoire « […]/zdoom/gzdoom.1.0.22 »
make: *** [deps] Erreur 2
Yes, I know that GZDoom does not compile, but I just post this in case it can help.

Posted: Thu May 03, 2007 10:52
by Doomguy0505
Well, what is the error message in English?

Re: Trying to compile GZDoom with Linux

Posted: Tue May 29, 2007 22:53
by forgrath
I thought I'd have a shot too, building on Gentoo.
ducon wrote: Yes, I know that GZDoom does not compile, but I just post this in case it can help.
Is it true that it doesn't compile on linux? Unless I'm looking in the wrong places, I've not seen anything to confirm one way or the other that it does/doesn't compile on Linux.

I've made a bit of progress with the following changes in addition to the one you pointed out for gl_textarea.h (except I edited sdl/glstubs.cpp to include ../gl/gl_textarea.h - same effect).

Makefile.linux:
CFLAGS += `pkg-config gtk+-2.0 --cflags`
LDFLAGS += -ljpeg `pkg-config gtk+-2.0 --libs`
# srcdirs was missing textures - so added to the end of the list...
SRCDIRS = src/ $(addprefix src/,g_doom/ g_heretic/ g_hexen/ g_raven/ g_shared/ g_strife/ oplsynth/ sound/ sdl/ textures/)

After those changes, compilation seems to run ok, but then dies when linking everything in the releaseobj/ directory. Here's the first error which causes the link to die:

releaseobj/p_maputl.o: In function `AActor::LinkToWorldForMapThing()':
p_maputl.cpp:(.text+0x8d8): undefined reference to `numgamenodes'
p_maputl.cpp:(.text+0x8ea): undefined reference to `gamenodes'
(snipped the rest for brevity).

Anyway, I'd be really interested to know whether anybody has gotten this to build & run on linux. Meanwhile, I'll investigate the link problem and see what I can find.

cheers,

- f.

Posted: Tue May 29, 2007 23:03
by Graf Zahl
Currently GZDoom doesn't compile on Linux. The reason for this is that there is no GL init code for it. I can't write it myself because I don't have Linux and so far nobody has volunteered to do it.

Posted: Tue May 29, 2007 23:11
by forgrath
Ahhh, ok. Thanks for the reply Graf.

- f.

Posted: Wed Jun 06, 2007 6:42
by disturbedite
hi all, i haven't posted for a long time and took a bit of a sabbatical while i switched to (kubuntu) linux permanently.

i thought i'd report this for anyone that is wondering.

i was gonna try to compile gzdoom (1.0.24) on linux (i386) and i thought it could work too since its based on opengl. but then i decided i'd try something else first. i tried it with wine (0.9.38) and was not entirely surprised to see it runs ABSOLUTELY PERFECTLY with wine! even with all effects enabled and maxed out.

give it a try if you want.

maybe this will help those of you on linux that wanna try this great doom port. (it was (& now is on linux!) my preferred doom port on windows.

Posted: Wed Jun 06, 2007 7:38
by jengelh
some init code (for another program though)

Posted: Wed Jun 06, 2007 16:46
by Graf Zahl
Useless.

Posted: Thu Jun 07, 2007 9:09
by Doomguy0505
It runs better on wine than windows, because I can use fullscreen

Posted: Fri Jun 15, 2007 21:15
by disturbedite
ha! i spent like an hour trying to debianize the source so i could make a i386 *ubuntu package (i'm on kubuntu gutsy i386) and now i can't believe i missed graf's post saying it doesn't compile on linux... well, i prolly did see it but forgot...

i wasn't successful in "debianizing" it anyway....not that it matters.

the reason i wanted to try to make a native linux version is cuz i finally did encounter a reproducible problem with wine, not 100% of the time, but it does occur roughly 50% of the time for me, i would say. [wine-0.9.38/xorg/xserver-7.2-3ubuntu3/xserver-xorg-video-intel-2.0.0-1ubuntu2/gzdoom-1.0.24]
its that after loading a save game, some times it just crashes the whole xserver and i have to hard reboot. i don't know whether its a wine issue or gzdoom tho...

i suppose i could make a log file and try, but that would mean sacrificing my session lol :wink:

a sort of "workaround" is to just play it without loading a save game. i couldn't remember what the level skip/warp command/code is tho, i thought it was warp xx(x) like other ports, but i then of course found out that was to move the player...and then i realized i was thinking of a command when i could have just used idclevxxx.

ADDENDUM:
i spoke too soon. i discovered another issue. sometimes while exiting the game it will crash the xserver or i think hang the computer. i say "i think" cuz when switching video modes or whatever while exiting it stays at a black screen. ctrl+alt+del or ctrl+bckspc (restart xserver) don't work either....

Posted: Tue Aug 07, 2007 16:53
by Torr Samaho
Graf Zahl wrote:Currently GZDoom doesn't compile on Linux. The reason for this is that there is no GL init code for it. I can't write it myself because I don't have Linux and so far nobody has volunteered to do it.
Now that I have ported Skulltag to Linux and the only major things missing is the GZDoom renderer, I'm interested in having a Linux version of GZDoom too. I won't make any promises that I'll be able to port GZDoom to Linux, but I'm willing to give it a try. Unfortunately I'm a noob at writing GL init code under Linux :). Did any version of ZDoomGL work under Linux?

Posted: Wed Sep 12, 2007 0:40
by Costja
I patched GZDoom so it works on my linux (Ubuntu 7.04). This version has two problems:
- flat/wall mirrors don't work (at least in my test wad)
- skybox drawing problems after uncommenting Finish.* calls in SDLFB::Update (commented now)

[DELETED, use lastest archive]

ADDED: may be this page will be helpful - http://files.codes-sources.com/fichier. ... 5Cmain.cpp

Posted: Wed Sep 12, 2007 5:11
by HeX_Vulture
It works O_o

And better yet it runs smoother than Windows GZDoom for me!

EDIT: Nice job! Thank you very much, you've made several linux Doomers happy :D

Posted: Wed Sep 12, 2007 9:05
by Torr Samaho
Nice. Do you mind if I alter the code so that it compiles under Linux and Windows and port it to Skulltag?

Posted: Wed Sep 12, 2007 10:27
by Costja
[DELETED. Double-posted by accident, sorry]