Bug 66357 - pipe_loader_sw fails to build without libx11 headers
Summary: pipe_loader_sw fails to build without libx11 headers
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Other (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Francisco Jerez
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-29 09:42 UTC by Martin Jansa
Modified: 2014-09-22 18:26 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
0002-pipe_loader_sw-include-xlib_sw_winsys.h-only-when-HA.patch (2.10 KB, patch)
2013-07-01 19:02 UTC, Martin Jansa
Details | Splinter Review

Description Martin Jansa 2013-06-29 09:42:53 UTC
* HAVE_WINSYS_XLIB was removed in
  commit b3f1f665b0fef178ae193e6b111f14c9a5ad3b25
  Author: Matt Turner <mattst88@gmail.com>
  Date:   Sun Jan 20 15:32:08 2013 -0800
  build: Get rid of GALLIUM_WINSYS_DIRS

* HAVE_PIPE_LOADER_XLIB is set correctly:
  if test "x$NEED_WINSYS_XLIB" = xyes; then
      GALLIUM_PIPE_LOADER_DEFINES="$GALLIUM_PIPE_LOADER_DEFINES -DHAVE_PIPE_LOADER_XLIB"
      GALLIUM_PIPE_LOADER_LIBS="$GALLIUM_PIPE_LOADER_LIBS \$(top_builddir)/src/gallium/winsys/sw/xlib/libws_xlib.la"
  fi

* fixes build of pipe_loader_sw without libx11 headers available


I'll attach fix for this shortly after few more tests.
Comment 1 Martin Jansa 2013-07-01 19:02:17 UTC
Created attachment 81827 [details] [review]
0002-pipe_loader_sw-include-xlib_sw_winsys.h-only-when-HA.patch
Comment 2 Martin Jansa 2013-07-01 19:19:07 UTC
To fix build with xlib enabled:
 #ifdef HAVE_PIPE_LOADER_XLIB
-   x11_sw_create,
+   xlib_create_sw_winsys
 #endif

But HAVE_PIPE_LOADER_XLIB was removed recently:

commit 657cfe62521f05dab744824e9d72e0a753fd9096
Author: Matt Turner <mattst88@gmail.com>
Date:   Mon Apr 22 11:41:26 2013 -0700
configure.ac: Remove unused HAVE_PIPE_LOADER_XLIB macro.

and then
commit 1b6281443d9cf4e85988724bbf8f54ae5d3a92d0
Author: Matt Turner <mattst88@gmail.com>
Date:   Mon Apr 22 14:28:50 2013 -0700
build: Remove libws_xlib.la from GALLIUM_PIPE_LOADER_LIBS.

So maybe the easiest way to resolve this is to remove xlib support from pipe_loader_sw?
Comment 3 Brian Paul 2013-07-03 15:10:31 UTC
Assigning to Matt.

Matt, can you help sort this out?
Comment 4 Matt Turner 2013-07-03 20:48:06 UTC
(In reply to comment #3)
> Assigning to Matt.
> 
> Matt, can you help sort this out?

e1364530 added the 

+#ifdef HAVE_WINSYS_XLIB
+   x11_sw_create,
+#endif

block but was never actually defined HAVE_WINSYS_XLIB. I removed HAVE_PIPE_LOADER_XLIB in 657cfe62 because it was unused (e1364530 added it but never used it).

I didn't know if HAVE_WINSYS_XLIB was supposed to be the same as HAVE_PIPE_LOADER_XLIB and I didn't want to try to figure out if the code that had never actually been turned on actually works. I was just trying to fix a problem for Tom.

Best to ask the author, Francisco.
Comment 5 Emil Velikov 2014-09-22 18:26:28 UTC
I did quite some work on the topic, that should be in mesa 10.3 and master. Do give it a try and reopen if it's not fully resolved.
Thanks


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.