From: "Martin Storsjö" <martin@martin.st>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH] configure: autodetect libglslang ldflags
Date: Mon, 22 Jan 2024 14:20:28 +0200 (EET)
Message-ID: <69fee92-3969-d1a3-59e6-5a7d5baada1@martin.st> (raw)
In-Reply-To: <54626366-fd2c-41c4-ab5a-05d4b41f091d@rothenpieler.org>
On Mon, 22 Jan 2024, Timo Rothenpieler wrote:
> On 22/01/2024 07:51, Matthew White via ffmpeg-devel wrote:
>> 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=918989
>> Should fix
>> https://ffmpeg.org/pipermail/ffmpeg-devel/2023-August/313666.html
>>
>> Signed-off-by: Matthew White <mehw.is.me@inventati.org>
>> ---
>> 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="
>> 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
>> doubt, disable libglslang"
>> fi
>> +if enabled libglslang; then
>> + if [ -x "$(command -v glslang)" ]; then
>> + # https://github.com/KhronosGroup/glslang
>> + # commit 6be56e45e574b375d759b89dad35f780bbd4792f: Remove
>> `OGLCompiler` and `HLSL` stub libraries from build
>> + # StandAlone/StandAlone.cpp:
>> "SpirvGeneratorVersion:GLSLANG_VERSION_MAJOR.GLSLANG_VERSION_MINOR.GLSLANG_VERSION_PATCH
>> GLSLANG_VERSION_FLAVOR"
>> + glslang_version="$(glslang -dumpversion)"
>> + glslang_major="${glslang_version%%.*}"
>> + glslang_major="${glslang_major#*:}"
>> + if test ${glslang_major} -le 13; then
>> + libglslang_ldflags=" -lOSDependent -lHLSL -lOGLCompiler"
>> + elif ! [[ ${glslang_major} =~ ^[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
>> installed glslang's version"
>> + fi
>> +fi
>> +
>
> Does that library really not have a sane pkg-config file?
> This kind of guesswork in configure is extremely ugly.
Also, how does this work when cross compiling - won't the "glslang" binary
be for the foreign cross target? Or is it something like the sdl-config
script which is a local shell script that can give relevant build flags (a
design preceding pkg-config)?
// Martin
_______________________________________________
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".
next prev parent reply other threads:[~2024-01-22 12:20 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-22 6:51 Matthew White via ffmpeg-devel
2024-01-22 12:17 ` Timo Rothenpieler
2024-01-22 12:20 ` Martin Storsjö [this message]
2024-01-22 14:34 ` Matthew White via ffmpeg-devel
2024-01-22 14:10 ` Matthew White via ffmpeg-devel
2024-01-22 17:58 ` Lynne
2024-01-22 18:49 ` Matthew White via ffmpeg-devel
2024-01-22 21:19 ` Martin Storsjö
2024-01-31 16:00 ` Lynne
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=69fee92-3969-d1a3-59e6-5a7d5baada1@martin.st \
--to=martin@martin.st \
--cc=ffmpeg-devel@ffmpeg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git