Trying to compile GZDoom with Linux
Moderator: Graf Zahl
-
- Posts: 35
- Joined: Fri Sep 21, 2007 2:09
- Location: Australia
- Contact:
- TheDarkArchon
- Posts: 1000
- Joined: Wed Jul 06, 2005 11:58
- Location: What's that fucking smell
- Contact:
-
- Posts: 59
- Joined: Thu Sep 08, 2005 20:02
- Contact:
chmmr, try patch below and if it will still not compile post your error log.
Patch summary:
Patch summary:
- /Makefile.linux was restored to be as in the previous patch. If you don't like CCDV compiler output hiding, remove " @./ccdv" from the line "CCDV = @./ccdv".
- /src/gl/gl_framebuffer.cpp: small fixes (gl.SetGammaRamp differences, missing typecast). Should I move gl.SetGammaRamp fix to r_opengl.cpp/r_render.h?
- /src/gl/gl_framebuffer.h: small fixes again (DECLARE_CLASS split). DECLARE_CLASS already typedefs Super in Linux, so isn't there the same "bug" in Windows version?
- /src/gl/platform.h: removed. There is already /src/Linux/platform.h and it definitely should not be placed here as now it is not GLspecific (some /src files include it).
- /src/Linux/platform.h: added POINT and RECT definitions
- /src/sdl/hardware.cpp: added hack by stevenaaus to force software mode if no 32bpp
- /src/sdl/sdlglvideo.cpp: IMPLEMENT_ABSTRACT_CLASS instead of IMPLEMENT_CLASS and typo fix
- /src/sdl/sdlglvideo.h: inclusion guards, extern palette_brightness declaration for use in gl_framebuffer, removed declaration of Update (not defined in the cpp file), all private SDLGLFB methods and fields are now protected
- /src/zstring.h: add platform.h include necessary for Linux compilation. If it causes problems IMHO instead of removing this line, platform.h itself should be fixed
- /wadsrc/wadmake is autogenerated so I included it only for completeness
- Attachments
-
- patch30.zip
- Linux patch for GZDoom 1.0.30
- (6.11 KiB) Downloaded 158 times
- Graf Zahl
- GZDoom Developer
- Posts: 7148
- Joined: Wed Jul 20, 2005 9:48
- Location: Germany
- Contact:
-
- Posts: 59
- Joined: Thu Sep 08, 2005 20:02
- Contact:
zstring.h uses stricmp but it's not defined on Linux. And as zstring.h included to other files, platform.h include (or corresponding defines copied from platform.h) also fix c_console.cpp (uses strnicmp which not defined on Linux). As corresponding defines were moved from the makefile to platform.h I decided to include platform.h. If that was a bad choice, I think Makefile.linux line should be changed back to and therefore stricmp and strnicmp should be removed from platform.h
BTW, is there an easy way to generate configure script from existing code?
Code: Select all
CFLAGS += -DNEED_STRUPR
Code: Select all
CFLAGS += -Dstricmp=strcasecmp -Dstrnicmp=strncasecmp -DNEED_STRUPR
BTW, is there an easy way to generate configure script from existing code?
-
- Posts: 35
- Joined: Fri Sep 21, 2007 2:09
- Location: Australia
- Contact:
> > Why does zstring.h need platform.h? Sorry, but I won't put includes to
> > system specific files in global headers unless I know why.
> As corresponding defines were moved from the makefile to platform.h I
> decided to include platform.h. If that was a bad choice, I think
> Makefile.linux line... CFLAGS += -Dstricmp=strcasecmp -Dstrnicmp=strncasecmp
> -DNEED_STRUPR
Maybe it's a mistake to try and put different sorts of stuff in platform.h instead of where it would naturally occur. For eg.. the strcasecmp defs could go in zstring.h.
Hmmm.. i wouldn't mind seeing a docs/linux file though. It could include stuff about (AFAIK) SDL not being able to switch X's colour depth, the need for timidity, and Costja's and website addresses (which , i guess at the moment is this forum). And any other stuff. I'd write it up, but i'm a bit of a straight arse.
I can also test FreeBSD (5.3) and AMD64 (fedora 7) in case anyone's crazy enough to want to code for these platforms. I dont recommend it ;>
Steven
> > system specific files in global headers unless I know why.
> As corresponding defines were moved from the makefile to platform.h I
> decided to include platform.h. If that was a bad choice, I think
> Makefile.linux line... CFLAGS += -Dstricmp=strcasecmp -Dstrnicmp=strncasecmp
> -DNEED_STRUPR
Maybe it's a mistake to try and put different sorts of stuff in platform.h instead of where it would naturally occur. For eg.. the strcasecmp defs could go in zstring.h.
Hmmm.. i wouldn't mind seeing a docs/linux file though. It could include stuff about (AFAIK) SDL not being able to switch X's colour depth, the need for timidity, and Costja's and website addresses (which , i guess at the moment is this forum). And any other stuff. I'd write it up, but i'm a bit of a straight arse.
I can also test FreeBSD (5.3) and AMD64 (fedora 7) in case anyone's crazy enough to want to code for these platforms. I dont recommend it ;>
Steven
- GuntherDW
- Posts: 117
- Joined: Sat Nov 12, 2005 1:53
- Location: Belgium, Antwerp
- Contact:
i tried to compile the svn source ( r8 ),
and i had to patch Makefile.linux first,
but now it halts at this file

should i just update my SDL version or should i check this out?
i'm already updating my SDL version to see if that's causing it
(libsdl : 1.2.12, upd to 1.2.13)
edit: kay it's not me
i'm creating a patch to overcome all the errors i see
and i had to patch Makefile.linux first,
but now it halts at this file
Code: Select all
Compiling i_cd.cpp: [OK]
Compiling i_input.cpp: [OK]
Compiling i_main.cpp: [OK]
Compiling i_movie.cpp: [OK]
Compiling i_system.cpp: [OK]
Compiling sdlglvideo.cpp: [ERROR]
cc -c -pipe -Wall -Wno-unused -O2 -fomit-frame-pointer -D_REENTRANT -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/directfb -I/usr/include/libpng12 -DHAVE_FILELENGTH -D__forceinline=inline -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -DNEED_STRUPR -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/fragglescript/ -Isrc/thingdef/ -Isrc/Linux/ -Isrc/sdl/ -Isrc/gl/ -Isrc/gl/r_render/ -Isrc/textures/ -DUSEASM=1 -DNDEBUG -o releaseobj/sdlglvideo.o -c src/sdl/sdlglvideo.cpp
================================================================================In file included from src/sdl/sdlglvideo.cpp:20:
src/gl/gl_struct.h:149:7: warning: no newline at end of file
src/sdl/sdlglvideo.cpp: In member function ‘virtual bool SDLGLVideo::SetResolution(int, int, int)’:
src/sdl/sdlglvideo.cpp:261: error: ‘NewWidth’ was not declared in this scope
src/sdl/sdlglvideo.cpp:261: error: ‘NewHeight’ was not declared in this scope
src/sdl/sdlglvideo.cpp:261: error: ‘V_DoModeSetup’ was not declared in this scope
make[1]: *** [releaseobj/sdlglvideo.o] Error 1
make[1]: Leaving directory `/GuntherDW/src/svn/gzdoom'
make: *** [deps] Error 2

should i just update my SDL version or should i check this out?
i'm already updating my SDL version to see if that's causing it
(libsdl : 1.2.12, upd to 1.2.13)
edit: kay it's not me
i'm creating a patch to overcome all the errors i see

- GuntherDW
- Posts: 117
- Joined: Sat Nov 12, 2005 1:53
- Location: Belgium, Antwerp
- Contact:
i've got the patch ready and it works,
but i've got just 1 problem ingame
whatever crosshair you choose it just shows a blank "dot"
screen : http://www.guntherdw.be/tmp/DOOM0000.c.png
but i've got just 1 problem ingame
whatever crosshair you choose it just shows a blank "dot"
screen : http://www.guntherdw.be/tmp/DOOM0000.c.png
- Attachments
-
- r9.patch.tar
- experimental patch for trunk r9
- (10 KiB) Downloaded 119 times
- Graf Zahl
- GZDoom Developer
- Posts: 7148
- Joined: Wed Jul 20, 2005 9:48
- Location: Germany
- Contact:
- GuntherDW
- Posts: 117
- Joined: Sat Nov 12, 2005 1:53
- Location: Belgium, Antwerp
- Contact:
without
in gl_struct.h
it hands out this nice error
also, you changed the zdoom.lst back to windows slashes,
i'll just make it so that it uses 2 seperate listings, one for UNIX and one for win32
Code: Select all
#include "gl_functions.h"
it hands out this nice error
Code: Select all
Compiling gl_bsp.cpp: [ERROR]
g++ -c -pipe -Wall -Wno-unused -O2 -fomit-frame-pointer -D_REENTRANT -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/directfb -I/usr/include/libpng12 -DHAVE_FILELENGTH -D__forceinline=inline -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -DNEED_STRUPR -Dstricmp=strcasecmp -Dstrnicmp=strncasecmp -Isrc/ -Isrc/g_doom/ -Isrc/g_heretic/ -Isrc/g_hexen/ -Isrc/g_raven/ -Isrc/g_shared/ -Isrc/g_strife/ -Isrc/oplsynth/ -Isrc/sound/ -Isrc/fragglescript/ -Isrc/thingdef/ -Isrc/Linux/ -Isrc/sdl/ -Isrc/gl/ -Isrc/gl/r_render/ -Isrc/textures/ -DUSEASM=1 -DNDEBUG -o releaseobj/gl_bsp.o -c src/gl/gl_bsp.cpp
================================================================================In file included from src/gl/gl_bsp.cpp:44:
src/gl/gl_clipper.h:120:7: warning: no newline at end of file
src/gl/gl_struct.h:121: error: ISO C++ forbids declaration of ‘FGLTexture’ with no type
src/gl/gl_struct.h:121: error: expected ‘;’ before ‘*’ token
make[1]: *** [releaseobj/gl_bsp.o] Error 1
make[1]: Leaving directory `/GuntherDW/src/svn/gzdoom'
make: *** [deps] Error 2
i'll just make it so that it uses 2 seperate listings, one for UNIX and one for win32
- GuntherDW
- Posts: 117
- Joined: Sat Nov 12, 2005 1:53
- Location: Belgium, Antwerp
- Contact:
fixed a few others things as well 
i don't have windows atm (let alone a windows compiler ^^)
so could you try if the other 2 wadmake projects still work on windows?
edit, hmm, forgot to rename some files,
taking it back offline for a sec
edit: automated the other pk3 "makes" as well in the linux makefile

i don't have windows atm (let alone a windows compiler ^^)
so could you try if the other 2 wadmake projects still work on windows?
edit, hmm, forgot to rename some files,
taking it back offline for a sec

edit: automated the other pk3 "makes" as well in the linux makefile
- Attachments
-
- r10-r1.patch.tar.gz
- r10 experimental patch v2 (r1)
- (8.53 KiB) Downloaded 117 times
- GuntherDW
- Posts: 117
- Joined: Sat Nov 12, 2005 1:53
- Location: Belgium, Antwerp
- Contact:
- Graf Zahl
- GZDoom Developer
- Posts: 7148
- Joined: Wed Jul 20, 2005 9:48
- Location: Germany
- Contact: