All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] package/x11r7/xserver_xorg-server: add libdrm-specific cflags
@ 2016-07-25  6:09 Bernd Kuhls
  2016-07-25  6:09 ` [Buildroot] [PATCH 2/2] package/x11r7/xserver_xorg-server: libdrm needs dri2 Bernd Kuhls
  2016-07-25 20:45 ` [Buildroot] [PATCH 1/2] package/x11r7/xserver_xorg-server: add libdrm-specific cflags Thomas Petazzoni
  0 siblings, 2 replies; 4+ messages in thread
From: Bernd Kuhls @ 2016-07-25  6:09 UTC (permalink / raw)
  To: buildroot

As described in
http://lists.busybox.net/pipermail/buildroot/2015-February/119410.html
xserver_xorg-server still uses PKG_CHECK_EXISTS to find libdrm but does
not add libdrm-specific CFLAGS to Makefile causing the build to fail.

Fixes
http://autobuild.buildroot.net/results/3b2/3b2b10314cde2ecacb7fd3949990a4cac2117f4c/

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
 package/x11r7/xserver_xorg-server/xserver_xorg-server.mk | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk b/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk
index 85d7e98..0d14654 100644
--- a/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk
+++ b/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk
@@ -99,6 +99,7 @@ XSERVER_XORG_SERVER_CONF_OPTS += --enable-xorg
 XSERVER_XORG_SERVER_DEPENDENCIES += libpciaccess
 ifeq ($(BR2_PACKAGE_LIBDRM),y)
 XSERVER_XORG_SERVER_DEPENDENCIES += libdrm
+XSERVER_XORG_SERVER_CONF_ENV += LIBDRM_CFLAGS="`$(PKG_CONFIG_HOST_BINARY) --cflags libdrm`"
 XSERVER_XORG_SERVER_CONF_OPTS += --enable-libdrm
 else
 XSERVER_XORG_SERVER_CONF_OPTS += --disable-libdrm
-- 
2.8.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH 2/2] package/x11r7/xserver_xorg-server: libdrm needs dri2
  2016-07-25  6:09 [Buildroot] [PATCH 1/2] package/x11r7/xserver_xorg-server: add libdrm-specific cflags Bernd Kuhls
@ 2016-07-25  6:09 ` Bernd Kuhls
  2016-07-25 20:46   ` Thomas Petazzoni
  2016-07-25 20:45 ` [Buildroot] [PATCH 1/2] package/x11r7/xserver_xorg-server: add libdrm-specific cflags Thomas Petazzoni
  1 sibling, 1 reply; 4+ messages in thread
From: Bernd Kuhls @ 2016-07-25  6:09 UTC (permalink / raw)
  To: buildroot

While fixing
http://autobuild.buildroot.net/results/3b2/3b2b10314cde2ecacb7fd3949990a4cac2117f4c/
the build throws an error in the modesettings driver after libdrm CFLAGS
were fixed by the previous patch:

In file included from dri2.c:43:0:
./../../dri2/dri2.h:36:39: fatal error: X11/extensions/dri2tokens.h: No such file or directory
 #include <X11/extensions/dri2tokens.h>

According to configure.ac the modesettings driver is enabled if libdrm was
found:
https://cgit.freedesktop.org/xorg/xserver/commit/configure.ac?id=bc4b234d6f4b7b211f7a9750a97524e9652d0e6e

This patch adds the necessary dri2 dependency.

Fixes additional build error in
http://autobuild.buildroot.net/results/3b2/3b2b10314cde2ecacb7fd3949990a4cac2117f4c/

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
 package/x11r7/xserver_xorg-server/xserver_xorg-server.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk b/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk
index 0d14654..13f9087 100644
--- a/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk
+++ b/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk
@@ -97,7 +97,7 @@ endif
 ifeq ($(BR2_PACKAGE_XSERVER_XORG_SERVER_MODULAR),y)
 XSERVER_XORG_SERVER_CONF_OPTS += --enable-xorg
 XSERVER_XORG_SERVER_DEPENDENCIES += libpciaccess
-ifeq ($(BR2_PACKAGE_LIBDRM),y)
+ifeq ($(BR2_PACKAGE_LIBDRM)$(BR2_PACKAGE_XPROTO_DRI2PROTO),yy)
 XSERVER_XORG_SERVER_DEPENDENCIES += libdrm
 XSERVER_XORG_SERVER_CONF_ENV += LIBDRM_CFLAGS="`$(PKG_CONFIG_HOST_BINARY) --cflags libdrm`"
 XSERVER_XORG_SERVER_CONF_OPTS += --enable-libdrm
-- 
2.8.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH 1/2] package/x11r7/xserver_xorg-server: add libdrm-specific cflags
  2016-07-25  6:09 [Buildroot] [PATCH 1/2] package/x11r7/xserver_xorg-server: add libdrm-specific cflags Bernd Kuhls
  2016-07-25  6:09 ` [Buildroot] [PATCH 2/2] package/x11r7/xserver_xorg-server: libdrm needs dri2 Bernd Kuhls
@ 2016-07-25 20:45 ` Thomas Petazzoni
  1 sibling, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2016-07-25 20:45 UTC (permalink / raw)
  To: buildroot

Hello,

On Mon, 25 Jul 2016 08:09:15 +0200, Bernd Kuhls wrote:
> As described in
> http://lists.busybox.net/pipermail/buildroot/2015-February/119410.html
> xserver_xorg-server still uses PKG_CHECK_EXISTS to find libdrm but does
> not add libdrm-specific CFLAGS to Makefile causing the build to fail.

I am not convinced because the xserver is using PKG_CHECK_MODULES() to
check for libdrm:

if test "x$DRI" = xyes || test "x$DRI2" = xyes || test "x$DRI3" = xyes || test "x$CONFIG_UDEV_KMS" = xyes; then
        if test "x$DRM" = xyes; then
                AC_DEFINE(WITH_LIBDRM, 1, [Building with libdrm support])
                PKG_CHECK_MODULES([LIBDRM], $LIBDRM)
        fi
fi

and PKG_CHECK_MODULES() does fill in LIBDRM_CFLAGS.

PKG_CHECK_EXISTS() is only used for libdrm:

 * In a Solaris specific case, irrelevant;

 * To define XORG_DRIVER_MODESETTING to yes or no

So I'm not convinced by your explanation for this change.

Essentially, what I believe happens is that PKG_CHECK_MODULES() is only
called when DRI is enabled *or* DRI2 is enabled *or* DRI3 is enabled
*or* UDEV_KMS is enabled. Since none of these conditions are meant in
the configuration of
http://autobuild.buildroot.net/results/3b2/3b2b10314cde2ecacb7fd3949990a4cac2117f4c/,
the build fails.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH 2/2] package/x11r7/xserver_xorg-server: libdrm needs dri2
  2016-07-25  6:09 ` [Buildroot] [PATCH 2/2] package/x11r7/xserver_xorg-server: libdrm needs dri2 Bernd Kuhls
@ 2016-07-25 20:46   ` Thomas Petazzoni
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2016-07-25 20:46 UTC (permalink / raw)
  To: buildroot

Hello,

On Mon, 25 Jul 2016 08:09:16 +0200, Bernd Kuhls wrote:
> While fixing
> http://autobuild.buildroot.net/results/3b2/3b2b10314cde2ecacb7fd3949990a4cac2117f4c/
> the build throws an error in the modesettings driver after libdrm CFLAGS
> were fixed by the previous patch:
> 
> In file included from dri2.c:43:0:
> ./../../dri2/dri2.h:36:39: fatal error: X11/extensions/dri2tokens.h: No such file or directory
>  #include <X11/extensions/dri2tokens.h>
> 
> According to configure.ac the modesettings driver is enabled if libdrm was
> found:
> https://cgit.freedesktop.org/xorg/xserver/commit/configure.ac?id=bc4b234d6f4b7b211f7a9750a97524e9652d0e6e
> 
> This patch adds the necessary dri2 dependency.
> 
> Fixes additional build error in
> http://autobuild.buildroot.net/results/3b2/3b2b10314cde2ecacb7fd3949990a4cac2117f4c/

Could you revisit this in the light of my comments on PATCH 1/2 ?

> +ifeq ($(BR2_PACKAGE_LIBDRM)$(BR2_PACKAGE_XPROTO_DRI2PROTO),yy)

libdrm can be used with DRI or DRI3 as well, according to the
configure.ac script.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-07-25 20:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-25  6:09 [Buildroot] [PATCH 1/2] package/x11r7/xserver_xorg-server: add libdrm-specific cflags Bernd Kuhls
2016-07-25  6:09 ` [Buildroot] [PATCH 2/2] package/x11r7/xserver_xorg-server: libdrm needs dri2 Bernd Kuhls
2016-07-25 20:46   ` Thomas Petazzoni
2016-07-25 20:45 ` [Buildroot] [PATCH 1/2] package/x11r7/xserver_xorg-server: add libdrm-specific cflags Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.