<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - glx: make check fails to build on osx"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=91106#c1">Comment # 1</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - glx: make check fails to build on osx"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=91106">bug 91106</a>
              from <span class="vcard"><a class="email" href="mailto:emil.l.velikov@gmail.com" title="Emil Velikov <emil.l.velikov@gmail.com>"> <span class="fn">Emil Velikov</span></a>
</span></b>
        <pre>Hi Julien, I'm not sure how many people go bugzilla hunting for patches. Here
are some things that stuck out:

>From 2b424445a8c9028e72e2370da8dbdc969bb8717b Mon Sep 17 00:00:00 2001
From: Julien Isorce <<a href="mailto:j.isorce@samsung.com">j.isorce@samsung.com</a>>
Date: Thu, 25 Jun 2015 08:59:27 +0100
Subject: [PATCH] glx: fix unit tests build on osx

It fails because of missing symbols
and some duplicated symbols.

The patch adds missing dependencies in tests/Makefile.am
to fix some missing symbols.
The patch also marks some functions with attribute weak
to fix some duplicated symbols due to redefinitions in
the unit tests.

Signed-off-by: Julien Isorce <<a href="mailto:j.isorce@samsung.com">j.isorce@samsung.com</a>>
---
 src/glx/glxcmds.c         | 10 ++++++++--
 src/glx/glxcurrent.c      |  8 +++++++-
 src/glx/glxextensions.c   |  7 ++++++-
 src/glx/indirect_init.h   |  2 ++
 src/glx/tests/Makefile.am |  9 ++++++++-
 5 files changed, 31 insertions(+), 5 deletions(-)

diff --git a/src/glx/glxcmds.c b/src/glx/glxcmds.c
index 26ff804..f073ecb 100644
--- a/src/glx/glxcmds.c
+++ b/src/glx/glxcmds.c
@@ -55,6 +55,12 @@
 #include <xcb/xcb.h>
 #include <xcb/glx.h>

+#if defined(GLX_USE_APPLEGL)
+#define _ATTRIBUTE_WEAK __attribute__((weak))
+#else
+#define _ATTRIBUTE_WEAK
+#endif
+
(If we end up keeping this) Can we avoid redefining it X times ? Ian (the
original author of these tests) should know the details as to why/how we don't
end up with duplicated/conflicting symbols.


--- a/src/glx/tests/Makefile.am
+++ b/src/glx/tests/Makefile.am
@@ -21,7 +21,6 @@ glx_test_SOURCES =            \
     enum_sizes.cpp            \
     fake_glx_screen.cpp        \
     fake_glx_screen.h        \
-    indirect_api.cpp        \
     mock_xdisplay.h            \
     query_renderer_unittest.cpp

@@ -30,9 +29,17 @@ glx_test_SOURCES += \
     query_renderer_implementation_unittest.cpp
 endif

+if !HAVE_APPLEDRI
+glx_test_SOURCES += indirect_api.cpp
+endif
+
 glx_test_LDADD = \
     $(top_builddir)/src/glx/libglx.la \
     $(top_builddir)/src/gtest/libgtest.la \
+    $(top_builddir)/src/mapi/glapi/libglapi.la \
Which symbols are missing if we omit this ? Noone else seems to need it.

     $(top_builddir)/src/mapi/shared-glapi/libglapi.la \
+    $(SHARED_GLAPI_LIB) \
Unset/empty variable.

+    $(GL_LIB_DEPS) \
Good catch, I think we can now nuke PTHEADS_LIBS below. Perhaps do this as a
separate commit ?

+    $(X11_LIBS) \
Unset/empty variable. Upon closer look one can do a X11_* variable cleanup
though mesa.

     $(PTHREAD_LIBS)
 endif
-- 
1.9.5 (Apple Git-50.3)</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>