Bug#727198: libopengl-perl: fails to build with Mesa >= 9.2.0

Colin Watson cjwatson at ubuntu.com
Wed Oct 23 10:13:48 UTC 2013


Package: libopengl-perl
Version: 0.6702+dfsg-1
Severity: important
Tags: patch
User: ubuntu-devel at lists.ubuntu.com
Usertags: origin-ubuntu ubuntu-patch trusty

libopengl-perl fails to build with Mesa >= 9.2.0 as follows:

  cc -c  -I/usr/include -I/usr/local/include -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fstack-protector -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2   -DVERSION=\"0.6702\" -DXS_VERSION=\"0.6702\" -fPIC "-I/usr/lib/perl/5.18/CORE"  -DHAVE_VER -DHAVE_GL -DHAVE_GLU -DHAVE_GLUT -DHAVE_GLX -DHAVE_FREEGLUT -DHAVE_FREEGLUT_H -DGL_GLEXT_LEGACY pogl_const.c
  In file included from /usr/lib/perl/5.18/CORE/perl.h:5156:0,
                   from pgopogl.h:22,
                   from pogl_const.xs:18:
  gl_const.h: In function 'neoconstant':
  gl_const.h:2071:4: error: 'GL_PIXEL_TEX_GEN_Q_CEILING_SGIX' undeclared (first use in this function)
    i(GL_PIXEL_TEX_GEN_Q_CEILING_SGIX)
      ^
  /usr/lib/perl/5.18/CORE/embed.h:377:40: note: in definition of macro 'newSViv'
   #define newSViv(a)  Perl_newSViv(aTHX_ a)
                                          ^
  gl_const.h:2071:2: note: in expansion of macro 'i'
    i(GL_PIXEL_TEX_GEN_Q_CEILING_SGIX)
    ^
  gl_const.h:2071:4: note: each undeclared identifier is reported only once for each function it appears in
    i(GL_PIXEL_TEX_GEN_Q_CEILING_SGIX)
      ^
  /usr/lib/perl/5.18/CORE/embed.h:377:40: note: in definition of macro 'newSViv'
   #define newSViv(a)  Perl_newSViv(aTHX_ a)
                                          ^
  gl_const.h:2071:2: note: in expansion of macro 'i'
    i(GL_PIXEL_TEX_GEN_Q_CEILING_SGIX)
    ^
  gl_const.h:2072:4: error: 'GL_PIXEL_TEX_GEN_Q_ROUND_SGIX' undeclared (first use in this function)
    i(GL_PIXEL_TEX_GEN_Q_ROUND_SGIX)
      ^
  /usr/lib/perl/5.18/CORE/embed.h:377:40: note: in definition of macro 'newSViv'
   #define newSViv(a)  Perl_newSViv(aTHX_ a)
                                          ^
  gl_const.h:2072:2: note: in expansion of macro 'i'
    i(GL_PIXEL_TEX_GEN_Q_ROUND_SGIX)
    ^
  gl_const.h:2073:4: error: 'GL_PIXEL_TEX_GEN_Q_FLOOR_SGIX' undeclared (first use in this function)
    i(GL_PIXEL_TEX_GEN_Q_FLOOR_SGIX)
      ^
  /usr/lib/perl/5.18/CORE/embed.h:377:40: note: in definition of macro 'newSViv'
   #define newSViv(a)  Perl_newSViv(aTHX_ a)
                                          ^
  gl_const.h:2073:2: note: in expansion of macro 'i'
    i(GL_PIXEL_TEX_GEN_Q_FLOOR_SGIX)
    ^
  gl_const.h:2074:4: error: 'GL_PIXEL_TEX_GEN_ALPHA_REPLACE_SGIX' undeclared (first use in this function)
    i(GL_PIXEL_TEX_GEN_ALPHA_REPLACE_SGIX)
      ^
  /usr/lib/perl/5.18/CORE/embed.h:377:40: note: in definition of macro 'newSViv'
   #define newSViv(a)  Perl_newSViv(aTHX_ a)
                                          ^
  gl_const.h:2074:2: note: in expansion of macro 'i'
    i(GL_PIXEL_TEX_GEN_ALPHA_REPLACE_SGIX)
    ^
  gl_const.h:2075:4: error: 'GL_PIXEL_TEX_GEN_ALPHA_NO_REPLACE_SGIX' undeclared (first use in this function)
    i(GL_PIXEL_TEX_GEN_ALPHA_NO_REPLACE_SGIX)
      ^
  /usr/lib/perl/5.18/CORE/embed.h:377:40: note: in definition of macro 'newSViv'
   #define newSViv(a)  Perl_newSViv(aTHX_ a)
                                          ^
  gl_const.h:2075:2: note: in expansion of macro 'i'
    i(GL_PIXEL_TEX_GEN_ALPHA_NO_REPLACE_SGIX)
    ^
  gl_const.h:2076:4: error: 'GL_PIXEL_TEX_GEN_ALPHA_LS_SGIX' undeclared (first use in this function)
    i(GL_PIXEL_TEX_GEN_ALPHA_LS_SGIX)
      ^
  /usr/lib/perl/5.18/CORE/embed.h:377:40: note: in definition of macro 'newSViv'
   #define newSViv(a)  Perl_newSViv(aTHX_ a)
                                          ^
  gl_const.h:2076:2: note: in expansion of macro 'i'
    i(GL_PIXEL_TEX_GEN_ALPHA_LS_SGIX)
    ^
  gl_const.h:2077:4: error: 'GL_PIXEL_TEX_GEN_ALPHA_MS_SGIX' undeclared (first use in this function)
    i(GL_PIXEL_TEX_GEN_ALPHA_MS_SGIX)
      ^
  /usr/lib/perl/5.18/CORE/embed.h:377:40: note: in definition of macro 'newSViv'
   #define newSViv(a)  Perl_newSViv(aTHX_ a)
                                          ^
  gl_const.h:2077:2: note: in expansion of macro 'i'
    i(GL_PIXEL_TEX_GEN_ALPHA_MS_SGIX)
    ^
  gl_const.h:2164:4: error: 'GL_FOG_SCALE_SGIX' undeclared (first use in this function)
    i(GL_FOG_SCALE_SGIX)
      ^
  /usr/lib/perl/5.18/CORE/embed.h:377:40: note: in definition of macro 'newSViv'
   #define newSViv(a)  Perl_newSViv(aTHX_ a)
                                          ^
  gl_const.h:2164:2: note: in expansion of macro 'i'
    i(GL_FOG_SCALE_SGIX)
    ^
  gl_const.h:2165:4: error: 'GL_FOG_SCALE_VALUE_SGIX' undeclared (first use in this function)
    i(GL_FOG_SCALE_VALUE_SGIX)
      ^
  /usr/lib/perl/5.18/CORE/embed.h:377:40: note: in definition of macro 'newSViv'
   #define newSViv(a)  Perl_newSViv(aTHX_ a)
                                          ^
  gl_const.h:2165:2: note: in expansion of macro 'i'
    i(GL_FOG_SCALE_VALUE_SGIX)
    ^
  gl_const.h:2336:4: error: 'GL_DEPTH_PASS_INSTRUMENT_SGIX' undeclared (first use in this function)
    i(GL_DEPTH_PASS_INSTRUMENT_SGIX)
      ^
  /usr/lib/perl/5.18/CORE/embed.h:377:40: note: in definition of macro 'newSViv'
   #define newSViv(a)  Perl_newSViv(aTHX_ a)
                                          ^
  gl_const.h:2336:2: note: in expansion of macro 'i'
    i(GL_DEPTH_PASS_INSTRUMENT_SGIX)
    ^
  gl_const.h:2337:4: error: 'GL_DEPTH_PASS_INSTRUMENT_COUNTERS_SGIX' undeclared (first use in this function)
    i(GL_DEPTH_PASS_INSTRUMENT_COUNTERS_SGIX)
      ^
  /usr/lib/perl/5.18/CORE/embed.h:377:40: note: in definition of macro 'newSViv'
   #define newSViv(a)  Perl_newSViv(aTHX_ a)
                                          ^
  gl_const.h:2337:2: note: in expansion of macro 'i'
    i(GL_DEPTH_PASS_INSTRUMENT_COUNTERS_SGIX)
    ^
  gl_const.h:2338:4: error: 'GL_DEPTH_PASS_INSTRUMENT_MAX_SGIX' undeclared (first use in this function)
    i(GL_DEPTH_PASS_INSTRUMENT_MAX_SGIX)
      ^
  /usr/lib/perl/5.18/CORE/embed.h:377:40: note: in definition of macro 'newSViv'
   #define newSViv(a)  Perl_newSViv(aTHX_ a)
                                          ^
  gl_const.h:2338:2: note: in expansion of macro 'i'
    i(GL_DEPTH_PASS_INSTRUMENT_MAX_SGIX)
    ^
  make[1]: *** [pogl_const.o] Error 1

Here's a patch, which I've also sent upstream as per the Forwarded patch
header.

  * Tolerate absence of several extensions removed in Mesa 9.2.0.

diff -Nru libopengl-perl-0.6702+dfsg/debian/patches/removed_gl_extensions libopengl-perl-0.6702+dfsg/debian/patches/removed_gl_extensions
--- libopengl-perl-0.6702+dfsg/debian/patches/removed_gl_extensions	1970-01-01 01:00:00.000000000 +0100
+++ libopengl-perl-0.6702+dfsg/debian/patches/removed_gl_extensions	2013-10-23 11:11:31.000000000 +0100
@@ -0,0 +1,60 @@
+Description: Tolerate absence of several extensions removed in Mesa 9.2.0
+ See: http://cgit.freedesktop.org/mesa/mesa/commit/?h=9a14e41
+Author: Colin Watson <cjwatson at ubuntu.com>
+Forwarded: https://sourceforge.net/p/pogl/code/merge-requests/1/
+Last-Update: 2013-10-23
+
+Index: b/gl_const.h
+===================================================================
+--- a/gl_const.h
++++ b/gl_const.h
+@@ -1921,8 +1921,10 @@
+ 	i(GL_FRAMEZOOM_SGIX)
+ 	i(GL_FRAMEZOOM_FACTOR_SGIX)
+ 	i(GL_MAX_FRAMEZOOM_FACTOR_SGIX)
++#if defined(GL_FfdMaskSGIX)
+ 	i(GL_TEXTURE_DEFORMATION_BIT_SGIX)
+ 	i(GL_GEOMETRY_DEFORMATION_BIT_SGIX)
++#endif
+ 	i(GL_GEOMETRY_DEFORMATION_SGIX)
+ 	i(GL_TEXTURE_DEFORMATION_SGIX)
+ 	i(GL_DEFORMATIONS_MASK_SGIX)
+@@ -2068,6 +2070,7 @@
+ 	i(GL_TEXTURE_MATERIAL_PARAMETER_EXT)
+ 	i(GL_ALPHA_MIN_SGIX)
+ 	i(GL_ALPHA_MAX_SGIX)
++#if defined(GL_SGIX_impact_pixel_texture)
+ 	i(GL_PIXEL_TEX_GEN_Q_CEILING_SGIX)
+ 	i(GL_PIXEL_TEX_GEN_Q_ROUND_SGIX)
+ 	i(GL_PIXEL_TEX_GEN_Q_FLOOR_SGIX)
+@@ -2075,6 +2078,7 @@
+ 	i(GL_PIXEL_TEX_GEN_ALPHA_NO_REPLACE_SGIX)
+ 	i(GL_PIXEL_TEX_GEN_ALPHA_LS_SGIX)
+ 	i(GL_PIXEL_TEX_GEN_ALPHA_MS_SGIX)
++#endif
+ 	i(GL_BGR_EXT)
+ 	i(GL_BGRA_EXT)
+ 	i(GL_ASYNC_MARKER_SGIX)
+@@ -2161,8 +2165,10 @@
+ 	i(GL_OPERAND2_ALPHA_EXT)
+ 	i(GL_LIGHT_MODEL_SPECULAR_VECTOR_APPLE)
+ 	i(GL_TRANSFORM_HINT_APPLE)
++#if defined(GL_SGIX_fog_scale)
+ 	i(GL_FOG_SCALE_SGIX)
+ 	i(GL_FOG_SCALE_VALUE_SGIX)
++#endif
+ 	i(GL_UNPACK_CONSTANT_DATA_SUNX)
+ 	i(GL_TEXTURE_CONSTANT_DATA_SUNX)
+ 	i(GL_GLOBAL_ALPHA_SUN)
+@@ -2333,9 +2339,11 @@
+ 	i(GL_PIXEL_SUBSAMPLE_4242_SGIX)
+ 	i(GL_YCRCB_SGIX)
+ 	i(GL_YCRCBA_SGIX)
++#if defined(GL_SGI_depth_pass_instrument)
+ 	i(GL_DEPTH_PASS_INSTRUMENT_SGIX)
+ 	i(GL_DEPTH_PASS_INSTRUMENT_COUNTERS_SGIX)
+ 	i(GL_DEPTH_PASS_INSTRUMENT_MAX_SGIX)
++#endif
+ 	i(GL_COMPRESSED_RGB_FXT1_3DFX)
+ 	i(GL_COMPRESSED_RGBA_FXT1_3DFX)
+ 	i(GL_MULTISAMPLE_3DFX)
diff -Nru libopengl-perl-0.6702+dfsg/debian/patches/series libopengl-perl-0.6702+dfsg/debian/patches/series
--- libopengl-perl-0.6702+dfsg/debian/patches/series	2013-09-08 19:28:47.000000000 +0100
+++ libopengl-perl-0.6702+dfsg/debian/patches/series	2013-10-23 10:00:21.000000000 +0100
@@ -4,3 +4,4 @@
 glext_procs-replacement
 use-systems-gl
 dont_link_against_unused_libs
+removed_gl_extensions

Thanks,

-- 
Colin Watson                                       [cjwatson at ubuntu.com]



More information about the pkg-perl-maintainers mailing list