Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 10 Dec 2022 19:46:09 +0100
From:      Jan Beich <jbeich@FreeBSD.org>
To:        Emmanuel Vadot <manu@FreeBSD.org>
Cc:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   Re: git: 799245580a71 - main - graphics/mesa: Do not add USE_LDCONFIG for every mesa ports
Message-ID:  <359n-t7v2-wny@FreeBSD.org>
In-Reply-To: <202212081901.2B8J1frs012470@gitrepo.freebsd.org> (Emmanuel Vadot's message of "Thu, 8 Dec 2022 19:01:41 GMT")
References:  <202212081901.2B8J1frs012470@gitrepo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Emmanuel Vadot <manu@FreeBSD.org> writes:

>     Not every mesa ports provides shared libraries intented for dynamic uses
>     so stop running ldconfig script for those ports.
[...]
> diff --git a/graphics/mesa-dri/Makefile b/graphics/mesa-dri/Makefile
> index ac87f4cef889..e4fe1b570261 100644
> --- a/graphics/mesa-dri/Makefile
> +++ b/graphics/mesa-dri/Makefile
> @@ -26,6 +26,8 @@ ZSTD_DESC=		Use ZSTD for shader cache
>  ZSTD_LIB_DEPENDS=	libzstd.so:archivers/zstd
>  ZSTD_MESON_ENABLED=	zstd
>  
> +USE_LDCONFIG=		yes

OpenGL drivers in mesa-dri lack headers, SONAME and cannot be used by ld(1)
via -l<lib> due to missing "lib" prefix (unless using -l:<lib.so> syntax
which is generally useful to force static linking of a specific lib).
For dlopen(3) mesa-libs uses ${PREFIX}/lib/dri (or LIBGL_DRIVERS_PATH)
and vulkan-loader with ${PREFIX}/share/vulkan/icd.d/*.json (or
VK_ICD_FILENAMES) instead of ldconfig(8) hints.

lang/clover is probably similar as there's no API outside of
devel/ocl-icd using dlopen(3) with ${PREFIX}/etc/OpenCL/vendors/*.icd

diff --git a/graphics/mesa-dri/Makefile b/graphics/mesa-dri/Makefile
index 956cfb1d6f3e..94c8503053a7 100644
--- a/graphics/mesa-dri/Makefile
+++ b/graphics/mesa-dri/Makefile
@@ -27,8 +27,6 @@ ZSTD_DESC=		Use ZSTD for shader cache
 ZSTD_LIB_DEPENDS=	libzstd.so:archivers/zstd
 ZSTD_MESON_ENABLED=	zstd
 
-USE_LDCONFIG=		yes
-
 .include <bsd.port.options.mk>
 .include "${.CURDIR:H:H}/graphics/mesa-dri/Makefile.common"
 
diff --git a/lang/clover/Makefile b/lang/clover/Makefile
index c8f6dca6412b..c8325d1aad63 100644
--- a/lang/clover/Makefile
+++ b/lang/clover/Makefile
@@ -20,8 +20,6 @@ LIB_DEPENDS=	libOpenCL.so:devel/ocl-icd \
 RUN_DEPENDS=	libclc>=0.3.0:devel/libclc \
 		opencl>=0:devel/opencl
 
-USE_LDCONFIG=	yes
-
 .include <bsd.port.options.mk>
 .include "${.CURDIR:H:H}/graphics/mesa-dri/Makefile.common"
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?359n-t7v2-wny>