From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id D4ED048902 for ; Mon, 22 Jan 2024 06:52:03 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 8F69968CF50; Mon, 22 Jan 2024 08:52:00 +0200 (EET) Received: from latitanza.investici.org (latitanza.investici.org [82.94.249.234]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 60D3B68ABB5 for ; Mon, 22 Jan 2024 08:51:54 +0200 (EET) Received: from mx3.investici.org (unknown [127.0.0.1]) by latitanza.investici.org (Postfix) with ESMTP id 4TJLVd3rd8zGp6v for ; Mon, 22 Jan 2024 06:51:53 +0000 (UTC) Received: from [82.94.249.234] (mx3.investici.org [82.94.249.234]) (Authenticated sender: mehw.is.me@inventati.org) by localhost (Postfix) with ESMTPSA id 4TJLVc5cWkzGp6q for ; Mon, 22 Jan 2024 06:51:52 +0000 (UTC) Date: Mon, 22 Jan 2024 07:51:33 +0100 To: ffmpeg-devel@ffmpeg.org Message-ID: <20240122075000.1137a42c@pineapple> X-Mailer: Claws Mail 4.2.0 (GTK 3.24.39; x86_64-pc-linux-gnu) MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] configure: autodetect libglslang ldflags X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Matthew White via ffmpeg-devel Reply-To: FFmpeg development discussions and patches Cc: Matthew White Content-Type: multipart/mixed; boundary="===============4005111460146561736==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============4005111460146561736== Content-Type: multipart/signed; boundary="Sig_/OdfJs.8RfYTwRjCd4wDmW8W"; protocol="application/pgp-signature"; micalg=pgp-sha256 --Sig_/OdfJs.8RfYTwRjCd4wDmW8W Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Since glslang 14.0.0, OGLCompiler and HLSL stub libraries have been fully removed from the build. This fixes the configuration by detecting if the stub libraries are still present (glslang releases before version 14.0.0). ffbuild/config.log: /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld:= cannot find -lOSDependent: No such file or directory /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld:= cannot find -lHLSL: No such file or directory /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld:= cannot find -lOGLCompiler: No such file or directory Addresses https://trac.ffmpeg.org/ticket/10713 See https://bugs.gentoo.org/show_bug.cgi?id=3D918989 Should fix https://ffmpeg.org/pipermail/ffmpeg-devel/2023-August/313666.html Signed-off-by: Matthew White --- configure | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/configure b/configure index c8ae0a061d..abff488dc0 100755 --- a/configure +++ b/configure @@ -2626,6 +2626,7 @@ CMDLINE_SET=3D" ignore_tests install ld + libglslang_ldflags ln_s logfile malloc_prefix @@ -6652,6 +6653,24 @@ if enabled_all libglslang libshaderc; then die "ERROR: libshaderc and libglslang are mutually exclusive, if in do= ubt, disable libglslang" fi =20 +if enabled libglslang; then + if [ -x "$(command -v glslang)" ]; then + # https://github.com/KhronosGroup/glslang + # commit 6be56e45e574b375d759b89dad35f780bbd4792f: Remove `OGLComp= iler` and `HLSL` stub libraries from build + # StandAlone/StandAlone.cpp: "SpirvGeneratorVersion:GLSLANG_VERSIO= N_MAJOR.GLSLANG_VERSION_MINOR.GLSLANG_VERSION_PATCH GLSLANG_VERSION_FLAVOR" + glslang_version=3D"$(glslang -dumpversion)" + glslang_major=3D"${glslang_version%%.*}" + glslang_major=3D"${glslang_major#*:}" + if test ${glslang_major} -le 13; then + libglslang_ldflags=3D" -lOSDependent -lHLSL -lOGLCompiler" + elif ! [[ ${glslang_major} =3D~ ^[0-9]+$ ]]; then + die "ERROR: glslang's computed major version isn't a number: '= ${glslang_major}'" + fi + else + die "ERROR: glslang binary not found, impossible to determine inst= alled glslang's version" + fi +fi + check_cpp_condition winrt windows.h "!WINAPI_FAMILY_PARTITION(WINAPI_PARTI= TION_DESKTOP)" =20 if ! disabled w32threads && ! enabled pthreads; then @@ -6771,10 +6790,10 @@ enabled libfreetype && require_pkg_config lib= freetype freetype2 "ft2build. enabled libfribidi && require_pkg_config libfribidi fribidi fribidi= .h fribidi_version_info enabled libharfbuzz && require_pkg_config libharfbuzz harfbuzz hb.h = hb_buffer_create enabled libglslang && { check_lib spirv_compiler glslang/Include/glslang_c= _interface.h glslang_initialize_process \ - -lglslang -lMachineIndependent -lOSDependent -= lHLSL -lOGLCompiler -lGenericCodeGen \ + -lglslang -lMachineIndependent "${libglslang_l= dflags}" -lGenericCodeGen \ -lSPVRemapper -lSPIRV -lSPIRV-Tools-opt -lSPIR= V-Tools -lpthread -lstdc++ -lm || require spirv_compiler glslang/Include/glslang_c_i= nterface.h glslang_initialize_process \ - -lglslang -lOSDependent -lHLSL -lOGLCompiler \ + -lglslang "${libglslang_ldflags}" \ -lSPVRemapper -lSPIRV -lSPIRV-Tools-opt -lSPIR= V-Tools -lpthread -lstdc++ -lm; } enabled libgme && { check_pkg_config libgme libgme gme/gme.h gm= e_new_emu || require libgme gme/gme.h gme_new_emu -lgme = -lstdc++; } --=20 2.43.0 --Sig_/OdfJs.8RfYTwRjCd4wDmW8W Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEyBAEBCAAdFiEEHleiF1SoBpqVdUvfw5wJ3TZNsgAFAmWuEHUACgkQw5wJ3TZN sgAzSgf3S2RMHTSeC8EfejvEiqwmVKtbukG0cK5GKN+FDG4Cti1I1uibqPEelHqk MXznrWJV+ov/VVCkkbgG3K110WU5VWtu/+IYYuLM7Izgkld1nbmjilLWkR6ClYEm PlAo9BKwBHQWf8+F0UjuDvNMwYTaMEHOV30ElkgmbyJjel4sDGHPRFf45uygbBXD SjAFF0bBJsnV1J8tbV+gc0YihKvQjL0Ks0nOAbJg955s07AaVsriG5V3zVsAfUOo ecSfck4OofnBVbn/4tzxwL3xubuV75JxMWZqJ+Q5DGmyOmbE2iTe7X0OV/nuulu/ ppcjt2COotm9nkfvTXfR+kKsvK7Q =INsO -----END PGP SIGNATURE----- --Sig_/OdfJs.8RfYTwRjCd4wDmW8W-- --===============4005111460146561736== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". --===============4005111460146561736==--