Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#2325 closed defect (fixed)

[PATCH] Build failure on Debian kfreebsd

Reported by: Vincent Cheng Owned by: leper
Priority: Nice to Have Milestone: Alpha 16
Component: Build & Packages Keywords: patch
Cc: Philip Taylor Patch:

Description

Alpha 15 introduces a build failure when built on Debian kfreebsd-{amd64,i386}.

Build logs: kfreebsd-amd64 and kfreebsd-i386

HWDetect.cpp
g++ -Iobj/engine_Release -include obj/engine_Release/precompiled.h -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -MMD -MP -DNDEBUG -DCONFIG_FINAL=1 -DLIB_STATIC_LINK -DINSTALLED_BINDIR=/usr/games -DINSTALLED_DATADIR=/usr/share/games/0ad -DINSTALLED_LIBDIR=/usr/lib/games/0ad -DUSING_PCH -DWITH_SYSTEM_MOZJS185 -I../../../source/pch/engine -I../../../source -I/usr/X11R6/include/X11 -I/usr/X11R6/include -I/usr/include/X11 -g -Wall -O3 -Wno-switch -Wno-reorder -Wno-invalid-offsetof -Wextra -Wno-missing-field-initializers -Wunused-parameter -Wredundant-decls -Wnon-virtual-dtor -Wundef -fstack-protector-all -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstrict-aliasing -fno-omit-frame-pointer -fpch-preprocess -msse -fvisibility=hidden `pkg-config mozjs185 --cflags` `sdl-config --cflags` `pkg-config libxml-2.0 --cflags` -MF obj/engine_Release/HWDetect.d -MT "obj/engine_Release/HWDetect.o" -o "obj/engine_Release/HWDetect.o" -c "../../../source/ps/GameSetup/HWDetect.cpp"
../../../source/ps/GameSetup/HWDetect.cpp: In function 'void ReportGLLimits(ScriptInterface&, CScriptValRooted)':
../../../source/ps/GameSetup/HWDetect.cpp:724:53: error: 'pglXQueryCurrentRendererIntegerMESA' was not declared in this scope
   if (strstr(glxexts, "GLX_MESA_query_renderer") && pglXQueryCurrentRendererIntegerMESA && pglXQueryCurrentRendererStringMESA)
                                                     ^
../../../source/ps/GameSetup/HWDetect.cpp:724:92: error: 'pglXQueryCurrentRendererStringMESA' was not declared in this scope
   if (strstr(glxexts, "GLX_MESA_query_renderer") && pglXQueryCurrentRendererIntegerMESA && pglXQueryCurrentRendererStringMESA)
                                                                                            ^
make[3]: *** [obj/engine_Release/HWDetect.o] Error 1
make[2]: *** [engine] Error 2

Change History (5)

comment:1 by Vincent Cheng, 10 years ago

Alpha 15 now builds on kfreebsd, after applying this patch:

--- a/source/lib/external_libraries/glext_funcs.h
+++ b/source/lib/external_libraries/glext_funcs.h
@@ -398,7 +398,7 @@
 #endif // OS_WIN
 
 
-#if OS_LINUX
+#if OS_LINUX || OS_BSD
 // GLX_MESA_query_renderer
 FUNC(int /*Bool*/, glXQueryRendererIntegerMESA, (void /*Display*/ *dpy, int screen, int renderer, int attribute, unsigned int *value))
 FUNC(int /*Bool*/, glXQueryCurrentRendererIntegerMESA, (int attribute, unsigned int *value))

comment:2 by Vincent Cheng, 10 years ago

Keywords: review patch added
Milestone: BacklogAlpha 16
Summary: Build failure on Debian kfreebsd[PATCH] Build failure on Debian kfreebsd

comment:3 by fabio, 10 years ago

Cc: Philip Taylor added

Also discussed on IRC:

17:12 < Philip`> fabio: Oops - that's probably because glext_funcs.h only defines those functions if OS_LINUX, which breaks if you have X11 on non-Linux
17:12 < Philip`> fabio: I guess it should just define those functions unconditionally, because there's no problem defining them on all platforms

comment:4 by leper, 10 years ago

Owner: set to leper
Resolution: fixed
Status: newclosed

In 14432:

Define GLX_MESA_query_renderer functions unconditionally. Fixes #2325.

comment:5 by leper, 10 years ago

Keywords: review removed
Note: See TracTickets for help on using tickets.