opengl plugin FTBFS with clang

Bug #1095915 reported by Sam Spilsbury
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Compiz
Fix Released
Medium
Sam Spilsbury
Mesa
Won't Fix
Medium
compiz (Ubuntu)
Fix Released
Medium
Sam Spilsbury

Bug Description

[ 35%] Building CXX object plugins/opengl/CMakeFiles/opengl.dir/src/screen.cpp.o
/home/smspillaz/Source/Compiz/dev/dev/merges/compiz/proposed/experimental/plugins/opengl/src/screen.cpp:856:22: error:
      assigning to 'GLShaderSourceProc' (aka 'void (*)(GLuint, GLsizei, const
      GLchar **, const GLint *)') from incompatible type 'void (GLuint, GLsizei,
      const GLchar *const *, const GLint *)': type mismatch at 3rd parameter
      ('const GLchar **' (aka 'const char **') vs 'const GLchar *const *' (aka
      'const char *const *'))
    GL::shaderSource = glShaderSource;
                     ^ ~~~~~~~~~~~~~~
1 error generated.

Related branches

Changed in compiz:
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → Sam Spilsbury (smspillaz)
milestone: none → 0.9.9.0
Changed in compiz:
status: Confirmed → In Progress
Changed in compiz (Ubuntu):
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Sam Spilsbury (smspillaz)
Revision history for this message
In , Sam Spilsbury (smspillaz) wrote :

glShaderSource is defined in the GLES2 spec as so:

void glShaderSource( GLuint shader,
  GLsizei count,
  const GLchar **string,
  const GLint *length);

However trunk mesa (and 9.1.0) has a definition like this:

GL_APICALL void GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar* const* string, const GLint* length);

The difference being const GLchar **string, vs const GLchar* const* string

That means that if you have a function pointer to glShaderSource using the old definition, and assign the new function to it, it will fail to compile.

(And I know that code using function pointers to core functionality is insane, but it is better than using ifdefs to switch between using function pointers where that functionality is extension-only, and real function declarations where it is core functionality)

Revision history for this message
Sam Spilsbury (smspillaz) wrote :

This is really a bug in mesa. glShaderSource is defined in the spec like so:

void glShaderSource( GLuint shader,
  GLsizei count,
  const GLchar **string,
  const GLint *length);

But in newer versions they've changed it to:

GL_APICALL void GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar* const* string, const GLint* length);

That's incorrect.

Changed in mesa:
importance: Unknown → Medium
status: Unknown → Confirmed
Revision history for this message
In , Idr (idr) wrote :

We just redistribute the official GLES2/gl2.h from Khronos. If anything, I believe the specification is incorrect. Please report upstream at khronos.org.

http://www.khronos.org/registry/gles/api/2.0/gl2.h

Changed in compiz:
status: In Progress → Fix Committed
Revision history for this message
In , Sam Spilsbury (smspillaz) wrote :

Okay, I've filed a bug upstream (https://www.khronos.org/bugzilla/show_bug.cgi?id=761)

Though, I'm wondering why it changed so recently.

Changed in mesa:
status: Confirmed → Won't Fix
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Fix committed into lp:compiz at revision 3540, scheduled for release in Compiz 0.9.9.0

Changed in compiz (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package compiz - 1:0.9.9~daily13.01.14-0ubuntu1

---------------
compiz (1:0.9.9~daily13.01.14-0ubuntu1) raring; urgency=low

  [ sampo555 ]
  * compiz crashed with SIGSEGV in DodgeAnim::applyDodgeTransform() (LP:
    #1048840)
  * compiz crashing if window un-/minimize animation is "Random" (LP:
    #1098185)

  [ Daniel van Vugt ]
  * Several leaks in new GLProgram from compileProgram() from
    GLScreen::getProgram() from GLWindowAutoProgram::getProgram() (LP:
    #1097644)

  [ Sam Spilsbury ]
  * Several leaks in ccsIntegratedSettingListAppend() ... from
    ccsGNOMEIntegrationBackendGetIntegratedSetting() from readSetting
    (gsettings.c:375) (LP: #1097661)

  [ MC Return ]
  * Thumbnail Window Previews: Flickering of background/glow and window
    title text (LP: #1098758)

  [ Automatic PS uploader ]
  * Automatic snapshot from revision 3561
 -- Automatic PS uploader <email address hidden> Mon, 14 Jan 2013 04:03:09 +0000

Changed in compiz (Ubuntu):
status: Fix Committed → Fix Released
Changed in compiz:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.