<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 - Undefined non-weak-symbol in dri-drivers"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=98428">98428</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Undefined non-weak-symbol in dri-drivers
          </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>Mesa core
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>kwizart@gmail.com
          </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=127532" name="attach_127532" title="Avoid undefined non-weak-symbol for libglapi in dri drivers">attachment 127532</a> <a href="attachment.cgi?id=127532&action=edit" title="Avoid undefined non-weak-symbol for libglapi in dri drivers">[details]</a></span> <a href='page.cgi?id=splinter.html&bug=98428&attachment=127532'>[review]</a>
Avoid undefined non-weak-symbol for libglapi in dri drivers

This issue was initialy reported in:
<a href="https://github.com/NVIDIA/libglvnd/issues/104">https://github.com/NVIDIA/libglvnd/issues/104</a>

There are undefined non-weak-symbol in dri drivers as shown bellow:
---
ldd  -r /usr/lib64/dri/i965_dri.so 
        linux-vdso.so.1 (0x00007ffec66d8000)
        libdrm_intel.so.1 => /lib64/libdrm_intel.so.1 (0x00007fc7edf1f000)
        libdrm_nouveau.so.2 => /lib64/libdrm_nouveau.so.2 (0x00007fc7edd16000)
        libdrm_radeon.so.1 => /lib64/libdrm_radeon.so.1 (0x00007fc7edb0a000)
        libselinux.so.1 => /lib64/libselinux.so.1 (0x00007fc7ed8e3000)
        libdrm.so.2 => /lib64/libdrm.so.2 (0x00007fc7ed6d4000)
        libexpat.so.1 => /lib64/libexpat.so.1 (0x00007fc7ed4a7000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fc7ed28b000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007fc7ed087000)
        libm.so.6 => /lib64/libm.so.6 (0x00007fc7ecd7d000)
        libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007fc7ecb66000)
        libc.so.6 => /lib64/libc.so.6 (0x00007fc7ec7a4000)
        /lib64/ld-linux-x86-64.so.2 (0x0000564f41df9000)
        libpciaccess.so.0 => /lib64/libpciaccess.so.0 (0x00007fc7ec599000)
        libpcre.so.1 => /lib64/libpcre.so.1 (0x00007fc7ec326000)
undefined symbol: _glapi_get_dispatch_table_size       
(/usr/lib64/dri/i965_dri.so)
undefined symbol: _glapi_get_context    (/usr/lib64/dri/i965_dri.so)
undefined symbol: _glapi_add_dispatch   (/usr/lib64/dri/i965_dri.so)
undefined symbol: _glapi_check_multithread      (/usr/lib64/dri/i965_dri.so)
undefined symbol: _glapi_tls_Context    (/usr/lib64/dri/i965_dri.so)
undefined symbol: _glapi_set_context    (/usr/lib64/dri/i965_dri.so)
undefined symbol: _glapi_set_dispatch   (/usr/lib64/dri/i965_dri.so)
undefined symbol: _glapi_tls_Dispatch   (/usr/lib64/dri/i965_dri.so)
---

This doesn't lead to issue (probably) because dri drivers are linked to
libGL.so which is linked to libglapi, so the symbols are resolved at runtime
dynamically.

But with glvnd enabled mesa, the libglvnd's libGL isn't linked to libglapi
anymore (libGLX_mesa is). This lead process like Xorg server to miss the symbol
resolution and fail to load the appropriate DRI driver.

The suggested fix links to a shared libglapi everywhere (not only on ANDROID).</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>