Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 692212 - media-libs/cogl: Add support for media-libs/libglvnd
Summary: media-libs/cogl: Add support for media-libs/libglvnd
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: Normal enhancement (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: use-libglvnd
  Show dependency tree
 
Reported: 2019-08-15 10:55 UTC by Maik
Modified: 2019-11-22 13:14 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch against cogl-1.22.2.ebuild removing test useflag. (cogl-1.22.2.ebuild-remove-test.patch,2.70 KB, text/plain)
2019-09-03 12:23 UTC, Maik
Details
cogl-1.22.2:20191027-184008.log.gz (cogl-1.22.2:20191027-184008.log.gz,12.23 KB, application/gzip)
2019-10-28 09:01 UTC, Alexander Tsoy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Maik 2019-08-15 10:55:43 UTC
media-libs/cogl has a dependency on eselect-opengl when USE="test" is set, thus blocking unmasking libglvnd usage. Stub for now to work as blocker.
Comment 1 Maik 2019-08-15 16:07:03 UTC
Nice comment in ebuild:
# Use swrast for tests, llvmpipe is incomplete and "test_sub_texture" fails
# NOTE: recheck if this is needed after every mesa bump
Question is, when was the last recheck of this. So needs recheck and hopefully the dependency can simply be dropped.
Comment 2 Matt Turner gentoo-dev 2019-08-24 17:23:16 UTC
FWIW, cogl's test suite passes for me with llvmpipe and fails with the classic swrast driver.
Comment 3 Maik 2019-09-03 12:23:41 UTC
Created attachment 588886 [details]
Patch against cogl-1.22.2.ebuild removing test useflag.

I've taken a deeper look at the ebuild and this seems quite absurd. It has dependencies to mesa[classic] and eselect-opengl when USE="test" but tests are disabled anyway with RESTRICT=test because those always fail(ed). Moreover, it uses
LIBGL_DRIVERS_PATH="${EROOT}/usr/$(get_libdir)/mesa", looks like some leftover from ancient times. At least I wouldn't know how that path could be used nowadays.
Conclusion: tests doesn't work anyway, is unmaintained, so just remove it. Attaching a patch doing so.
Comment 4 Matt Turner gentoo-dev 2019-09-18 20:29:44 UTC
Going to give leio another day or so...
Comment 5 Marek Bartosiewicz 2019-09-29 05:53:46 UTC
What about these? Shall I report them as bugs? 

I have:
[ebuild   R    ] media-libs/mesa-19.2.0::gentoo  USE="X classic dri3 egl gallium gbm libglvnd llvm opencl vaapi vdpau vulkan -d3d9 -debug -gles1 -gles2 -lm-sensors -osmesa -pax_kernel (-selinux) -test -unwind -valgrind -vulkan-overlay -wayland -xa -xvmc" ABI_X86="32 (64) (-x32)" VIDEO_CARDS="i965 intel (-freedreno) -i915 -iris (-lima) -nouveau (-panfrost) -r100 -r200 -r300 -r600 -radeon -radeonsi (-vc4) -virgl (-vivante) -vmware"

Newest i3-gaps fails, also I can't reinstall pango:

checking for x86_64-pc-linux-gnu-pkg-config... /usr/bin/x86_64-pc-linux-gnu-pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for LIBSN... yes
checking for XCB... yes
checking for XCB_UTIL... yes
checking for XCB_UTIL_CURSOR... yes
checking for XCB_UTIL_KEYSYMS... yes
checking for XCB_UTIL_WM... yes
checking for XCB_UTIL_XRM... yes
checking for XKBCOMMON... yes
checking for YAJL... yes
checking for LIBPCRE... yes
checking for PANGOCAIRO... no
configure: error: Package requirements (cairo >= 1.14.4 pangocairo) were not met:

Package 'gl', required by 'cairo', not found
Package 'gl', required by 'cairo', not found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables PANGOCAIRO_CFLAGS
and PANGOCAIRO_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

pango:
DHAVE_FREETYPE    -O2 -pipe -march=native -ftree-vectorize -Wall -c -o testboundaries_ucd.o /var/tmp/portage/x11-libs/pango-1.42.4-r2/work/pango-1.42.4/tests/testboundaries_ucd.c
x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I/var/tmp/portage/x11-libs/pango-1.42.4-r2/work/pango-1.42.4/tests -I..  -DSRCDIR=\"/var/tmp/portage/x11-libs/pango-1.42.4-r2/work/pango-1.42.4/tests\" -I/var/tmp/portage/x11-libs/pango-1.42.4-r2/work/pango-1.42.4 -DG_DISABLE_CAST_CHECKS -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/lib64/libffi-3.3_rc0/include -pthread  -I/usr/include/freetype2 -I/usr/include/uuid   -I/usr/include/freetype2   -DHAVE_X -DHAVE_XFT -DHAVE_FREETYPE    -O2 -pipe -march=native -ftree-vectorize -Wall -c -o testcolor.o /var/tmp/portage/x11-libs/pango-1.42.4-r2/work/pango-1.42.4/tests/testcolor.c
x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I/var/tmp/portage/x11-libs/pango-1.42.4-r2/work/pango-1.42.4/tests -I..  -DSRCDIR=\"/var/tmp/portage/x11-libs/pango-1.42.4-r2/work/pango-1.42.4/tests\" -I/var/tmp/portage/x11-libs/pango-1.42.4-r2/work/pango-1.42.4 -DG_DISABLE_CAST_CHECKS -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/lib64/libffi-3.3_rc0/include -pthread  -I/usr/include/freetype2 -I/usr/include/uuid   -I/usr/include/freetype2   -DHAVE_X -DHAVE_XFT -DHAVE_FREETYPE    -O2 -pipe -march=native -ftree-vectorize -Wall -c -o testscript.o /var/tmp/portage/x11-libs/pango-1.42.4-r2/work/pango-1.42.4/tests/testscript.c
x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I/var/tmp/portage/x11-libs/pango-1.42.4-r2/work/pango-1.42.4/tests -I..  -DSRCDIR=\"/var/tmp/portage/x11-libs/pango-1.42.4-r2/work/pango-1.42.4/tests\" -I/var/tmp/portage/x11-libs/pango-1.42.4-r2/work/pango-1.42.4 -DG_DISABLE_CAST_CHECKS -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/lib64/libffi-3.3_rc0/include -pthread  -I/usr/include/freetype2 -I/usr/include/uuid   -I/usr/include/freetype2   -DHAVE_X -DHAVE_XFT -DHAVE_FREETYPE    -O2 -pipe -march=native -ftree-vectorize -Wall -c -o markup-parse.o /var/tmp/portage/x11-libs/pango-1.42.4-r2/work/pango-1.42.4/tests/markup-parse.c
make[2]: *** No rule to make target '../pango/libpangocairo-1.0.la', needed by 'markup-parse'.  Stop.
make[2]: *** Waiting for unfinished jobs....
In file included from /var/tmp/portage/x11-libs/pango-1.42.4-r2/work/pango-1.42.4/tests/markup-parse.c:33:
/var/tmp/portage/x11-libs/pango-1.42.4-r2/work/pango-1.42.4/pango/pangocairo.h:26:10: fatal error: cairo.h: No such file or directory
   26 | #include <cairo.h>
      |          ^~~~~~~~~
compilation terminated.
make[2]: *** [Makefile:922: markup-parse.o] Error 1
make[2]: Leaving directory '/var/tmp/portage/x11-libs/pango-1.42.4-r2/work/pango-1.42.4-abi_x86_64.amd64/tests'
make[1]: *** [Makefile:574: all-recursive] Error 1
make[1]: Leaving directory '/var/tmp/portage/x11-libs/pango-1.42.4-r2/work/pango-1.42.4-abi_x86_64.amd64'
make: *** [Makefile:473: all] Error 2
Comment 6 Marek Bartosiewicz 2019-09-29 05:54:49 UTC
Sorry, wrong bug, please delete this and above comment.
Comment 7 Alexander Tsoy 2019-10-28 09:00:04 UTC
(In reply to Maik from comment #0)
> media-libs/cogl has a dependency on eselect-opengl when USE="test" is set,
> thus blocking unmasking libglvnd usage. Stub for now to work as blocker.
This is not the only problem with cogl. It fails to build with libglvnd-provided headers due to missing <EGL/eglmesaext.h> include (it is indirectly included via mesa-provided <EGL/eglext.h>):

cogl-texture-2d.c: In function ‘cogl_wayland_texture_2d_new_from_buffer’:
cogl-texture-2d.c:392:11: warning: implicit declaration of function ‘_cogl_egl_query_wayland_buffer’; did you mean ‘_cogl_get_read_framebuffer’? [-Wimplicit-function-declaration]
       if (_cogl_egl_query_wayland_buffer (ctx,
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           _cogl_get_read_framebuffer
cogl-texture-2d.c:430:43: error: ‘EGL_WAYLAND_BUFFER_WL’ undeclared (first use in this function); did you mean ‘EGL_TRIPLE_BUFFER_NV’?
                                           EGL_WAYLAND_BUFFER_WL,
                                           ^~~~~~~~~~~~~~~~~~~~~
                                           EGL_TRIPLE_BUFFER_NV
Comment 8 Alexander Tsoy 2019-10-28 09:01:44 UTC
Created attachment 594216 [details]
cogl-1.22.2:20191027-184008.log.gz
Comment 9 Alexander Tsoy 2019-10-30 18:26:03 UTC
https://gitlab.gnome.org/GNOME/cogl/merge_requests/17
Comment 10 Alexander Tsoy 2019-11-15 01:33:33 UTC
(In reply to Alexander Tsoy from comment #7)
> This is not the only problem with cogl. It fails to build with
> libglvnd-provided headers due to missing <EGL/eglmesaext.h> include (it is
> indirectly included via mesa-provided <EGL/eglext.h>):
And this will a problem with upcoming mesa-19.3 as well:
https://cgit.freedesktop.org/mesa/mesa/commit/?h=staging/19.3&id=87efb9f3a4f366372bc873dee741a2c2f272e5c9
Comment 11 Larry the Git Cow gentoo-dev 2019-11-17 17:51:49 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f87e81997e158c6fed35169a281f88b4385c509a

commit f87e81997e158c6fed35169a281f88b4385c509a
Author:     Mart Raudsepp <leio@gentoo.org>
AuthorDate: 2019-11-17 17:45:59 +0000
Commit:     Mart Raudsepp <leio@gentoo.org>
CommitDate: 2019-11-17 17:51:21 +0000

    media-libs/cogl: drop unnecessary test deps with tests restricted
    
    Bug: https://bugs.gentoo.org/692212
    Package-Manager: Portage-2.3.69, Repoman-2.3.12
    Signed-off-by: Mart Raudsepp <leio@gentoo.org>

 media-libs/cogl/cogl-1.22.2.ebuild | 39 ++++++++++++--------------------------
 media-libs/cogl/cogl-1.22.4.ebuild | 37 +++++++++++-------------------------
 2 files changed, 23 insertions(+), 53 deletions(-)
Comment 12 Mart Raudsepp gentoo-dev 2019-11-17 17:53:37 UTC
I'm not ready to test libglvnd stuff yet, so I only did the obvious USE=test dep removal for now. Upstream could use some poking on looking at this for me to feel comfortable including this without testing myself; or someone else from the team that knows about this stuff and can test it, I guess go ahead with what's necessary.
Comment 13 cyrillic 2019-11-19 02:59:17 UTC
(In reply to Alexander Tsoy from comment #10)
> And this will a problem with upcoming mesa-19.3 as well:

I am already having this problem with mesa-9999 even though I am not using libglvnd.
Comment 14 cyrillic 2019-11-20 00:48:44 UTC
(In reply to Alexander Tsoy from comment #9)
> https://gitlab.gnome.org/GNOME/cogl/merge_requests/17

Applying this patch and commenting out the "rm" line in src_install allowed cogl-1.22.4 to build just fine for me.