<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Can't include gl and gles headers simultaneously on non-64 bit architectures"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=105328">105328</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Can't include gl and gles headers simultaneously on non-64 bit architectures
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Mesa
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>git
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>mesa-dev@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>iain@orangesquash.org.uk
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>mesa-dev@lists.freedesktop.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=137755" name="attach_137755" title="can you include GLES2/gl2.h and GL/gl.h at the same time?">attachment 137755</a> <a href="attachment.cgi?id=137755&action=edit" title="can you include GLES2/gl2.h and GL/gl.h at the same time?">[details]</a></span>
can you include GLES2/gl2.h and GL/gl.h at the same time?

mesa 1.8 rc4 on Ubuntu Bionic

I was just chatting with gstreamer upstream about a build failure we/they are
seeing, where we can't build gst-plugins-good on arm. Excerpt from
<a href="https://buildd.debian.org/status/fetch.php?pkg=gst-plugins-good1.0&arch=armhf&ver=1.13.1-1&stamp=1519744588&raw=0">https://buildd.debian.org/status/fetch.php?pkg=gst-plugins-good1.0&arch=armhf&ver=1.13.1-1&stamp=1519744588&raw=0</a>:

In file included from
/usr/include/arm-linux-gnueabihf/qt5/QtGui/qopengl.h:105:0,
                 from
/usr/include/arm-linux-gnueabihf/qt5/QtGui/qopenglfunctions.h:54,
                 from
/usr/include/arm-linux-gnueabihf/qt5/QtGui/QOpenGLFunctions:1,
                 from gstqsgtexture.h:30,
                 from gstqsgtexture.cc:31:
/usr/include/GLES3/gl31.h:77:25: error: conflicting declaration 'typedef
khronos_ssize_t GLsizeiptr'
 typedef khronos_ssize_t GLsizeiptr;
                         ^~~~~~~~~~
In file included from /usr/include/GL/gl.h:2055:0,
                 from /usr/include/gstreamer-1.0/gst/gl/gstglfuncs.h:68,
                 from gstqsgtexture.cc:30:
/usr/include/GL/glext.h:468:19: note: previous declaration as 'typedef
ptrdiff_t GLsizeiptr'
 typedef ptrdiff_t GLsizeiptr;
                   ^~~~~~~~~~

The problem is that Qt is built with GLES on arm - it ends up including gl31.h
which can't be included together with glext.h that gstreamer brings in.

However, this *does* work on amd64. I'm attaching a .c file extracted from
gstreamer's build system that tests if you can include <GLES2/gl2.h> and
<GL/gl.h> at the same time. This compiles fine on amd64/arm64/ppc64el for me,
but not i386/armhf.

Is this supposed to work or is it an accident that you can do it on 64 bit?</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the QA Contact for the bug.</li>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>