Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 Apr 2024 18:55:54 +0200
From:      Emmanuel Vadot <manu@bidouilliste.com>
To:        Jan Beich <jbeich@FreeBSD.org>
Cc:        bapt@freebsd.org, ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   Re: git: 171cdaf295e3 - main - graphics/mesa-libs: Fix LIB_DEPENDS
Message-ID:  <20240420185554.b2e2e5e8c037f706684d5167@bidouilliste.com>
In-Reply-To: <il0c-3na5-wny@FreeBSD.org>
References:  <202404181222.43ICMgTf017930@gitrepo.freebsd.org> <il0c-3na5-wny@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 20 Apr 2024 02:12:18 +0200
Jan Beich <jbeich@FreeBSD.org> wrote:

> Emmanuel Vadot <manu@FreeBSD.org> writes:
> 
> > The branch main has been updated by manu:
> >
> > URL: https://cgit.FreeBSD.org/ports/commit/?id=171cdaf295e37c781f9a4999b05ea74da0bcd0f0
> >
> > commit 171cdaf295e37c781f9a4999b05ea74da0bcd0f0
> > Author:     Emmanuel Vadot <manu@FreeBSD.org>
> > AuthorDate: 2024-04-18 08:54:08 +0000
> > Commit:     Emmanuel Vadot <manu@FreeBSD.org>
> > CommitDate: 2024-04-18 12:22:27 +0000
> >
> >     graphics/mesa-libs: Fix LIB_DEPENDS
> >     
> >     Mesa itself does not depend on libOpenGL.so from libglvnd but it needs
> >     libglvnd at build stage.
> >     Also it doesn't not depend on libwayland-egl.so but on libwayland-server.so
> >     and libwayland-client.so
> >     
> >     Differential Revision:  https://reviews.freebsd.org/D44831
> >     PR:                     278324
> >     Reported by:            autodep
> >     Reviewed by:            bapt
> >     Sponsored by:           Beckhoff Automation GmbH & Co. KG
> 
> This partial revert of https://cgit.freebsd.org/ports/commit/?id=1a86bea35222
> introduces inconsistency with other OpenGL providers. Also, consumers may[1]
> depend on mesa-libs but not libglvnd, breaking minimalistic jails e.g.,
> 
>   $ trap 'poudriere jails -kj 132amd64' EXIT INT TERM
>   $ poudriere jails -sj 132amd64
>   $ jail=132amd64-default
>   $ prefix=$(jls -j $jail path)
>   # prefer local packages
>   $ sed -i '' -Ee '/url/s,".*","file:///packages",'  \
>       -e '/mirror|signat|finger/d' \
>       $prefix/etc/pkg/FreeBSD.conf
>   # Vulkan/OpenGL/OpenCL acceleration
>   $ for p in 'dr[im]' 'dr[im]/*' 'pci'; do
>       devfs -m $prefix/dev rule apply path $p unhide;
>     done
>   # pass through Wayland socket
>   $ mkdir -p $prefix/$XDG_RUNTIME_DIR
>   $ mount -t nullfs $XDG_RUNTIME_DIR $prefix/$XDG_RUNTIME_DIR
>   # mirror local user
>   $ jexec $jail pw user add $(id -un) -m -G wheel,video
>   $ jexec $jail login -fp $(id -un)
>   $ su root -c 'pkg install -qy glmark2 mesa-dri'
>   $ glmark2-wayland
>   Error: Error loading EGL library
>   Error: main: Could not initialize canvas

 Isn't the problem that glmark2 does dlopen on libEGL ?
 https://github.com/glmark2/glmark2/blob/master/src/gl-state-egl.cpp#L316
 I think that in this case libglvnd should be added to RUN_DEPENDS,
maybe we could add a USE_GL= egl:run or something like that.
 The autodep features shows a lot of problem like that in the ports
tree. It does cause problems for example like you showed but in reality
most of this problem will be hidden because not having libglvnd on a
system is very rare.
 Bapt, do you think I should revert this one or should we start fixing
ports for the autodep feature ?

 Cheers,

> [1] $ comm -13 <(pkg rquery %ro libglvnd | sort) <(pkg rquery %ro mesa-libs | sort)
>     benchmarks/glmark2
>     benchmarks/vkmark
>     emulators/qemu-devel
>     graphics/libosmesa
>     graphics/mesa-dri
>     multimedia/wf-recorder
>     net-im/tg_owt
>     net/neatvnc
>     net/waypipe
>     net/wayvnc
>     x11-drivers/xf86-video-amdgpu
>     x11-wm/cosmic-comp
>     x11-wm/niri
>     x11/virglrenderer
>     x11/xdg-desktop-portal-hyprland
>     x11/xdg-desktop-portal-hyprland
>     x11/xdg-desktop-portal-wlr


-- 
Emmanuel Vadot <manu@bidouilliste.com> <manu@freebsd.org>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20240420185554.b2e2e5e8c037f706684d5167>