[Mesa-dev] [Bug 91106] glx: make check fails to build on osx

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri Jun 26 05:35:34 PDT 2015


https://bugs.freedesktop.org/show_bug.cgi?id=91106

--- Comment #1 from Emil Velikov <emil.l.velikov at gmail.com> ---
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 <j.isorce at samsung.com>
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 <j.isorce at samsung.com>
---
 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)

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150626/679ead48/attachment.html>


More information about the mesa-dev mailing list