[build]$:cmake .. -DGLEW_LIBRARY="glew"
-- Using system zlib
-- Using system jpeg library
-- Using system bzip2 library
-- Using internal gme library
-- /usr/include
-- /usr/include
-- /home/hetdegon/Repositories/gzdoom/lzma/C
-- Found Xcursor at /usr/lib/x86_64-linux-gnu/libXcursor.so
-- GLEW include files found at /usr/include
-- FMOD include files found at /home/hetdegon/Repositories/gzdoom/fmodapi42636linux64/api/inc
-- FMOD library found at /home/hetdegon/Repositories/gzdoom/fmodapi42636linux64/api/lib/libfmodex64-4.26.36.so
-- Fluid synth libs: /usr/lib/x86_64-linux-gnu/libfluidsynth.so
-- Configuring done
-- Generating done
-- Build files have been written to: /home/hetdegon/Repositories/gzdoom/build
And then it fails compiling like this (excuse the verbose log):
src/gitinfo.h is up to date at commit G1.9pre-603-gb09405a.
[ 31%] Built target revision_check
[ 32%] Building CXX object src/CMakeFiles/zdoom.dir/sdl/hardware.o
In file included from /usr/include/GL/glxew.h:97:0,
from /home/hetdegon/Repositories/gzdoom/src/./gl/system/gl_system.h:75,
from /home/hetdegon/Repositories/gzdoom/src/sdl/sdlglvideo.h:7,
from /home/hetdegon/Repositories/gzdoom/src/sdl/hardware.cpp:50:
/usr/include/X11/Xlib.h:234:2: error: ‘typedef struct _XGC* GC’ redeclared as different kind of symbol
*GC;
^
In file included from /home/hetdegon/Repositories/gzdoom/src/./v_video.h:40:0,
from /home/hetdegon/Repositories/gzdoom/src/sdl/hardware.h:38,
from /home/hetdegon/Repositories/gzdoom/src/sdl/hardware.cpp:40:
/home/hetdegon/Repositories/gzdoom/src/./dobject.h:230:1: error: previous declaration of ‘namespace GC { }’
{
^
In file included from /usr/include/GL/glxew.h:97:0,
from /home/hetdegon/Repositories/gzdoom/src/./gl/system/gl_system.h:75,
from /home/hetdegon/Repositories/gzdoom/src/sdl/sdlglvideo.h:7,
from /home/hetdegon/Repositories/gzdoom/src/sdl/hardware.cpp:50:
/usr/include/X11/Xlib.h:279:2: error: ‘GC’ does not name a type
GC default_gc; /* GC for the root root visual */
^
/usr/include/X11/Xlib.h:1090:3: error: ‘GC’ does not name a type
GC gc;
^
/usr/include/X11/Xlib.h:1596:8: error: ‘GC’ does not name a type
extern GC XCreateGC(
^
/usr/include/X11/Xlib.h:1604:1: error: expected primary-expression before ‘)’ token
);
^
/usr/include/X11/Xlib.h:1607:5: error: ‘GC’ is not a type
GC /* gc */
^
/usr/include/X11/Xlib.h:1794:8: error: ‘GC’ does not name a type
extern GC XDefaultGC(
^
/usr/include/X11/Xlib.h:1798:8: error: ‘GC’ does not name a type
extern GC XDefaultGCOfScreen(
^
/usr/include/X11/Xlib.h:2052:5: error: ‘GC’ is not a type
GC /* gc */,
^
/usr/include/X11/Xlib.h:3831:5: error: ‘GC’ is not a type
GC /* gc */,
^
In file included from /usr/include/GL/glxew.h:98:0,
from /home/hetdegon/Repositories/gzdoom/src/./gl/system/gl_system.h:75,
from /home/hetdegon/Repositories/gzdoom/src/sdl/sdlglvideo.h:7,
from /home/hetdegon/Repositories/gzdoom/src/sdl/hardware.cpp:50:
/usr/include/X11/Xutil.h:710:5: error: ‘GC’ is not a type
GC /* gc */,
^
In file included from /usr/include/GL/glxew.h:97:0,
from /home/hetdegon/Repositories/gzdoom/src/./gl/system/gl_system.h:75,
from /home/hetdegon/Repositories/gzdoom/src/sdl/sdlglvideo.h:7,
from /home/hetdegon/Repositories/gzdoom/src/sdl/hardware.cpp:50:
/home/hetdegon/Repositories/gzdoom/src/sdl/hardware.cpp: In function ‘void I_InitGraphics()’:
/home/hetdegon/Repositories/gzdoom/src/sdl/hardware.cpp:108:6: error: expected unqualified-id before ‘int’
val.Bool = !!Args->CheckParm ("-devparm");
^
/home/hetdegon/Repositories/gzdoom/src/sdl/hardware.cpp:108:6: error: expected ‘;’ before ‘int’
make[2]: *** [src/CMakeFiles/zdoom.dir/sdl/hardware.o] Error 1
make[1]: *** [src/CMakeFiles/zdoom.dir/all] Error 2
make: *** [all] Error 2
Seems like a naming conflict with xlib?
My system is Ubuntu 14.04 64-bit. GLEW is 1.10.0 (already set up from personal projects, confirmed working fine). Gzdoom successfully and routinely built and tested before this commit.
Last edited by hetdegon on Mon May 12, 2014 22:32, edited 1 time in total.
Hm... That's strange. GC is a ZDoom internal namespace of the garbage collector.
I'm not really sure if glxew.h is really needed. Can you comment out that include and test if it still works? If not I'd have to do a rather invasive change I'd like to avoid.
Yes, commenting line 75 in gl_system.h worked, although then it later stopped at gl_interface.cpp (sorry for not providing a log, my terminal ate the messages after building the data files), unable to find a type APIENTRY. I replaced those for GLEWAPIENTRY (no difference if using GLAPIENTRY). I also had to specify a direct path to the glew library to cmake (cmake .. -DGLEW_LIBRARY="/usr/lib/x86_64-linux-gnu/libGLEW.so"). And then it built successfully.
However, there seem to be a few errors:
The game starts normally, outputs initialization messages for shaders, and then I notice software sector lightning is working odd:
and when changing it to any of the others (that look as intended) this happens (oh god the white void is eating the world and me aaaah)
I tried fiddling with other options without change, the artifacts only disappear when setting the sector lighting to software, which renders at full brightness, but without texture artifacts.
If there's anything I can do to help debug this further, please let me know.
(edit: forgot to mention, I pulled before building this, after my first post, if that changes anything, gitinfo.h seems to have the same "G1.9pre-603-gb09405a" string though)
What's your graphics hardware? This looks extremely strange.
Please post the entire GZDoom startup log. I'd like to see what type of OpenGL driver you have.
There haven't been any changes to the rest of the code so I wonder if this was caused by dropping pre GL 2.0 support.
(had to omit the latest part, or the post would hit the character limit)
and this would be gzdoom's, although it doesn't seem to have any relevant info. Note that even before this, my card didn't support one shader, dynamic lights, if that is telling.
[spoiler]GZDoom G1.9pre-603-gb09405a - 2014-05-10 17:09:43 +0200 - SDL version
Compiled on May 11 2014
Using video driver x11
Could not start log
M_LoadDefaults: Load system defaults.
Gameinfo scan took 0 ms
W_Init: Init WADfiles.
adding /home/storage/Repositories/gzdoom/build/gzdoom.pk3, 584 lumps
adding /home/storage/Games/Doom/IWAD/DOOM2.WAD, 2919 lumps
adding /home/storage/Games/Doom/GZDOOM/lights.pk3, 4 lumps
adding /home/storage/Games/Doom/GZDOOM/EXTRA/brightmaps.pk3, 1081 lumps
I_Init: Setting up machine state.
CPU Vendor ID: AuthenticAMD
Name: AMD FX(tm)-4100 Quad-Core Processor
Family 21 (21), Model 1, Stepping 2
Features: MMX MMX+ SSE SSE2 SSE3 SSSE3 SSE4.1 SSE4.2
I_InitSound: Initializing FMOD
FMOD Sound System, copyright � Firelight Technologies Pty, Ltd., 1994-2009.
Loaded FMOD version 4.26.36
V_Init: allocate screen.
S_Init: Setting up sound.
ST_Init: Init startup screen.
Checking cmd-line parameters...
S_InitData: Load sound definitions.
G_ParseMapInfo: Load map definitions.
Texman.Init: Init texture manager.
ParseTeamInfo: Load team definitions.
LoadActors: Load actor definitions.
R_Init: Init Doom refresh subsystem.
DecalLibrary: Load decals.
M_Init: Init menus.
P_Init: Init Playloop state.
ParseSBarInfo: Loading default status bar definition.
ParseSBarInfo: Loading custom status bar definition.
D_CheckNetGame: Checking network game status.
player 1 of 1 (1 nodes)
Init Shader 'Default::colormap':
Resolution: 1024 x 768
fluidsynth: warning: Instrument "Honkytonk Piano": Some invalid generators were discarded
fluidsynth: warning: Failed to pin the sample data to RAM; swapping is possible.
Init Shader 'Default::glow':
@Edward-san: Ah, amusingly I tried that with -DGLEW_LIBRARY set to GLEW (I build my own gl stuff with -LGLEW) but didn't work, so thought there was some error somewhere else. I guess I am just not that familiar with cmake.
As of git revision G1.9pre-604-ga42cde0 no changes are needed on the source itself to run (with skyrimguy's patch it builds properly without any further modification), so I think the building bug can be marked as fixed.
I still get the weird sector lightning not working in "software" mode and causing artifacts in the rest, though. Should I file that as a different bug?
Uhm. I see. It is unfortunate, I will see if I there's any available update for my drivers and hope that does the trick, then.
Edit: There is a slight change though. If using non-additive dynamic lights, artifact will happen. Enabling "force additive lighting" or disabling lights entirely makes the artifacts disappear, which explains why the non-functioning Software mode didn't have artifacts because it was fullbright. Seems something about my card doesn't like the dynlight shader, I'll try to fix it here.
Aha. So the dynamic light compositing is broken, i.e. rendering them with multiple passes.
Since that works fine for me with the 335 driver on Windows I guess we'll have to wait and see what's the problem and if it gets fixed.
Can you retry this with '+gl_usevbo 0' on the command line? I have had other reports that seem to imply that the GL_ARB_buffer_storage extension is bugged in the 331 driver version.
I still have no clue why you don't get the dynamic light shader to run, though. What happens if you enable it?
+gl_usevbo 0 doesn't seem to make a difference with the artifacts and brightmaps. But seems it's indeed related to lights, everything points to it, including this strange arrangement I just found while testing (using 337 drivers now):
Spoiler: sector-sensitive glitching
Yeah, all 3 problems I have (dynlight glitch, brightmaps gone, software sector lighting) are all related to lighting, everything else seems to work normally. Strange nothing else fails, fuzz effects, translucency, geometry, swirly stuff, everything else is in order.
But yeah, if you cannot reproduce in your system, it's going to be complicated unless more people plays around with this version and hits the bug. Could also be Linux-specific, I need to test if it also happens in Windows, but I lack a matching build and don't have what I need to build one here.
skyrimguy's patch works for me about the cmake part.
I forgot to say that the game runs fine for me, no glitches at all.
I noticed a thing when using 'restart' command: when I run normally, the shader options menu is not visible, but if I restart the game with 'restart', it appears, though the options inside seem to be useless for my gl card ...