Trying to compile GZDoom with Linux

Advanced OpenGL source port fork from ZDoom, picking up where ZDoomGL left off.
[Home] [Download] [Git builds (Win)] [Git builds (Mac)] [Wiki] [Repo] [Bugs&Suggestions]

Moderator: Graf Zahl

User avatar
ducon
Posts: 3
Joined: Sun Jun 25, 2006 16:08

Trying to compile GZDoom with Linux

Post 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.
User avatar
Doomguy0505
Posts: 40
Joined: Fri Jul 08, 2005 11:07

Post by Doomguy0505 »

Well, what is the error message in English?
forgrath
Posts: 2
Joined: Tue May 29, 2007 22:33

Re: Trying to compile GZDoom with Linux

Post 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.
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post 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.
forgrath
Posts: 2
Joined: Tue May 29, 2007 22:33

Post by forgrath »

Ahhh, ok. Thanks for the reply Graf.

- f.
disturbedite
Posts: 34
Joined: Fri Jul 07, 2006 1:35
Location: 66 Exeter Street

Post 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.
jengelh
Posts: 41
Joined: Sat Jun 24, 2006 10:21
Contact:

Post by jengelh »

some init code (for another program though)
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post by Graf Zahl »

Useless.
User avatar
Doomguy0505
Posts: 40
Joined: Fri Jul 08, 2005 11:07

Post by Doomguy0505 »

It runs better on wine than windows, because I can use fullscreen
disturbedite
Posts: 34
Joined: Fri Jul 07, 2006 1:35
Location: 66 Exeter Street

Post 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....
User avatar
Torr Samaho
Developer
Developer
Posts: 160
Joined: Fri Apr 13, 2007 8:26
Location: Germany
Contact:

Post 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?
Costja
Posts: 59
Joined: Thu Sep 08, 2005 20:02
Contact:

Post 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
Last edited by Costja on Sat Sep 22, 2007 3:32, edited 1 time in total.
User avatar
HeX_Vulture
Posts: 21
Joined: Sun May 06, 2007 3:59
Location: TeXas

Post 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
User avatar
Torr Samaho
Developer
Developer
Posts: 160
Joined: Fri Apr 13, 2007 8:26
Location: Germany
Contact:

Post 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?
Costja
Posts: 59
Joined: Thu Sep 08, 2005 20:02
Contact:

Post by Costja »

[DELETED. Double-posted by accident, sorry]
Last edited by Costja on Fri Oct 12, 2007 0:11, edited 1 time in total.
Locked

Return to “GZDoom”