[01/12] virglrenderer: add a recipe

Submitted by Alexander Kanavin on Feb. 8, 2019, 2:45 p.m. | Patch ID: 158606

Details

Message ID c6c6c5555d11044b88591d5e760d26352d84c65b.1549637121.git.alex.kanavin@gmail.com
State Superseded
Headers show

Commit Message

Alexander Kanavin Feb. 8, 2019, 2:45 p.m.
This component enables hardware-accelerated GL inside QEMU guests.
For more information, see here:

https://lwn.net/Articles/767970/
https://www.collabora.com/news-and-blog/blog/2018/02/12/virtualizing-gpu-access/
https://www.collabora.com/news-and-blog/blog/2018/05/09/gpu-virtualization-update/

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
 meta/conf/distro/include/maintainers.inc      |  1 +
 .../0001-vtest-add-missing-includes.patch     | 38 +++++++++++++++++++
 .../virglrenderer/virglrenderer_git.bb        | 19 ++++++++++
 3 files changed, 58 insertions(+)
 create mode 100644 meta/recipes-graphics/virglrenderer/virglrenderer/0001-vtest-add-missing-includes.patch
 create mode 100644 meta/recipes-graphics/virglrenderer/virglrenderer_git.bb

Patch hide | download patch | download mbox

diff --git a/meta/conf/distro/include/maintainers.inc b/meta/conf/distro/include/maintainers.inc
index 122fdbcff4b..f7d43d20b7f 100644
--- a/meta/conf/distro/include/maintainers.inc
+++ b/meta/conf/distro/include/maintainers.inc
@@ -700,6 +700,7 @@  RECIPE_MAINTAINER_pn-util-macros = "Armin Kuster <akuster808@gmail.com>"
 RECIPE_MAINTAINER_pn-v86d = "Alexander Kanavin <alex.kanavin@gmail.com>"
 RECIPE_MAINTAINER_pn-vala = "Alexander Kanavin <alex.kanavin@gmail.com>"
 RECIPE_MAINTAINER_pn-valgrind = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-virglrenderer = "Alexander Kanavin <alex.kanavin@gmail.com>"
 RECIPE_MAINTAINER_pn-volatile-binds = "Chen Qi <Qi.Chen@windriver.com>"
 RECIPE_MAINTAINER_pn-vte = "Anuj Mittal <anuj.mittal@intel.com>"
 RECIPE_MAINTAINER_pn-vulkan = "Ross Burton <ross.burton@intel.com>"
diff --git a/meta/recipes-graphics/virglrenderer/virglrenderer/0001-vtest-add-missing-includes.patch b/meta/recipes-graphics/virglrenderer/virglrenderer/0001-vtest-add-missing-includes.patch
new file mode 100644
index 00000000000..b565c48ee66
--- /dev/null
+++ b/meta/recipes-graphics/virglrenderer/virglrenderer/0001-vtest-add-missing-includes.patch
@@ -0,0 +1,38 @@ 
+From 05c5c5f43fbffb3317bd9da27d414890d2ef493c Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Fri, 18 Jan 2019 13:47:23 +0100
+Subject: [PATCH] vtest: add missing includes
+
+This fixes build failures with musl C library
+
+Upstream-Status: Submitted [https://gitlab.freedesktop.org/virgl/virglrenderer/merge_requests/125]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ vtest/util.c         | 1 +
+ vtest/vtest_server.c | 1 +
+ 2 files changed, 2 insertions(+)
+
+diff --git a/vtest/util.c b/vtest/util.c
+index 0d3c78f..c605253 100644
+--- a/vtest/util.c
++++ b/vtest/util.c
+@@ -26,6 +26,7 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <unistd.h>
++#include <sys/select.h>
+ 
+ int vtest_wait_for_fd_read(int fd)
+ {
+diff --git a/vtest/vtest_server.c b/vtest/vtest_server.c
+index bc6c95f..010721f 100644
+--- a/vtest/vtest_server.c
++++ b/vtest/vtest_server.c
+@@ -31,6 +31,7 @@
+ #include <netinet/in.h>
+ #include <sys/un.h>
+ #include <fcntl.h>
++#include <string.h>
+ 
+ #include "util.h"
+ #include "vtest.h"
diff --git a/meta/recipes-graphics/virglrenderer/virglrenderer_git.bb b/meta/recipes-graphics/virglrenderer/virglrenderer_git.bb
new file mode 100644
index 00000000000..93fc35feb8d
--- /dev/null
+++ b/meta/recipes-graphics/virglrenderer/virglrenderer_git.bb
@@ -0,0 +1,19 @@ 
+SUMMARY = "VirGL virtual OpenGL renderer"
+HOMEPAGE = "https://virgil3d.github.io/"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=c81c08eeefd9418fca8f88309a76db10"
+
+DEPENDS = "libdrm mesa libepoxy"
+PV = "0.7.0"
+SRCREV = "402c228861c9893f64cffbbcb4cb23044b8c721c"
+SRC_URI = "git://anongit.freedesktop.org/virglrenderer \
+           file://0001-vtest-add-missing-includes.patch \
+           "
+
+S = "${WORKDIR}/git"
+
+inherit autotools pkgconfig
+
+BBCLASSEXTEND = "native nativesdk"
+

Comments

Martin Jansa Feb. 9, 2019, 9:44 a.m.
On Fri, Feb 08, 2019 at 03:45:42PM +0100, Alexander Kanavin wrote:
> This component enables hardware-accelerated GL inside QEMU guests.
> For more information, see here:
> 
> https://lwn.net/Articles/767970/
> https://www.collabora.com/news-and-blog/blog/2018/02/12/virtualizing-gpu-access/
> https://www.collabora.com/news-and-blog/blog/2018/05/09/gpu-virtualization-update/
> 
> Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
> ---
>  meta/conf/distro/include/maintainers.inc      |  1 +
>  .../0001-vtest-add-missing-includes.patch     | 38 +++++++++++++++++++
>  .../virglrenderer/virglrenderer_git.bb        | 19 ++++++++++
>  3 files changed, 58 insertions(+)
>  create mode 100644 meta/recipes-graphics/virglrenderer/virglrenderer/0001-vtest-add-missing-includes.patch
>  create mode 100644 meta/recipes-graphics/virglrenderer/virglrenderer_git.bb
> 
> diff --git a/meta/conf/distro/include/maintainers.inc b/meta/conf/distro/include/maintainers.inc
> index 122fdbcff4b..f7d43d20b7f 100644
> --- a/meta/conf/distro/include/maintainers.inc
> +++ b/meta/conf/distro/include/maintainers.inc
> @@ -700,6 +700,7 @@ RECIPE_MAINTAINER_pn-util-macros = "Armin Kuster <akuster808@gmail.com>"
>  RECIPE_MAINTAINER_pn-v86d = "Alexander Kanavin <alex.kanavin@gmail.com>"
>  RECIPE_MAINTAINER_pn-vala = "Alexander Kanavin <alex.kanavin@gmail.com>"
>  RECIPE_MAINTAINER_pn-valgrind = "Alexander Kanavin <alex.kanavin@gmail.com>"
> +RECIPE_MAINTAINER_pn-virglrenderer = "Alexander Kanavin <alex.kanavin@gmail.com>"
>  RECIPE_MAINTAINER_pn-volatile-binds = "Chen Qi <Qi.Chen@windriver.com>"
>  RECIPE_MAINTAINER_pn-vte = "Anuj Mittal <anuj.mittal@intel.com>"
>  RECIPE_MAINTAINER_pn-vulkan = "Ross Burton <ross.burton@intel.com>"
> diff --git a/meta/recipes-graphics/virglrenderer/virglrenderer/0001-vtest-add-missing-includes.patch b/meta/recipes-graphics/virglrenderer/virglrenderer/0001-vtest-add-missing-includes.patch
> new file mode 100644
> index 00000000000..b565c48ee66
> --- /dev/null
> +++ b/meta/recipes-graphics/virglrenderer/virglrenderer/0001-vtest-add-missing-includes.patch
> @@ -0,0 +1,38 @@
> +From 05c5c5f43fbffb3317bd9da27d414890d2ef493c Mon Sep 17 00:00:00 2001
> +From: Alexander Kanavin <alex.kanavin@gmail.com>
> +Date: Fri, 18 Jan 2019 13:47:23 +0100
> +Subject: [PATCH] vtest: add missing includes
> +
> +This fixes build failures with musl C library
> +
> +Upstream-Status: Submitted [https://gitlab.freedesktop.org/virgl/virglrenderer/merge_requests/125]
> +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
> +---
> + vtest/util.c         | 1 +
> + vtest/vtest_server.c | 1 +
> + 2 files changed, 2 insertions(+)
> +
> +diff --git a/vtest/util.c b/vtest/util.c
> +index 0d3c78f..c605253 100644
> +--- a/vtest/util.c
> ++++ b/vtest/util.c
> +@@ -26,6 +26,7 @@
> + #include <stdio.h>
> + #include <string.h>
> + #include <unistd.h>
> ++#include <sys/select.h>
> + 
> + int vtest_wait_for_fd_read(int fd)
> + {
> +diff --git a/vtest/vtest_server.c b/vtest/vtest_server.c
> +index bc6c95f..010721f 100644
> +--- a/vtest/vtest_server.c
> ++++ b/vtest/vtest_server.c
> +@@ -31,6 +31,7 @@
> + #include <netinet/in.h>
> + #include <sys/un.h>
> + #include <fcntl.h>
> ++#include <string.h>
> + 
> + #include "util.h"
> + #include "vtest.h"
> diff --git a/meta/recipes-graphics/virglrenderer/virglrenderer_git.bb b/meta/recipes-graphics/virglrenderer/virglrenderer_git.bb
> new file mode 100644
> index 00000000000..93fc35feb8d
> --- /dev/null
> +++ b/meta/recipes-graphics/virglrenderer/virglrenderer_git.bb
> @@ -0,0 +1,19 @@
> +SUMMARY = "VirGL virtual OpenGL renderer"
> +HOMEPAGE = "https://virgil3d.github.io/"
> +
> +LICENSE = "MIT"
> +LIC_FILES_CHKSUM = "file://COPYING;md5=c81c08eeefd9418fca8f88309a76db10"
> +
> +DEPENDS = "libdrm mesa libepoxy"

Does it need to depend on mesa directly instead of one of virtual/*
providers?

It fails to build for targets which use different mesa, e.g. mesa-gl:

ERROR: Nothing PROVIDES 'mesa' (but /OE/build/luneos-master/webos-ports/openembedded-core/meta/recipes-graphics/virglrenderer/virglrenderer_git.bb DEPENDS on or otherwise requires it)
mesa was skipped: PREFERRED_PROVIDER_virtual/libgl set to mesa-gl, not mesa
ERROR: Required build target 'virglrenderer' has no buildable providers.
Missing or unbuildable dependency chain was: ['virglrenderer', 'mesa']

Regards,

> +PV = "0.7.0"
> +SRCREV = "402c228861c9893f64cffbbcb4cb23044b8c721c"
> +SRC_URI = "git://anongit.freedesktop.org/virglrenderer \
> +           file://0001-vtest-add-missing-includes.patch \
> +           "
> +
> +S = "${WORKDIR}/git"
> +
> +inherit autotools pkgconfig
> +
> +BBCLASSEXTEND = "native nativesdk"
> +
> -- 
> 2.17.1
> 
> -- 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
Alexander Kanavin Feb. 9, 2019, 10:06 a.m.
On Sat, 9 Feb 2019 at 10:44, Martin Jansa <martin.jansa@gmail.com> wrote:
> Does it need to depend on mesa directly instead of one of virtual/*
> providers?
>
> It fails to build for targets which use different mesa, e.g. mesa-gl:
>
> ERROR: Nothing PROVIDES 'mesa' (but /OE/build/luneos-master/webos-ports/openembedded-core/meta/recipes-graphics/virglrenderer/virglrenderer_git.bb DEPENDS on or otherwise requires it)
> mesa was skipped: PREFERRED_PROVIDER_virtual/libgl set to mesa-gl, not mesa
> ERROR: Required build target 'virglrenderer' has no buildable providers.
> Missing or unbuildable dependency chain was: ['virglrenderer', 'mesa']

Yes, mesa-gl isn't going to work. Virgl needs the following bits (set
in mesa recipe):
PACKAGECONFIG_class-native ?= "gbm dri-native egl"

dri-native is same as dri, but without drivers to save build time.

Alex
Martin Jansa Feb. 9, 2019, 1:19 p.m.
On Sat, Feb 09, 2019 at 11:06:47AM +0100, Alexander Kanavin wrote:
> On Sat, 9 Feb 2019 at 10:44, Martin Jansa <martin.jansa@gmail.com> wrote:
> > Does it need to depend on mesa directly instead of one of virtual/*
> > providers?
> >
> > It fails to build for targets which use different mesa, e.g. mesa-gl:
> >
> > ERROR: Nothing PROVIDES 'mesa' (but /OE/build/luneos-master/webos-ports/openembedded-core/meta/recipes-graphics/virglrenderer/virglrenderer_git.bb DEPENDS on or otherwise requires it)
> > mesa was skipped: PREFERRED_PROVIDER_virtual/libgl set to mesa-gl, not mesa
> > ERROR: Required build target 'virglrenderer' has no buildable providers.
> > Missing or unbuildable dependency chain was: ['virglrenderer', 'mesa']
> 
> Yes, mesa-gl isn't going to work. Virgl needs the following bits (set
> in mesa recipe):
> PACKAGECONFIG_class-native ?= "gbm dri-native egl"
> 
> dri-native is same as dri, but without drivers to save build time.

OK, then with mesa used in qemux86* it still fails with:

| Making all in vtest
| make[2]: Entering directory '/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0/build/vtest'
| i586-webos-linux-gcc  -m32 -march=i586 --sysroot=/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0/recipe-sysroot -DHAVE_CONFIG_H -I. -I../../git/vtest -I..    -I../../git/src/gallium/drivers/virgl -I../../git/src/gallium/include -I../../git/src/gallium/auxiliary -I../../git/src/gallium/drivers -I../../git/include -I../../git/src   -I/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0/recipe-sysroot/usr/include/libdrm -DMESA_EGL_NO_X11_HEADERS   -O -fno-omit-frame-pointer -g -feliminate-unused-debug-types -fdebug-prefix-map=/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0=/usr/src/debug/virglrenderer/0.7.0-r0                      -fdebug-prefix-map=/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0/recipe-sysroot=                      -fdebug-prefix-map=/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0/recipe-sysroot-native=  -pipe -Wall -Wextra -Werror=implicit-function-declaration -Werror=missing-prototypes -Wmissing-prototypes -Werror=int-to-pointer-cast -c -o util.o ../../git/vtest/util.c
| i586-webos-linux-gcc  -m32 -march=i586 --sysroot=/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0/recipe-sysroot -DHAVE_CONFIG_H -I. -I../../git/vtest -I..    -I../../git/src/gallium/drivers/virgl -I../../git/src/gallium/include -I../../git/src/gallium/auxiliary -I../../git/src/gallium/drivers -I../../git/include -I../../git/src   -I/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0/recipe-sysroot/usr/include/libdrm -DMESA_EGL_NO_X11_HEADERS   -O -fno-omit-frame-pointer -g -feliminate-unused-debug-types -fdebug-prefix-map=/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0=/usr/src/debug/virglrenderer/0.7.0-r0                      -fdebug-prefix-map=/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0/recipe-sysroot=                      -fdebug-prefix-map=/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0/recipe-sysroot-native=  -pipe -Wall -Wextra -Werror=implicit-function-declaration -Werror=missing-prototypes -Wmissing-prototypes -Werror=int-to-pointer-cast -c -o vtest_server.o ../../git/vtest/vtest_server.c
| i586-webos-linux-gcc  -m32 -march=i586 --sysroot=/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0/recipe-sysroot -DHAVE_CONFIG_H -I. -I../../git/vtest -I..    -I../../git/src/gallium/drivers/virgl -I../../git/src/gallium/include -I../../git/src/gallium/auxiliary -I../../git/src/gallium/drivers -I../../git/include -I../../git/src   -I/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0/recipe-sysroot/usr/include/libdrm -DMESA_EGL_NO_X11_HEADERS   -O -fno-omit-frame-pointer -g -feliminate-unused-debug-types -fdebug-prefix-map=/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0=/usr/src/debug/virglrenderer/0.7.0-r0                      -fdebug-prefix-map=/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0/recipe-sysroot=                      -fdebug-prefix-map=/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0/recipe-sysroot-native=  -pipe -Wall -Wextra -Werror=implicit-function-declaration -Werror=missing-prototypes -Wmissing-prototypes -Werror=int-to-pointer-cast -c -o vtest_renderer.o ../../git/vtest/vtest_renderer.c
| ../i586-webos-linux-libtool  --tag=CC   --mode=link i586-webos-linux-gcc  -m32 -march=i586 --sysroot=/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0/recipe-sysroot -I../../git/src/gallium/drivers/virgl -I../../git/src/gallium/include -I../../git/src/gallium/auxiliary -I../../git/src/gallium/drivers -I../../git/include -I../../git/src   -I/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0/recipe-sysroot/usr/include/libdrm -DMESA_EGL_NO_X11_HEADERS   -O -fno-omit-frame-pointer -g -feliminate-unused-debug-types -fdebug-prefix-map=/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0=/usr/src/debug/virglrenderer/0.7.0-r0                      -fdebug-prefix-map=/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0/recipe-sysroot=                      -fdebug-prefix-map=/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0/recipe-sysroot-native=  -pipe -Wall -Wextra -Werror=implicit-function-declaration -Werror=missing-prototypes -Wmissing-prototypes -Werror=int-to-pointer-cast  -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -o virgl_test_server util.o vtest_server.o vtest_renderer.o ../src/libvirglrenderer.la
| i586-webos-linux-libtool: link: i586-webos-linux-gcc -m32 -march=i586 --sysroot=/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0/recipe-sysroot -I../../git/src/gallium/drivers/virgl -I../../git/src/gallium/include -I../../git/src/gallium/auxiliary -I../../git/src/gallium/drivers -I../../git/include -I../../git/src -I/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0/recipe-sysroot/usr/include/libdrm -DMESA_EGL_NO_X11_HEADERS -O -fno-omit-frame-pointer -g -feliminate-unused-debug-types -fdebug-prefix-map=/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0=/usr/src/debug/virglrenderer/0.7.0-r0 -fdebug-prefix-map=/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0/recipe-sysroot= -fdebug-prefix-map=/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0/recipe-sysroot-native= -pipe -Wall -Wextra -Werror=implicit-function-declaration -Werror=missing-prototypes -Wmissing-prototypes -Werror=int-to-pointer-cast -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -o .libs/virgl_test_server util.o vtest_server.o vtest_renderer.o  ../src/.libs/libvirglrenderer.so -lm -lgbm -lepoxy -pthread
| ../src/.libs/libvirglrenderer.so: error: undefined reference to 'drmPrimeHandleToFD'
| collect2: error: ld returned 1 exit status
| Makefile:429: recipe for target 'virgl_test_server' failed
| make[2]: *** [virgl_test_server] Error 1
| make[2]: Leaving directory '/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0/build/vtest'
| Makefile:510: recipe for target 'all-recursive' failed
| make[1]: *** [all-recursive] Error 1
| make[1]: Leaving directory '/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0/build'
| Makefile:419: recipe for target 'all' failed
| make: *** [all] Error 2
| ERROR: oe_runmake failed

The fix from
http://git.openembedded.org/openembedded-core-contrib/commit/?h=jansa/qemu&id=c29d4ccfe0a5f53c49883e55c2c2bb444997b1cf
is still applicable and fixes this.
Alexander Kanavin Feb. 9, 2019, 4:43 p.m.
On Sat, 9 Feb 2019 at 14:19, Martin Jansa <martin.jansa@gmail.com> wrote:
> The fix from
> http://git.openembedded.org/openembedded-core-contrib/commit/?h=jansa/qemu&id=c29d4ccfe0a5f53c49883e55c2c2bb444997b1cf
> is still applicable and fixes this.

Somehow the issue does not show up in plain poky, but the fix seems
right. Can you send it upstream via
https://gitlab.freedesktop.org/virgl/virglrenderer/merge_requests
please?

Alex
Martin Jansa Feb. 9, 2019, 5:09 p.m.
It was sent to upstream (somewhere) by the original author, I haven't found
it on gitlab, so I've asked original author in:
https://bugs.gentoo.org/571124#c5

Plain poky probably doesn't use gold, that's why you're not seeing it there.

On Sat, Feb 9, 2019 at 5:43 PM Alexander Kanavin <alex.kanavin@gmail.com>
wrote:

> On Sat, 9 Feb 2019 at 14:19, Martin Jansa <martin.jansa@gmail.com> wrote:
> > The fix from
> >
> http://git.openembedded.org/openembedded-core-contrib/commit/?h=jansa/qemu&id=c29d4ccfe0a5f53c49883e55c2c2bb444997b1cf
> > is still applicable and fixes this.
>
> Somehow the issue does not show up in plain poky, but the fix seems
> right. Can you send it upstream via
> https://gitlab.freedesktop.org/virgl/virglrenderer/merge_requests
> please?
>
> Alex
>
Alexander Kanavin Feb. 9, 2019, 5:16 p.m.
On Sat, 9 Feb 2019 at 18:10, Martin Jansa <martin.jansa@gmail.com> wrote:
>
> It was sent to upstream (somewhere) by the original author, I haven't found it on gitlab, so I've asked original author in:
> https://bugs.gentoo.org/571124#c5

Maybe a new merge request is the quickest way to sort this. The patch
was probably sent to the virgl mailing list or privately to airlied
years ago and fell through.

Alex
Khem Raj Feb. 9, 2019, 5:23 p.m.
dump ld.bfd generated .so and see if this symbol is present

On Sat, Feb 9, 2019 at 5:20 AM Martin Jansa <martin.jansa@gmail.com> wrote:
>
> On Sat, Feb 09, 2019 at 11:06:47AM +0100, Alexander Kanavin wrote:
> > On Sat, 9 Feb 2019 at 10:44, Martin Jansa <martin.jansa@gmail.com> wrote:
> > > Does it need to depend on mesa directly instead of one of virtual/*
> > > providers?
> > >
> > > It fails to build for targets which use different mesa, e.g. mesa-gl:
> > >
> > > ERROR: Nothing PROVIDES 'mesa' (but /OE/build/luneos-master/webos-ports/openembedded-core/meta/recipes-graphics/virglrenderer/virglrenderer_git.bb DEPENDS on or otherwise requires it)
> > > mesa was skipped: PREFERRED_PROVIDER_virtual/libgl set to mesa-gl, not mesa
> > > ERROR: Required build target 'virglrenderer' has no buildable providers.
> > > Missing or unbuildable dependency chain was: ['virglrenderer', 'mesa']
> >
> > Yes, mesa-gl isn't going to work. Virgl needs the following bits (set
> > in mesa recipe):
> > PACKAGECONFIG_class-native ?= "gbm dri-native egl"
> >
> > dri-native is same as dri, but without drivers to save build time.
>
> OK, then with mesa used in qemux86* it still fails with:
>
> | Making all in vtest
> | make[2]: Entering directory '/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0/build/vtest'
> | i586-webos-linux-gcc  -m32 -march=i586 --sysroot=/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0/recipe-sysroot -DHAVE_CONFIG_H -I. -I../../git/vtest -I..    -I../../git/src/gallium/drivers/virgl -I../../git/src/gallium/include -I../../git/src/gallium/auxiliary -I../../git/src/gallium/drivers -I../../git/include -I../../git/src   -I/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0/recipe-sysroot/usr/include/libdrm -DMESA_EGL_NO_X11_HEADERS   -O -fno-omit-frame-pointer -g -feliminate-unused-debug-types -fdebug-prefix-map=/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0=/usr/src/debug/virglrenderer/0.7.0-r0                      -fdebug-prefix-map=/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0/recipe-sysroot=                      -fdebug-prefix-map=/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webo
 s-linux/virglrenderer/0.7.0-r0/recipe-sysroot-native=  -pipe -Wall -Wextra -Werror=implicit-function-declaration -Werror=missing-prototypes -Wmissing-prototypes -Werror=int-to-pointer-cast -c -o util.o ../../git/vtest/util.c
> | i586-webos-linux-gcc  -m32 -march=i586 --sysroot=/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0/recipe-sysroot -DHAVE_CONFIG_H -I. -I../../git/vtest -I..    -I../../git/src/gallium/drivers/virgl -I../../git/src/gallium/include -I../../git/src/gallium/auxiliary -I../../git/src/gallium/drivers -I../../git/include -I../../git/src   -I/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0/recipe-sysroot/usr/include/libdrm -DMESA_EGL_NO_X11_HEADERS   -O -fno-omit-frame-pointer -g -feliminate-unused-debug-types -fdebug-prefix-map=/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0=/usr/src/debug/virglrenderer/0.7.0-r0                      -fdebug-prefix-map=/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0/recipe-sysroot=                      -fdebug-prefix-map=/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webo
 s-linux/virglrenderer/0.7.0-r0/recipe-sysroot-native=  -pipe -Wall -Wextra -Werror=implicit-function-declaration -Werror=missing-prototypes -Wmissing-prototypes -Werror=int-to-pointer-cast -c -o vtest_server.o ../../git/vtest/vtest_server.c
> | i586-webos-linux-gcc  -m32 -march=i586 --sysroot=/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0/recipe-sysroot -DHAVE_CONFIG_H -I. -I../../git/vtest -I..    -I../../git/src/gallium/drivers/virgl -I../../git/src/gallium/include -I../../git/src/gallium/auxiliary -I../../git/src/gallium/drivers -I../../git/include -I../../git/src   -I/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0/recipe-sysroot/usr/include/libdrm -DMESA_EGL_NO_X11_HEADERS   -O -fno-omit-frame-pointer -g -feliminate-unused-debug-types -fdebug-prefix-map=/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0=/usr/src/debug/virglrenderer/0.7.0-r0                      -fdebug-prefix-map=/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0/recipe-sysroot=                      -fdebug-prefix-map=/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webo
 s-linux/virglrenderer/0.7.0-r0/recipe-sysroot-native=  -pipe -Wall -Wextra -Werror=implicit-function-declaration -Werror=missing-prototypes -Wmissing-prototypes -Werror=int-to-pointer-cast -c -o vtest_renderer.o ../../git/vtest/vtest_renderer.c
> | ../i586-webos-linux-libtool  --tag=CC   --mode=link i586-webos-linux-gcc  -m32 -march=i586 --sysroot=/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0/recipe-sysroot -I../../git/src/gallium/drivers/virgl -I../../git/src/gallium/include -I../../git/src/gallium/auxiliary -I../../git/src/gallium/drivers -I../../git/include -I../../git/src   -I/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0/recipe-sysroot/usr/include/libdrm -DMESA_EGL_NO_X11_HEADERS   -O -fno-omit-frame-pointer -g -feliminate-unused-debug-types -fdebug-prefix-map=/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0=/usr/src/debug/virglrenderer/0.7.0-r0                      -fdebug-prefix-map=/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0/recipe-sysroot=                      -fdebug-prefix-map=/OE/build/luneos-master/webos-ports/tmp-glibc/work/i58
 6-webos-linux/virglrenderer/0.7.0-r0/recipe-sysroot-native=  -pipe -Wall -Wextra -Werror=implicit-function-declaration -Werror=missing-prototypes -Wmissing-prototypes -Werror=int-to-pointer-cast  -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -o virgl_test_server util.o vtest_server.o vtest_renderer.o ../src/libvirglrenderer.la
> | i586-webos-linux-libtool: link: i586-webos-linux-gcc -m32 -march=i586 --sysroot=/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0/recipe-sysroot -I../../git/src/gallium/drivers/virgl -I../../git/src/gallium/include -I../../git/src/gallium/auxiliary -I../../git/src/gallium/drivers -I../../git/include -I../../git/src -I/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0/recipe-sysroot/usr/include/libdrm -DMESA_EGL_NO_X11_HEADERS -O -fno-omit-frame-pointer -g -feliminate-unused-debug-types -fdebug-prefix-map=/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0=/usr/src/debug/virglrenderer/0.7.0-r0 -fdebug-prefix-map=/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0/recipe-sysroot= -fdebug-prefix-map=/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0/recipe-sysroot-native= -pipe -
 Wall -Wextra -Werror=implicit-function-declaration -Werror=missing-prototypes -Wmissing-prototypes -Werror=int-to-pointer-cast -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -o .libs/virgl_test_server util.o vtest_server.o vtest_renderer.o  ../src/.libs/libvirglrenderer.so -lm -lgbm -lepoxy -pthread
> | ../src/.libs/libvirglrenderer.so: error: undefined reference to 'drmPrimeHandleToFD'
> | collect2: error: ld returned 1 exit status
> | Makefile:429: recipe for target 'virgl_test_server' failed
> | make[2]: *** [virgl_test_server] Error 1
> | make[2]: Leaving directory '/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0/build/vtest'
> | Makefile:510: recipe for target 'all-recursive' failed
> | make[1]: *** [all-recursive] Error 1
> | make[1]: Leaving directory '/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0/build'
> | Makefile:419: recipe for target 'all' failed
> | make: *** [all] Error 2
> | ERROR: oe_runmake failed
>
> The fix from
> http://git.openembedded.org/openembedded-core-contrib/commit/?h=jansa/qemu&id=c29d4ccfe0a5f53c49883e55c2c2bb444997b1cf
> is still applicable and fixes this.
> --
> Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
Khem Raj Feb. 11, 2019, 3:24 p.m.
here is a build failure with -fuse-ld=gold

https://errors.yoctoproject.org/Errors/Details/222046/

On Sat, Feb 9, 2019 at 9:23 AM Khem Raj <raj.khem@gmail.com> wrote:
>
> dump ld.bfd generated .so and see if this symbol is present
>
> On Sat, Feb 9, 2019 at 5:20 AM Martin Jansa <martin.jansa@gmail.com> wrote:
> >
> > On Sat, Feb 09, 2019 at 11:06:47AM +0100, Alexander Kanavin wrote:
> > > On Sat, 9 Feb 2019 at 10:44, Martin Jansa <martin.jansa@gmail.com> wrote:
> > > > Does it need to depend on mesa directly instead of one of virtual/*
> > > > providers?
> > > >
> > > > It fails to build for targets which use different mesa, e.g. mesa-gl:
> > > >
> > > > ERROR: Nothing PROVIDES 'mesa' (but /OE/build/luneos-master/webos-ports/openembedded-core/meta/recipes-graphics/virglrenderer/virglrenderer_git.bb DEPENDS on or otherwise requires it)
> > > > mesa was skipped: PREFERRED_PROVIDER_virtual/libgl set to mesa-gl, not mesa
> > > > ERROR: Required build target 'virglrenderer' has no buildable providers.
> > > > Missing or unbuildable dependency chain was: ['virglrenderer', 'mesa']
> > >
> > > Yes, mesa-gl isn't going to work. Virgl needs the following bits (set
> > > in mesa recipe):
> > > PACKAGECONFIG_class-native ?= "gbm dri-native egl"
> > >
> > > dri-native is same as dri, but without drivers to save build time.
> >
> > OK, then with mesa used in qemux86* it still fails with:
> >
> > | Making all in vtest
> > | make[2]: Entering directory '/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0/build/vtest'
> > | i586-webos-linux-gcc  -m32 -march=i586 --sysroot=/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0/recipe-sysroot -DHAVE_CONFIG_H -I. -I../../git/vtest -I..    -I../../git/src/gallium/drivers/virgl -I../../git/src/gallium/include -I../../git/src/gallium/auxiliary -I../../git/src/gallium/drivers -I../../git/include -I../../git/src   -I/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0/recipe-sysroot/usr/include/libdrm -DMESA_EGL_NO_X11_HEADERS   -O -fno-omit-frame-pointer -g -feliminate-unused-debug-types -fdebug-prefix-map=/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0=/usr/src/debug/virglrenderer/0.7.0-r0                      -fdebug-prefix-map=/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0/recipe-sysroot=                      -fdebug-prefix-map=/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-we
 bos-linux/virglrenderer/0.7.0-r0/recipe-sysroot-native=  -pipe -Wall -Wextra -Werror=implicit-function-declaration -Werror=missing-prototypes -Wmissing-prototypes -Werror=int-to-pointer-cast -c -o util.o ../../git/vtest/util.c
> > | i586-webos-linux-gcc  -m32 -march=i586 --sysroot=/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0/recipe-sysroot -DHAVE_CONFIG_H -I. -I../../git/vtest -I..    -I../../git/src/gallium/drivers/virgl -I../../git/src/gallium/include -I../../git/src/gallium/auxiliary -I../../git/src/gallium/drivers -I../../git/include -I../../git/src   -I/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0/recipe-sysroot/usr/include/libdrm -DMESA_EGL_NO_X11_HEADERS   -O -fno-omit-frame-pointer -g -feliminate-unused-debug-types -fdebug-prefix-map=/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0=/usr/src/debug/virglrenderer/0.7.0-r0                      -fdebug-prefix-map=/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0/recipe-sysroot=                      -fdebug-prefix-map=/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-we
 bos-linux/virglrenderer/0.7.0-r0/recipe-sysroot-native=  -pipe -Wall -Wextra -Werror=implicit-function-declaration -Werror=missing-prototypes -Wmissing-prototypes -Werror=int-to-pointer-cast -c -o vtest_server.o ../../git/vtest/vtest_server.c
> > | i586-webos-linux-gcc  -m32 -march=i586 --sysroot=/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0/recipe-sysroot -DHAVE_CONFIG_H -I. -I../../git/vtest -I..    -I../../git/src/gallium/drivers/virgl -I../../git/src/gallium/include -I../../git/src/gallium/auxiliary -I../../git/src/gallium/drivers -I../../git/include -I../../git/src   -I/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0/recipe-sysroot/usr/include/libdrm -DMESA_EGL_NO_X11_HEADERS   -O -fno-omit-frame-pointer -g -feliminate-unused-debug-types -fdebug-prefix-map=/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0=/usr/src/debug/virglrenderer/0.7.0-r0                      -fdebug-prefix-map=/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0/recipe-sysroot=                      -fdebug-prefix-map=/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-we
 bos-linux/virglrenderer/0.7.0-r0/recipe-sysroot-native=  -pipe -Wall -Wextra -Werror=implicit-function-declaration -Werror=missing-prototypes -Wmissing-prototypes -Werror=int-to-pointer-cast -c -o vtest_renderer.o ../../git/vtest/vtest_renderer.c
> > | ../i586-webos-linux-libtool  --tag=CC   --mode=link i586-webos-linux-gcc  -m32 -march=i586 --sysroot=/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0/recipe-sysroot -I../../git/src/gallium/drivers/virgl -I../../git/src/gallium/include -I../../git/src/gallium/auxiliary -I../../git/src/gallium/drivers -I../../git/include -I../../git/src   -I/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0/recipe-sysroot/usr/include/libdrm -DMESA_EGL_NO_X11_HEADERS   -O -fno-omit-frame-pointer -g -feliminate-unused-debug-types -fdebug-prefix-map=/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0=/usr/src/debug/virglrenderer/0.7.0-r0                      -fdebug-prefix-map=/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0/recipe-sysroot=                      -fdebug-prefix-map=/OE/build/luneos-master/webos-ports/tmp-glibc/work/i
 586-webos-linux/virglrenderer/0.7.0-r0/recipe-sysroot-native=  -pipe -Wall -Wextra -Werror=implicit-function-declaration -Werror=missing-prototypes -Wmissing-prototypes -Werror=int-to-pointer-cast  -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -o virgl_test_server util.o vtest_server.o vtest_renderer.o ../src/libvirglrenderer.la
> > | i586-webos-linux-libtool: link: i586-webos-linux-gcc -m32 -march=i586 --sysroot=/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0/recipe-sysroot -I../../git/src/gallium/drivers/virgl -I../../git/src/gallium/include -I../../git/src/gallium/auxiliary -I../../git/src/gallium/drivers -I../../git/include -I../../git/src -I/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0/recipe-sysroot/usr/include/libdrm -DMESA_EGL_NO_X11_HEADERS -O -fno-omit-frame-pointer -g -feliminate-unused-debug-types -fdebug-prefix-map=/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0=/usr/src/debug/virglrenderer/0.7.0-r0 -fdebug-prefix-map=/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0/recipe-sysroot= -fdebug-prefix-map=/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0/recipe-sysroot-native= -pipe
  -Wall -Wextra -Werror=implicit-function-declaration -Werror=missing-prototypes -Wmissing-prototypes -Werror=int-to-pointer-cast -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -o .libs/virgl_test_server util.o vtest_server.o vtest_renderer.o  ../src/.libs/libvirglrenderer.so -lm -lgbm -lepoxy -pthread
> > | ../src/.libs/libvirglrenderer.so: error: undefined reference to 'drmPrimeHandleToFD'
> > | collect2: error: ld returned 1 exit status
> > | Makefile:429: recipe for target 'virgl_test_server' failed
> > | make[2]: *** [virgl_test_server] Error 1
> > | make[2]: Leaving directory '/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0/build/vtest'
> > | Makefile:510: recipe for target 'all-recursive' failed
> > | make[1]: *** [all-recursive] Error 1
> > | make[1]: Leaving directory '/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0/build'
> > | Makefile:419: recipe for target 'all' failed
> > | make: *** [all] Error 2
> > | ERROR: oe_runmake failed
> >
> > The fix from
> > http://git.openembedded.org/openembedded-core-contrib/commit/?h=jansa/qemu&id=c29d4ccfe0a5f53c49883e55c2c2bb444997b1cf
> > is still applicable and fixes this.
> > --
> > Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com
> > --
> > _______________________________________________
> > Openembedded-core mailing list
> > Openembedded-core@lists.openembedded.org
> > http://lists.openembedded.org/mailman/listinfo/openembedded-core
Alexander Kanavin Feb. 12, 2019, 11:33 a.m.
Anyway, I sent it upstream:
https://gitlab.freedesktop.org/virgl/virglrenderer/merge_requests/153
and added to my branch on poky-contrib.
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=akanavin/virgl-gtk

Alex

On Mon, 11 Feb 2019 at 16:24, Khem Raj <raj.khem@gmail.com> wrote:
>
> here is a build failure with -fuse-ld=gold
>
> https://errors.yoctoproject.org/Errors/Details/222046/
>
> On Sat, Feb 9, 2019 at 9:23 AM Khem Raj <raj.khem@gmail.com> wrote:
> >
> > dump ld.bfd generated .so and see if this symbol is present
> >
> > On Sat, Feb 9, 2019 at 5:20 AM Martin Jansa <martin.jansa@gmail.com> wrote:
> > >
> > > On Sat, Feb 09, 2019 at 11:06:47AM +0100, Alexander Kanavin wrote:
> > > > On Sat, 9 Feb 2019 at 10:44, Martin Jansa <martin.jansa@gmail.com> wrote:
> > > > > Does it need to depend on mesa directly instead of one of virtual/*
> > > > > providers?
> > > > >
> > > > > It fails to build for targets which use different mesa, e.g. mesa-gl:
> > > > >
> > > > > ERROR: Nothing PROVIDES 'mesa' (but /OE/build/luneos-master/webos-ports/openembedded-core/meta/recipes-graphics/virglrenderer/virglrenderer_git.bb DEPENDS on or otherwise requires it)
> > > > > mesa was skipped: PREFERRED_PROVIDER_virtual/libgl set to mesa-gl, not mesa
> > > > > ERROR: Required build target 'virglrenderer' has no buildable providers.
> > > > > Missing or unbuildable dependency chain was: ['virglrenderer', 'mesa']
> > > >
> > > > Yes, mesa-gl isn't going to work. Virgl needs the following bits (set
> > > > in mesa recipe):
> > > > PACKAGECONFIG_class-native ?= "gbm dri-native egl"
> > > >
> > > > dri-native is same as dri, but without drivers to save build time.
> > >
> > > OK, then with mesa used in qemux86* it still fails with:
> > >
> > > | Making all in vtest
> > > | make[2]: Entering directory '/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0/build/vtest'
> > > | i586-webos-linux-gcc  -m32 -march=i586 --sysroot=/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0/recipe-sysroot -DHAVE_CONFIG_H -I. -I../../git/vtest -I..    -I../../git/src/gallium/drivers/virgl -I../../git/src/gallium/include -I../../git/src/gallium/auxiliary -I../../git/src/gallium/drivers -I../../git/include -I../../git/src   -I/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0/recipe-sysroot/usr/include/libdrm -DMESA_EGL_NO_X11_HEADERS   -O -fno-omit-frame-pointer -g -feliminate-unused-debug-types -fdebug-prefix-map=/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0=/usr/src/debug/virglrenderer/0.7.0-r0                      -fdebug-prefix-map=/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0/recipe-sysroot=                      -fdebug-prefix-map=/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-
 webos-linux/virglrenderer/0.7.0-r0/recipe-sysroot-native=  -pipe -Wall -Wextra -Werror=implicit-function-declaration -Werror=missing-prototypes -Wmissing-prototypes -Werror=int-to-pointer-cast -c -o util.o ../../git/vtest/util.c
> > > | i586-webos-linux-gcc  -m32 -march=i586 --sysroot=/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0/recipe-sysroot -DHAVE_CONFIG_H -I. -I../../git/vtest -I..    -I../../git/src/gallium/drivers/virgl -I../../git/src/gallium/include -I../../git/src/gallium/auxiliary -I../../git/src/gallium/drivers -I../../git/include -I../../git/src   -I/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0/recipe-sysroot/usr/include/libdrm -DMESA_EGL_NO_X11_HEADERS   -O -fno-omit-frame-pointer -g -feliminate-unused-debug-types -fdebug-prefix-map=/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0=/usr/src/debug/virglrenderer/0.7.0-r0                      -fdebug-prefix-map=/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0/recipe-sysroot=                      -fdebug-prefix-map=/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-
 webos-linux/virglrenderer/0.7.0-r0/recipe-sysroot-native=  -pipe -Wall -Wextra -Werror=implicit-function-declaration -Werror=missing-prototypes -Wmissing-prototypes -Werror=int-to-pointer-cast -c -o vtest_server.o ../../git/vtest/vtest_server.c
> > > | i586-webos-linux-gcc  -m32 -march=i586 --sysroot=/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0/recipe-sysroot -DHAVE_CONFIG_H -I. -I../../git/vtest -I..    -I../../git/src/gallium/drivers/virgl -I../../git/src/gallium/include -I../../git/src/gallium/auxiliary -I../../git/src/gallium/drivers -I../../git/include -I../../git/src   -I/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0/recipe-sysroot/usr/include/libdrm -DMESA_EGL_NO_X11_HEADERS   -O -fno-omit-frame-pointer -g -feliminate-unused-debug-types -fdebug-prefix-map=/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0=/usr/src/debug/virglrenderer/0.7.0-r0                      -fdebug-prefix-map=/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0/recipe-sysroot=                      -fdebug-prefix-map=/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-
 webos-linux/virglrenderer/0.7.0-r0/recipe-sysroot-native=  -pipe -Wall -Wextra -Werror=implicit-function-declaration -Werror=missing-prototypes -Wmissing-prototypes -Werror=int-to-pointer-cast -c -o vtest_renderer.o ../../git/vtest/vtest_renderer.c
> > > | ../i586-webos-linux-libtool  --tag=CC   --mode=link i586-webos-linux-gcc  -m32 -march=i586 --sysroot=/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0/recipe-sysroot -I../../git/src/gallium/drivers/virgl -I../../git/src/gallium/include -I../../git/src/gallium/auxiliary -I../../git/src/gallium/drivers -I../../git/include -I../../git/src   -I/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0/recipe-sysroot/usr/include/libdrm -DMESA_EGL_NO_X11_HEADERS   -O -fno-omit-frame-pointer -g -feliminate-unused-debug-types -fdebug-prefix-map=/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0=/usr/src/debug/virglrenderer/0.7.0-r0                      -fdebug-prefix-map=/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0/recipe-sysroot=                      -fdebug-prefix-map=/OE/build/luneos-master/webos-ports/tmp-glibc/work
 /i586-webos-linux/virglrenderer/0.7.0-r0/recipe-sysroot-native=  -pipe -Wall -Wextra -Werror=implicit-function-declaration -Werror=missing-prototypes -Wmissing-prototypes -Werror=int-to-pointer-cast  -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -o virgl_test_server util.o vtest_server.o vtest_renderer.o ../src/libvirglrenderer.la
> > > | i586-webos-linux-libtool: link: i586-webos-linux-gcc -m32 -march=i586 --sysroot=/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0/recipe-sysroot -I../../git/src/gallium/drivers/virgl -I../../git/src/gallium/include -I../../git/src/gallium/auxiliary -I../../git/src/gallium/drivers -I../../git/include -I../../git/src -I/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0/recipe-sysroot/usr/include/libdrm -DMESA_EGL_NO_X11_HEADERS -O -fno-omit-frame-pointer -g -feliminate-unused-debug-types -fdebug-prefix-map=/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0=/usr/src/debug/virglrenderer/0.7.0-r0 -fdebug-prefix-map=/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0/recipe-sysroot= -fdebug-prefix-map=/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0/recipe-sysroot-native= -pi
 pe -Wall -Wextra -Werror=implicit-function-declaration -Werror=missing-prototypes -Wmissing-prototypes -Werror=int-to-pointer-cast -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -o .libs/virgl_test_server util.o vtest_server.o vtest_renderer.o  ../src/.libs/libvirglrenderer.so -lm -lgbm -lepoxy -pthread
> > > | ../src/.libs/libvirglrenderer.so: error: undefined reference to 'drmPrimeHandleToFD'
> > > | collect2: error: ld returned 1 exit status
> > > | Makefile:429: recipe for target 'virgl_test_server' failed
> > > | make[2]: *** [virgl_test_server] Error 1
> > > | make[2]: Leaving directory '/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0/build/vtest'
> > > | Makefile:510: recipe for target 'all-recursive' failed
> > > | make[1]: *** [all-recursive] Error 1
> > > | make[1]: Leaving directory '/OE/build/luneos-master/webos-ports/tmp-glibc/work/i586-webos-linux/virglrenderer/0.7.0-r0/build'
> > > | Makefile:419: recipe for target 'all' failed
> > > | make: *** [all] Error 2
> > > | ERROR: oe_runmake failed
> > >
> > > The fix from
> > > http://git.openembedded.org/openembedded-core-contrib/commit/?h=jansa/qemu&id=c29d4ccfe0a5f53c49883e55c2c2bb444997b1cf
> > > is still applicable and fixes this.
> > > --
> > > Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com
> > > --
> > > _______________________________________________
> > > Openembedded-core mailing list
> > > Openembedded-core@lists.openembedded.org
> > > http://lists.openembedded.org/mailman/listinfo/openembedded-core
Alexander Kanavin Feb. 23, 2019, 1:34 a.m.
This is a system generated Comment: Patch 158606 was automatically marked as superseded by patch 159017.