Building GZDOOM without OPENGL

Something not working in GZDoom that's not a bug? Is the display a bit quirky and unexpected? Post here.

Moderator: Graf Zahl

dpJudas
Developer
Developer
Posts: 798
Joined: Sat Jul 23, 2016 7:53

Re: Building GZDOOM without OPENGL

Post by dpJudas » Wed Apr 05, 2017 14:51

On this subject, how difficult would it be to create another target in CMake called DebugDrawers?

Since we moved from assembly drawers to C the debug builds are almost useless when using the software renderer. The reason being that un-optimized drawers are so slow it makes it unbearable to do anything (frame rate is something like 5-10 tops). Unless the purpose is to debug a drawer, it is much much preferable if the drawers were built with optimization enabled in debug builds.

User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Re: Building GZDOOM without OPENGL

Post by Graf Zahl » Wed Apr 05, 2017 15:09

For that you have to isolate the affected source files into a separate group first.
About adding a new compile config you will have to ask someone else. This is something I never needed in a CMake project so I'd have to look it up in the CMake docs myself first.

vanfanel
Posts: 35
Joined: Mon Mar 12, 2012 19:31

Re: Building GZDOOM without OPENGL

Post by vanfanel » Wed Apr 05, 2017 15:47

Ouch, it seems it won't build ATM:

Code: Select all

Linking CXX executable ../qzdoom
CMakeFiles/zdoom.dir/tempfiles.cpp.o: In function `FTempFileName::FTempFileName(char const*)':
/home/pi/src/qzdoom/src/tempfiles.cpp:46: warning: the use of `tempnam' is dangerous, better use `mkstemp'
CMakeFiles/zdoom.dir/polyrenderer/poly_all.cpp.o: In function `PolyRenderer::RenderActorView(AActor*, bool)':
/home/pi/src/qzdoom/src/polyrenderer/poly_renderer.cpp:149: undefined reference to `ScreenTriangle::FuzzStart'
CMakeFiles/zdoom.dir/polyrenderer/poly_all.cpp.o: In function `TriScreenDrawer8<TriScreenDrawerModes::OpaqueBlend, TriScreenDrawerModes::TextureSampler>::Execute(int, int, unsigned int, unsigned int, TriDrawTriangleArgs const*)':
/home/pi/src/qzdoom/src/polyrenderer/drawers/poly_drawer8.h:289: undefined reference to `ScreenTriangle::FuzzStart'
CMakeFiles/zdoom.dir/polyrenderer/poly_all.cpp.o: In function `TriScreenDrawer8<TriScreenDrawerModes::MaskedBlend, TriScreenDrawerModes::TextureSampler>::Execute(int, int, unsigned int, unsigned int, TriDrawTriangleArgs const*)':
/home/pi/src/qzdoom/src/polyrenderer/drawers/poly_drawer8.h:289: undefined reference to `ScreenTriangle::FuzzStart'
CMakeFiles/zdoom.dir/polyrenderer/poly_all.cpp.o: In function `TriScreenDrawer8<TriScreenDrawerModes::AddClampBlend, TriScreenDrawerModes::TextureSampler>::Execute(int, int, unsigned int, unsigned int, TriDrawTriangleArgs const*)':
/home/pi/src/qzdoom/src/polyrenderer/drawers/poly_drawer8.h:289: undefined reference to `ScreenTriangle::FuzzStart'
CMakeFiles/zdoom.dir/polyrenderer/poly_all.cpp.o: In function `TriScreenDrawer8<TriScreenDrawerModes::SubClampBlend, TriScreenDrawerModes::TextureSampler>::Execute(int, int, unsigned int, unsigned int, TriDrawTriangleArgs const*)':
/home/pi/src/qzdoom/src/polyrenderer/drawers/poly_drawer8.h:289: undefined reference to `ScreenTriangle::FuzzStart'
CMakeFiles/zdoom.dir/polyrenderer/poly_all.cpp.o:/home/pi/src/qzdoom/src/polyrenderer/drawers/poly_drawer8.h:289: more undefined references to `ScreenTriangle::FuzzStart' follow
collect2: error: ld returned 1 exit status
src/CMakeFiles/zdoom.dir/build.make:10469: recipe for target 'qzdoom' failed
make[2]: *** [qzdoom] Error 1
CMakeFiles/Makefile2:837: recipe for target 'src/CMakeFiles/zdoom.dir/all' failed
make[1]: *** [src/CMakeFiles/zdoom.dir/all] Error 2
Makefile:117: recipe for target 'all' failed
make: *** [all] Error 2


dpJudas
Developer
Developer
Posts: 798
Joined: Sat Jul 23, 2016 7:53

Re: Building GZDOOM without OPENGL

Post by dpJudas » Wed Apr 05, 2017 21:37

Oops. Pushed a fix for that.

vanfanel
Posts: 35
Joined: Mon Mar 12, 2012 19:31

Re: Building GZDOOM without OPENGL

Post by vanfanel » Thu Apr 06, 2017 10:56

It seems hard to debug... an INFINITE number of threads are being created and destroyed upon launch:

Code: Select all

pi@raspberrypi:~/doom $ ./doom
GNU gdb (Raspbian 7.7.1+dfsg-5+rpi1) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "arm-linux-gnueabihf".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./qzdoom...done.
(gdb) r
Starting program: /home/pi/doom/qzdoom -iwad doomu.wad
Dwarf Error: wrong version in compilation unit header (is -25251, should be 2, 3, or 4) [in module /usr/lib/debug/.build-id/02/4da9b35ba4e86bf23715795948d86728d8a39d.debug]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
Dwarf Error: wrong version in compilation unit header (is -24386, should be 2, 3, or 4) [in module /usr/lib/debug/.build-id/4d/459747ca3ce1a8adf08cdbb41e2c9bd5602990.debug]
Dwarf Error: wrong version in compilation unit header (is 9667, should be 2, 3, or 4) [in module /usr/lib/debug/.build-id/90/57a5b1f2a4bbdcd06303287ce89e4ccf5f1ff7.debug]
warning: File "/usr/lib/arm-linux-gnueabihf/libstdc++.so.6.0.22-gdb.py" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".
To enable execution of this file add
	add-auto-load-safe-path /usr/lib/arm-linux-gnueabihf/libstdc++.so.6.0.22-gdb.py
line to your configuration file "/home/pi/.gdbinit".
To completely disable this security protection add
	set auto-load safe-path /
line to your configuration file "/home/pi/.gdbinit".
For more information about this security protection see the
"Auto-loading safe path" section in the GDB manual.  E.g., run from the shell:
	info "(gdb)Auto-loading safe path"
Dwarf Error: wrong version in compilation unit header (is -27098, should be 2, 3, or 4) [in module /usr/lib/debug/.build-id/e5/f4e3d59b5ec692e4080943a9e5f52715dbe939.debug]
Dwarf Error: wrong version in compilation unit header (is 25537, should be 2, 3, or 4) [in module /usr/lib/debug/.build-id/25/b79f1158416df418745ba9f322d5c68daf18e6.debug]
QZDoom q1.3pre-1641-ga1473c4 - 2017-04-06 04:30:38 -0400 - SDL version
Compiled on Apr  1 2017

M_LoadDefaults: Load system defaults.
Dwarf Error: wrong version in compilation unit header (is 6565, should be 2, 3, or 4) [in module /usr/lib/debug/.build-id/c5/15c3b091677587381f57155ad7ac3707c71dce.debug]
Dwarf Error: wrong version in compilation unit header (is 25481, should be 2, 3, or 4) [in module /usr/lib/debug/.build-id/86/b6212d2d7578042b59581378f58b49f7fdf30f.debug]
Dwarf Error: wrong version in compilation unit header (is 942, should be 2, 3, or 4) [in module /usr/lib/debug/.build-id/2f/54912a1710ee0427b32aee981e5f59459dadf2.debug]
Dwarf Error: wrong version in compilation unit header (is -16159, should be 2, 3, or 4) [in module /usr/lib/debug/.build-id/2c/5368760b1e037fe7746f1a9adc47e4dc70adf8.debug]
W_Init: Init WADfiles.
 adding /home/pi/doom/qzdoom.pk3, 711 lumps
 adding doomu.wad, 2306 lumps
I_Init: Setting up machine state.
I_InitSound: Initializing OpenAL
  Opened device ALSA Default
[New Thread 0x767fb450 (LWP 28164)]
  EFX enabled
[New Thread 0x75e2a450 (LWP 28165)]
V_Init: allocate screen.
[New Thread 0x75629b40 (LWP 28166)]
S_Init: Setting up sound.
ST_Init: Init startup screen.
Checking cmd-line parameters...
[New Thread 0x754ff450 (LWP 28167)]
[Thread 0x754ff450 (LWP 28167) exited]
[New Thread 0x754ff450 (LWP 28168)]
[Thread 0x754ff450 (LWP 28168) exited]
[New Thread 0x754ff450 (LWP 28169)]
[Thread 0x754ff450 (LWP 28169) exited]
S_InitData: Load sound definitions.
[New Thread 0x754ff450 (LWP 28170)]
[Thread 0x754ff450 (LWP 28170) exited]
[New Thread 0x754ff450 (LWP 28171)]
[Thread 0x754ff450 (LWP 28171) exited]
[New Thread 0x754ff450 (LWP 28172)]
[Thread 0x754ff450 (LWP 28172) exited]
[New Thread 0x754ff450 (LWP 28173)]
[Thread 0x754ff450 (LWP 28173) exited]
[New Thread 0x754ff450 (LWP 28174)]
[Thread 0x754ff450 (LWP 28174) exited]
[New Thread 0x754ff450 (LWP 28175)]
G_ParseMapInfo: Load map definitions.
[New Thread 0x74cff450 (LWP 28176)]
[Thread 0x754ff450 (LWP 28175) exited]
[Thread 0x74cff450 (LWP 28176) exited]
[New Thread 0x754ff450 (LWP 28177)]
[Thread 0x754ff450 (LWP 28177) exited]
[New Thread 0x754ff450 (LWP 28178)]
[Thread 0x754ff450 (LWP 28178) exited]
[New Thread 0x754ff450 (LWP 28179)]
[Thread 0x754ff450 (LWP 28179) exited]
[New Thread 0x754ff450 (LWP 28180)]
[Thread 0x754ff450 (LWP 28180) exited]
[New Thread 0x754ff450 (LWP 28181)]
[Thread 0x754ff450 (LWP 28181) exited]
[New Thread 0x754ff450 (LWP 28182)]
[Thread 0x754ff450 (LWP 28182) exited]
[New Thread 0x754ff450 (LWP 28183)]
Texman.Init: Init texture manager.
[Thread 0x754ff450 (LWP 28183) exited]
[New Thread 0x754ff450 (LWP 28184)]
[Thread 0x754ff450 (LWP 28184) exited]
[New Thread 0x754ff450 (LWP 28185)]
[Thread 0x754ff450 (LWP 28185) exited]
[New Thread 0x754ff450 (LWP 28186)]
[Thread 0x754ff450 (LWP 28186) exited]
[New Thread 0x754ff450 (LWP 28187)]
[Thread 0x754ff450 (LWP 28187) exited]
[New Thread 0x754ff450 (LWP 28188)]
[Thread 0x754ff450 (LWP 28188) exited]
[New Thread 0x754ff450 (LWP 28189)]
[Thread 0x754ff450 (LWP 28189) exited]
[New Thread 0x754ff450 (LWP 28190)]
[Thread 0x754ff450 (LWP 28190) exited]
[New Thread 0x754ff450 (LWP 28191)]
[Thread 0x754ff450 (LWP 28191) exited]
[New Thread 0x754ff450 (LWP 28192)]
[Thread 0x754ff450 (LWP 28192) exited]
[New Thread 0x754ff450 (LWP 28193)]
[Thread 0x754ff450 (LWP 28193) exited]
[New Thread 0x754ff450 (LWP 28194)]
[Thread 0x754ff450 (LWP 28194) exited]
[New Thread 0x754ff450 (LWP 28195)]
[Thread 0x754ff450 (LWP 28195) exited]
[New Thread 0x754ff450 (LWP 28196)]
[Thread 0x754ff450 (LWP 28196) exited]
[New Thread 0x754ff450 (LWP 28197)]
[Thread 0x754ff450 (LWP 28197) exited]
[New Thread 0x754ff450 (LWP 28198)]
[Thread 0x754ff450 (LWP 28198) exited]
[New Thread 0x754ff450 (LWP 28199)]
[Thread 0x754ff450 (LWP 28199) exited]
[New Thread 0x754ff450 (LWP 28200)]
[Thread 0x754ff450 (LWP 28200) exited]
[New Thread 0x754ff450 (LWP 28201)]
[Thread 0x754ff450 (LWP 28201) exited]
[New Thread 0x754ff450 (LWP 28202)]
[Thread 0x754ff450 (LWP 28202) exited]
[New Thread 0x754ff450 (LWP 28203)]
[Thread 0x754ff450 (LWP 28203) exited]
[New Thread 0x754ff450 (LWP 28204)]
[Thread 0x754ff450 (LWP 28204) exited]
[New Thread 0x754ff450 (LWP 28205)]
[Thread 0x754ff450 (LWP 28205) exited]
[New Thread 0x754ff450 (LWP 28206)]
[Thread 0x754ff450 (LWP 28206) exited]
[New Thread 0x754ff450 (LWP 28207)]
[Thread 0x754ff450 (LWP 28207) exited]
[New Thread 0x754ff450 (LWP 28208)]
[Thread 0x754ff450 (LWP 28208) exited]
[New Thread 0x754ff450 (LWP 28209)]
[Thread 0x754ff450 (LWP 28209) exited]
[New Thread 0x754ff450 (LWP 28210)]
[Thread 0x754ff450 (LWP 28210) exited]
[New Thread 0x754ff450 (LWP 28211)]
[Thread 0x754ff450 (LWP 28211) exited]
[New Thread 0x754ff450 (LWP 28212)]
[Thread 0x754ff450 (LWP 28212) exited]
[New Thread 0x754ff450 (LWP 28213)]
[Thread 0x754ff450 (LWP 28213) exited]
[New Thread 0x754ff450 (LWP 28214)]
[Thread 0x754ff450 (LWP 28214) exited]
[New Thread 0x754ff450 (LWP 28215)]
[Thread 0x754ff450 (LWP 28215) exited]
[New Thread 0x754ff450 (LWP 28216)]
[Thread 0x754ff450 (LWP 28216) exited]
[New Thread 0x754ff450 (LWP 28217)]
[Thread 0x754ff450 (LWP 28217) exited]
[New Thread 0x754ff450 (LWP 28218)]
[Thread 0x754ff450 (LWP 28218) exited]
[New Thread 0x754ff450 (LWP 28219)]
[Thread 0x754ff450 (LWP 28219) exited]
[New Thread 0x754ff450 (LWP 28220)]
[Thread 0x754ff450 (LWP 28220) exited]
[New Thread 0x754ff450 (LWP 28221)]
[Thread 0x754ff450 (LWP 28221) exited]
[New Thread 0x754ff450 (LWP 28222)]
[Thread 0x754ff450 (LWP 28222) exited]
[New Thread 0x754ff450 (LWP 28223)]
[Thread 0x754ff450 (LWP 28223) exited]
[New Thread 0x754ff450 (LWP 28224)]
[Thread 0x754ff450 (LWP 28224) exited]
[New Thread 0x754ff450 (LWP 28225)]
[Thread 0x754ff450 (LWP 28225) exited]
[New Thread 0x754ff450 (LWP 28226)]
[Thread 0x754ff450 (LWP 28226) exited]
[New Thread 0x754ff450 (LWP 28227)]
[Thread 0x754ff450 (LWP 28227) exited]
[New Thread 0x754ff450 (LWP 28228)]
[Thread 0x754ff450 (LWP 28228) exited]
[New Thread 0x754ff450 (LWP 28229)]
[Thread 0x754ff450 (LWP 28229) exited]
[New Thread 0x754ff450 (LWP 28230)]
[Thread 0x754ff450 (LWP 28230) exited]
[New Thread 0x754ff450 (LWP 28231)]
[Thread 0x754ff450 (LWP 28231) exited]
[New Thread 0x754ff450 (LWP 28232)]
[Thread 0x754ff450 (LWP 28232) exited]
[New Thread 0x754ff450 (LWP 28233)]
[Thread 0x754ff450 (LWP 28233) exited]
[New Thread 0x754ff450 (LWP 28234)]
[Thread 0x754ff450 (LWP 28234) exited]
[New Thread 0x754ff450 (LWP 28235)]
[Thread 0x754ff450 (LWP 28235) exited]
[New Thread 0x754ff450 (LWP 28236)]
[Thread 0x754ff450 (LWP 28236) exited]
[New Thread 0x754ff450 (LWP 28237)]
[Thread 0x754ff450 (LWP 28237) exited]
[New Thread 0x754ff450 (LWP 28238)]
[Thread 0x754ff450 (LWP 28238) exited]
[New Thread 0x754ff450 (LWP 28239)]
[Thread 0x754ff450 (LWP 28239) exited]
[New Thread 0x754ff450 (LWP 28240)]
[Thread 0x754ff450 (LWP 28240) exited]
[New Thread 0x754ff450 (LWP 28241)]
[Thread 0x754ff450 (LWP 28241) exited]
[New Thread 0x754ff450 (LWP 28242)]
[Thread 0x754ff450 (LWP 28242) exited]
[New Thread 0x754ff450 (LWP 28243)]
[Thread 0x754ff450 (LWP 28243) exited]
[New Thread 0x754ff450 (LWP 28244)]
[Thread 0x754ff450 (LWP 28244) exited]
[New Thread 0x754ff450 (LWP 28245)]
[Thread 0x754ff450 (LWP 28245) exited]
[New Thread 0x754ff450 (LWP 28246)]
[Thread 0x754ff450 (LWP 28246) exited]
[New Thread 0x754ff450 (LWP 28247)]
[Thread 0x754ff450 (LWP 28247) exited]
[New Thread 0x754ff450 (LWP 28248)]
[Thread 0x754ff450 (LWP 28248) exited]
[New Thread 0x754ff450 (LWP 28249)]
[Thread 0x754ff450 (LWP 28249) exited]
[New Thread 0x754ff450 (LWP 28250)]
[Thread 0x754ff450 (LWP 28250) exited]
[New Thread 0x754ff450 (LWP 28251)]
[Thread 0x754ff450 (LWP 28251) exited]
[New Thread 0x754ff450 (LWP 28252)]
[Thread 0x754ff450 (LWP 28252) exited]
[New Thread 0x754ff450 (LWP 28253)]
[Thread 0x754ff450 (LWP 28253) exited]
[New Thread 0x754ff450 (LWP 28254)]
[Thread 0x754ff450 (LWP 28254) exited]
[New Thread 0x754ff450 (LWP 28255)]
[Thread 0x754ff450 (LWP 28255) exited]
[New Thread 0x754ff450 (LWP 28256)]
[Thread 0x754ff450 (LWP 28256) exited]
[New Thread 0x754ff450 (LWP 28257)]
[Thread 0x754ff450 (LWP 28257) exited]
[New Thread 0x754ff450 (LWP 28258)]
[Thread 0x754ff450 (LWP 28258) exited]
[New Thread 0x754ff450 (LWP 28259)]
[Thread 0x754ff450 (LWP 28259) exited]
[New Thread 0x754ff450 (LWP 28260)]
[Thread 0x754ff450 (LWP 28260) exited]
[New Thread 0x754ff450 (LWP 28261)]
[Thread 0x754ff450 (LWP 28261) exited]
[New Thread 0x754ff450 (LWP 28262)]
[Thread 0x754ff450 (LWP 28262) exited]
[New Thread 0x754ff450 (LWP 28263)]
ParseTeamInfo: Load team definitions.
[Thread 0x754ff450 (LWP 28263) exited]
[New Thread 0x754ff450 (LWP 28264)]
[Thread 0x754ff450 (LWP 28264) exited]
[New Thread 0x754ff450 (LWP 28265)]
[Thread 0x754ff450 (LWP 28265) exited]
[New Thread 0x754ff450 (LWP 28266)]
[Thread 0x754ff450 (LWP 28266) exited]
[New Thread 0x754ff450 (LWP 28267)]
LoadActors: Load actor definitions.
[Thread 0x754ff450 (LWP 28267) exited]
[New Thread 0x754ff450 (LWP 28268)]
[Thread 0x754ff450 (LWP 28268) exited]
[New Thread 0x754ff450 (LWP 28269)]
[Thread 0x754ff450 (LWP 28269) exited]
[New Thread 0x754ff450 (LWP 28270)]
[Thread 0x754ff450 (LWP 28270) exited]
[New Thread 0x754ff450 (LWP 28271)]
[Thread 0x754ff450 (LWP 28271) exited]
[New Thread 0x754ff450 (LWP 28272)]
[Thread 0x754ff450 (LWP 28272) exited]
[New Thread 0x754ff450 (LWP 28273)]
[Thread 0x754ff450 (LWP 28273) exited]
[New Thread 0x754ff450 (LWP 28274)]
[Thread 0x754ff450 (LWP 28274) exited]
[New Thread 0x754ff450 (LWP 28275)]
[Thread 0x754ff450 (LWP 28275) exited]
[New Thread 0x754ff450 (LWP 28276)]
[Thread 0x754ff450 (LWP 28276) exited]
[New Thread 0x754ff450 (LWP 28277)]
[Thread 0x754ff450 (LWP 28277) exited]
[New Thread 0x754ff450 (LWP 28278)]
[Thread 0x754ff450 (LWP 28278) exited]
[New Thread 0x754ff450 (LWP 28279)]
I cut the text there, but it has been like that for 5 minutes....

In ZDOOM, the same problem used to happen when trying to debug:
https://forum.zdoom.org/viewtopic.php?f=2&t=51851

_mental_
Developer
Developer
Posts: 255
Joined: Sun Aug 07, 2011 13:36

Re: Building GZDOOM without OPENGL

Post by _mental_ » Thu Apr 06, 2017 12:20

Execute the following command in gdb before running:

Code: Select all

set print thread-events off
This setting isn't saved automatically so you can add this command to ~/.gdbinit file.

Without the hardware I cannot say why so many threads are created/destroyed.
Maybe it's caused by desktop environment or it may be sound related, who knows.


EDIT: For me the spam of thread messages is cause by FPS limiter.

vanfanel
Posts: 35
Joined: Mon Mar 12, 2012 19:31

Re: Building GZDOOM without OPENGL

Post by vanfanel » Thu Apr 06, 2017 13:22

Ok, this is a debug session with vid_glswfb=true in qzdoom.ini:

Code: Select all

GNU gdb (Raspbian 7.7.1+dfsg-5+rpi1) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "arm-linux-gnueabihf".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./qzdoom...done.
(gdb) set print thread-events off
(gdb) r  
Starting program: /home/pi/doom/qzdoom -iwad doomu.wad
Dwarf Error: wrong version in compilation unit header (is -25251, should be 2, 3, or 4) [in module /usr/lib/debug/.build-id/02/4da9b35ba4e86bf23715795948d86728d8a39d.debug]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
Dwarf Error: wrong version in compilation unit header (is -24386, should be 2, 3, or 4) [in module /usr/lib/debug/.build-id/4d/459747ca3ce1a8adf08cdbb41e2c9bd5602990.debug]
Dwarf Error: wrong version in compilation unit header (is 9667, should be 2, 3, or 4) [in module /usr/lib/debug/.build-id/90/57a5b1f2a4bbdcd06303287ce89e4ccf5f1ff7.debug]
warning: File "/usr/lib/arm-linux-gnueabihf/libstdc++.so.6.0.22-gdb.py" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".
To enable execution of this file add
	add-auto-load-safe-path /usr/lib/arm-linux-gnueabihf/libstdc++.so.6.0.22-gdb.py
line to your configuration file "/home/pi/.gdbinit".
To completely disable this security protection add
	set auto-load safe-path /
line to your configuration file "/home/pi/.gdbinit".
For more information about this security protection see the
"Auto-loading safe path" section in the GDB manual.  E.g., run from the shell:
	info "(gdb)Auto-loading safe path"
Dwarf Error: wrong version in compilation unit header (is -27098, should be 2, 3, or 4) [in module /usr/lib/debug/.build-id/e5/f4e3d59b5ec692e4080943a9e5f52715dbe939.debug]
Dwarf Error: wrong version in compilation unit header (is 25537, should be 2, 3, or 4) [in module /usr/lib/debug/.build-id/25/b79f1158416df418745ba9f322d5c68daf18e6.debug]
QZDoom q1.3pre-1641-ga1473c4 - 2017-04-06 04:30:38 -0400 - SDL version
Compiled on Apr  1 2017

M_LoadDefaults: Load system defaults.
Dwarf Error: wrong version in compilation unit header (is 6565, should be 2, 3, or 4) [in module /usr/lib/debug/.build-id/c5/15c3b091677587381f57155ad7ac3707c71dce.debug]
Dwarf Error: wrong version in compilation unit header (is 25481, should be 2, 3, or 4) [in module /usr/lib/debug/.build-id/86/b6212d2d7578042b59581378f58b49f7fdf30f.debug]
Dwarf Error: wrong version in compilation unit header (is 942, should be 2, 3, or 4) [in module /usr/lib/debug/.build-id/2f/54912a1710ee0427b32aee981e5f59459dadf2.debug]
Dwarf Error: wrong version in compilation unit header (is -16159, should be 2, 3, or 4) [in module /usr/lib/debug/.build-id/2c/5368760b1e037fe7746f1a9adc47e4dc70adf8.debug]
W_Init: Init WADfiles.
 adding /home/pi/doom/qzdoom.pk3, 711 lumps
 adding doomu.wad, 2306 lumps
I_Init: Setting up machine state.
I_InitSound: Initializing OpenAL
  Opened device ALSA Default
  EFX enabled
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.
script parsing took 28056.43 ms
R_Init: Init Doom refresh subsystem.
DecalLibrary: Load decals.
M_Init: Init menus.
P_Init: Init Playloop state.
ParseSBarInfo: Loading custom status bar definition.
D_CheckNetGame: Checking network game status.
player 1 of 1 (1 nodes)
Using video driver RPI

Program received signal SIGSEGV, Segmentation fault.
0x00000000 in ?? ()
(gdb) bt
#0  0x00000000 in ?? ()
#1  0x007a33e4 in CollectExtensions ()
    at /home/pi/src/qzdoom/src/gl/system/gl_interface.cpp:56
#2  0x007a3650 in gl_LoadExtensions ()
    at /home/pi/src/qzdoom/src/gl/system/gl_interface.cpp:131
#3  0x007a7814 in OpenGLSWFrameBuffer::OpenGLSWFrameBuffer (this=0x18a1cb0, hMonitor=0x0, 
    width=640, height=480, bits=32, refreshHz=60, fullscreen=true, bgra=false)
    at /home/pi/src/qzdoom/src/gl/system/gl_swframebuffer.cpp:199
#4  0x007a735c in CreateGLSWFrameBuffer (width=640, height=480, bgra=false, fullscreen=true)
    at /home/pi/src/qzdoom/src/gl/system/gl_swframebuffer.cpp:112
#5  0x002448b4 in SDLGLVideo::CreateFrameBuffer (this=0x1ee9638, width=640, height=480, 
    bgra=false, fullscreen=true, old=0x0)
    at /home/pi/src/qzdoom/src/posix/sdl/sdlglvideo.cpp:224
#6  0x0023a264 in I_SetMode (width=@0x7effe574: 640, height=@0x7effe570: 480, old=0x0)
    at /home/pi/src/qzdoom/src/posix/sdl/hardware.cpp:169
#7  0x00710bfc in V_DoModeSetup (width=640, height=480, bits=24)
    at /home/pi/src/qzdoom/src/v_video.cpp:1266
#8  0x00244bd4 in SDLGLVideo::SetResolution (this=0x1ee9638, width=640, height=480, bits=24)
    at /home/pi/src/qzdoom/src/posix/sdl/sdlglvideo.cpp:300
#9  0x00711a1c in V_Init2 () at /home/pi/src/qzdoom/src/v_video.cpp:1561
#10 0x0048e614 in D_DoomMain () at /home/pi/src/qzdoom/src/d_main.cpp:2626
#11 0x00240524 in main (argc=3, argv=0x7efff7f4)
    at /home/pi/src/qzdoom/src/posix/sdl/i_main.cpp:259
(gdb)
Hope it helps.

dpJudas
Developer
Developer
Posts: 798
Joined: Sat Jul 23, 2016 7:53

Re: Building GZDOOM without OPENGL

Post by dpJudas » Thu Apr 06, 2017 18:34

Hmm, strange crash. Dies from glGetIntegerv being a null pointer. That would require OpenGL's GetProcAddress to fail for some reason. Do you have any program that can check if it has OpenGL ES 2.0 or newer?

Edit: it might be that the IntGetProcAddress function for Linux doesn't work for the distribution used, for some reason.

Edit 2: could you try run "nm /usr/lib/libGLES.so | grep -i GetProc" and paste the output? I'm not sure exactly what the GLES .so file is called, so it might not have exactly the name I pasted there. I suspect what might be going wrong is that the GL binding code only supports "glXGetProcAddress" or "dlsym". Neither apparently works.

_mental_
Developer
Developer
Posts: 255
Joined: Sun Aug 07, 2011 13:36

Re: Building GZDOOM without OPENGL

Post by _mental_ » Thu Apr 06, 2017 19:37

glLoadGen doesn't support OpenGL ES as far as I know.

dpJudas
Developer
Developer
Posts: 798
Joined: Sat Jul 23, 2016 7:53

Re: Building GZDOOM without OPENGL

Post by dpJudas » Thu Apr 06, 2017 20:10

It did work on my Linux Mint where I originally coded the OpenGL ES support. I am not sure what SDL uses to initialize OpenGL ES - it might be that the ZDoom Linux backend needs to use SDL_GL_GetProcAddress in order to be sure the lookup is using the same target as SDL is using. For example, if SDL used EGL then it should be using eglGetProcAddress.

dpJudas
Developer
Developer
Posts: 798
Joined: Sat Jul 23, 2016 7:53

Re: Building GZDOOM without OPENGL

Post by dpJudas » Fri Apr 07, 2017 1:49

@vanfanel: could you please try do a pull and try with QZDoom again? I changed the GL loading code to use SDL_GL_GetProcAddress. It is working without problems here on my Linux Mint, but would like to know if it fixes the null pointer issue on the RPI.

Edit: if the RPI supports OpenGL ES 3, then you could also try give the GL renderer a spin as that works on my box as well now. Uniform buffers were not available for 2.0, so I had to bump up the version requirement there.

vanfanel
Posts: 35
Joined: Mon Mar 12, 2012 19:31

Re: Building GZDOOM without OPENGL

Post by vanfanel » Fri Apr 07, 2017 13:59

@dpJudas: Still crashing with the new pull:

Code: Select all

pi@raspberrypi:~/doom $ ./doom
GNU gdb (Raspbian 7.7.1+dfsg-5+rpi1) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "arm-linux-gnueabihf".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./qzdoom...done.
(gdb) set print thread-events off
(gdb) r
Starting program: /home/pi/doom/qzdoom -iwad doomu.wad
Dwarf Error: wrong version in compilation unit header (is -25251, should be 2, 3, or 4) [in module /usr/lib/debug/.build-id/02/4da9b35ba4e86bf23715795948d86728d8a39d.debug]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
Dwarf Error: wrong version in compilation unit header (is -24386, should be 2, 3, or 4) [in module /usr/lib/debug/.build-id/4d/459747ca3ce1a8adf08cdbb41e2c9bd5602990.debug]
Dwarf Error: wrong version in compilation unit header (is 9667, should be 2, 3, or 4) [in module /usr/lib/debug/.build-id/90/57a5b1f2a4bbdcd06303287ce89e4ccf5f1ff7.debug]
warning: File "/usr/lib/arm-linux-gnueabihf/libstdc++.so.6.0.22-gdb.py" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".
To enable execution of this file add
	add-auto-load-safe-path /usr/lib/arm-linux-gnueabihf/libstdc++.so.6.0.22-gdb.py
line to your configuration file "/home/pi/.gdbinit".
To completely disable this security protection add
	set auto-load safe-path /
line to your configuration file "/home/pi/.gdbinit".
For more information about this security protection see the
"Auto-loading safe path" section in the GDB manual.  E.g., run from the shell:
	info "(gdb)Auto-loading safe path"
Dwarf Error: wrong version in compilation unit header (is -27098, should be 2, 3, or 4) [in module /usr/lib/debug/.build-id/e5/f4e3d59b5ec692e4080943a9e5f52715dbe939.debug]
Dwarf Error: wrong version in compilation unit header (is 25537, should be 2, 3, or 4) [in module /usr/lib/debug/.build-id/25/b79f1158416df418745ba9f322d5c68daf18e6.debug]
QZDoom q1.3pre-1651-g51f30a8 - 2017-04-06 23:55:20 -0400 - SDL version
Compiled on Apr  7 2017

M_LoadDefaults: Load system defaults.
Dwarf Error: wrong version in compilation unit header (is 6565, should be 2, 3, or 4) [in module /usr/lib/debug/.build-id/c5/15c3b091677587381f57155ad7ac3707c71dce.debug]
Dwarf Error: wrong version in compilation unit header (is 25481, should be 2, 3, or 4) [in module /usr/lib/debug/.build-id/86/b6212d2d7578042b59581378f58b49f7fdf30f.debug]
Dwarf Error: wrong version in compilation unit header (is 942, should be 2, 3, or 4) [in module /usr/lib/debug/.build-id/2f/54912a1710ee0427b32aee981e5f59459dadf2.debug]
Dwarf Error: wrong version in compilation unit header (is -16159, should be 2, 3, or 4) [in module /usr/lib/debug/.build-id/2c/5368760b1e037fe7746f1a9adc47e4dc70adf8.debug]
W_Init: Init WADfiles.
 adding /home/pi/doom/qzdoom.pk3, 711 lumps
 adding doomu.wad, 2306 lumps
I_Init: Setting up machine state.
I_InitSound: Initializing OpenAL
  Opened device ALSA Default
  EFX enabled
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.
script parsing took 32742.38 ms
R_Init: Init Doom refresh subsystem.
DecalLibrary: Load decals.
M_Init: Init menus.
P_Init: Init Playloop state.
ParseSBarInfo: Loading custom status bar definition.
D_CheckNetGame: Checking network game status.
player 1 of 1 (1 nodes)
Using video driver RPI
OpenGL acceleration requires at least OpenGL ES 2.0. No Acceleration will be used.
Resolution: 640 x 480
OpenGL acceleration requires at least OpenGL ES 2.0. No Acceleration will be used.

Program received signal SIGSEGV, Segmentation fault.
0x73471f0c in ?? ()
(gdb) bt
#0  0x73471f0c in ?? ()
#1  0x76f20624 in GLES2_UpdateTexture () from /usr/lib/libSDL2-2.0.so.0
#2  0x76f20d58 in GLES2_UnlockTexture () from /usr/lib/libSDL2-2.0.so.0
#3  0x00000a00 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb) 

Sadly, the Pi doesn't support GLES3, only up to GLES2...

dpJudas
Developer
Developer
Posts: 798
Joined: Sat Jul 23, 2016 7:53

Re: Building GZDOOM without OPENGL

Post by dpJudas » Fri Apr 07, 2017 14:59

According to the output it doesn't support 2.0 even. :(

The call stack seems to indicate SDL2 crashed when swapping the buffers.

Edit: rumor has it (http://elinux.org/Raspberry_Pi_VideoCore_APIs#OpenGL_ES) that it supports OpenGL ES 2.0. But the driver you are using does not report a version number above or equal 2.0. Not sure what to conclude from that.

vanfanel
Posts: 35
Joined: Mon Mar 12, 2012 19:31

Re: Building GZDOOM without OPENGL

Post by vanfanel » Fri Apr 07, 2017 15:24

@dpJudas: it supports GLES2 for sure. I use the SDL2 GLES2 renderer all the time. Look:

Code: Select all

pi@raspberrypi:~/src/SDL-mirror/test $ ./testgles2 
INFO: Screen bpp: 32
INFO: 
INFO: Vendor     : Broadcom
INFO: Renderer   : VideoCore IV HW
INFO: Version    : OpenGL ES 2.0
INFO: Extensions : GL_OES_compressed_ETC1_RGB8_texture GL_OES_compressed_paletted_texture GL_OES_texture_npot GL_OES_depth24 GL_OES_vertex_half_float GL_OES_EGL_image GL_OES_EGL_image_external GL_EXT_discard_framebuffer GL_OES_rgb8_rgba8 GL_OES_depth32 GL_OES_mapbuffer GL_EXT_texture_format_BGRA8888 GL_APPLE_rgb_422 GL_EXT_debug_marker 
INFO: 
INFO: SDL_GL_RED_SIZE: requested 5, got 5
INFO: SDL_GL_GREEN_SIZE: requested 5, got 6
INFO: SDL_GL_BLUE_SIZE: requested 5, got 5
INFO: SDL_GL_DEPTH_SIZE: requested 16, got 24


dpJudas
Developer
Developer
Posts: 798
Joined: Sat Jul 23, 2016 7:53

Re: Building GZDOOM without OPENGL

Post by dpJudas » Fri Apr 07, 2017 23:22

Hmm, the only way I can explain this is if the rpi driver returns incorrect values for glGetIntegerv(GL_MAJOR_VERSION, &g_major_version) and glGetIntegerv(GL_MINOR_VERSION, &g_minor_version).

I've removed the check as the SDL boot up code requests an ES 2.0 context as minimum anyway. If this doesn't make it work, then I'm afraid it will require some developer with full accelerated drivers on a rpi to figure out what is wrong. Doing further commits like this will not get us much closer to the goal.

Locked

Return to “Technical Support”