Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Ramiro Polla <ramiro.polla@gmail.com>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH 1/5] configure: remove build-time check for gzip support in zlib
Date: Fri, 30 May 2025 13:10:45 +0200
Message-ID: <CALweWgCqtkDQ6UaoT4d0LvKDy9X8NnfTxNuuP7-eaHxy7+AeiA@mail.gmail.com> (raw)
In-Reply-To: <CALweWgCAiaz_2GyRiGv7GfDDJTmiO=13CHQpAmCDC16182eOog@mail.gmail.com>

Hi Timo,

On Tue, May 27, 2025 at 7:55 PM Ramiro Polla <ramiro.polla@gmail.com> wrote:
> On Tue, May 27, 2025 at 3:19 PM Timo Rothenpieler <timo@rothenpieler.org> wrote:
> > On 27.05.2025 03:33, Ramiro Polla wrote:
> > > We currently test at build-time whether zlib supports decoding gzip.
> > > This is not needed for the build to succeed, since only the gzip
> > > command is necessary to perform compression at build-time.
> > >
> > > Presumably this check will help the user by not enabling compression at
> > > build-time if their system won't be able to decompress at runtime.
> > >
> > > But there are no guarantees that the system where the build is made is
> > > the same system where it will run. The build system could support gzip
> > > in zlib, but not the system at runtime, or the other way around.
> > >
> > > Realistically, the chances of there being a system where zlib does not
> > > support gzip are very slim. It is safe to assume that zlib will support
> > > gzip.
> > >
> > > This commit changes the dependency for support of compressed resources
> > > and ptx files to normal zlib support, and the existence of the gzip
> > > command.
> > > ---
> > >   configure | 13 ++-----------
> > >   1 file changed, 2 insertions(+), 11 deletions(-)
> > >
> > > diff --git a/configure b/configure
> > > index 3730b0524c..79c4fcf327 100755
> > > --- a/configure
> > > +++ b/configure
> > > @@ -2548,7 +2548,6 @@ HAVE_LIST="
> > >       posix_ioctl
> > >       texi2html
> > >       xmllint
> > > -    zlib_gzip
> > >       openvino2
> > >   "
> > >
> > > @@ -6895,19 +6894,11 @@ enabled  zlib && { check_pkg_config zlib zlib "zlib.h" zlibVersion ||
> > >   enabled bzlib && check_lib bzlib bzlib.h BZ2_bzlibVersion    -lbz2
> > >   enabled  lzma && check_lib lzma   lzma.h lzma_version_number -llzma
> > >
> > > -enabled zlib && test_exec $zlib_extralibs <<EOF && enable zlib_gzip
> > > -#include <zlib.h>
> > > -int main(void) {
> > > -    if (zlibCompileFlags() & (1 << 17)) return 1;
> > > -    return 0;
> > > -}
> > > -EOF
> > > -
> > >   [ -x "$(command -v gzip)" ] && enable gzip
> > >
> > > -enabled zlib_gzip && enabled gzip || disable ptx_compression
> > > +enabled zlib && enabled gzip || disable ptx_compression
> > >
> > > -enabled zlib_gzip && enabled gzip || disable resource_compression
> > > +enabled zlib && enabled gzip || disable resource_compression
> > >
> > >   # On some systems dynamic loading requires no extra linker flags
> > >   check_lib libdl dlfcn.h "dlopen dlsym" || check_lib libdl dlfcn.h "dlopen dlsym" -ldl
> >
> > I don't see why this should be removed.
> > It does not hurt in any way, and can prevent bad surprises for people
> > building in odd environments where zlib for some reason does not support
> > this.
> >
> > Chances are high that if the build env doesn't support it, neither will
> > the intended runtime env.
>
> We don’t perform build-time runtime checks for any other functionality.
>
> Are there any examples of systems where this has been a problem in practice?
>
> Unless we can find any real world use case where this test makes a
> difference, I don't see why we should keep it. In this case, less is
> better.

I'll postpone this part of the patchset (patches 1 to 3) for a while
to give more time for people to comment. If anybody can find a system
where zlib doesn't support gzip, please let us know.

Ramiro
_______________________________________________
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".

  reply	other threads:[~2025-05-30 11:11 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-27  1:33 Ramiro Polla
2025-05-27  1:33 ` [FFmpeg-devel] [PATCH 2/5] configure: move embedded resource checks to dependency tracker Ramiro Polla
2025-05-27  1:33 ` [FFmpeg-devel] [PATCH 3/5] configure: improve gzip check Ramiro Polla
2025-05-27  6:54   ` Jacob Lifshay
2025-05-27 16:12     ` Ramiro Polla
2025-05-27 19:45       ` Jacob Lifshay
2025-05-27  1:33 ` [FFmpeg-devel] [PATCH 4/5] ffbuild/common.mak: clean up and move fftools/resources-specific code its Makefile Ramiro Polla
2025-05-27  1:48   ` softworkz .
2025-05-27  2:04     ` Ramiro Polla
2025-05-27  2:18       ` softworkz .
2025-05-27  1:55   ` softworkz .
2025-05-27  3:29     ` Ramiro Polla
2025-05-27  4:02       ` softworkz .
2025-05-27 12:35         ` Ramiro Polla
2025-05-27 19:20           ` softworkz .
2025-05-27 19:59             ` Ramiro Polla
2025-05-27 20:13               ` softworkz .
2025-05-30 11:00                 ` Ramiro Polla
2025-05-27  1:33 ` [FFmpeg-devel] [PATCH 5/5] fftools/Makefile: clean files from fftools/{graph, textformat}/ Ramiro Polla
2025-06-01 21:30   ` Ramiro Polla
2025-06-01 21:46     ` softworkz .
2025-06-01 21:58       ` softworkz .
2025-05-27  1:43 ` [FFmpeg-devel] [PATCH 1/5] configure: remove build-time check for gzip support in zlib softworkz .
2025-05-27  1:52   ` Ramiro Polla
2025-05-27 13:18 ` Timo Rothenpieler
2025-05-27 17:55   ` Ramiro Polla
2025-05-30 11:10     ` Ramiro Polla [this message]
2025-05-30 18:18       ` Jacob Lifshay
2025-06-02 23:22         ` Ramiro Polla
2025-06-02 23:25           ` softworkz .
2025-06-02 23:31             ` softworkz .
2025-06-03  0:19             ` Ramiro Polla
2025-06-03  0:46               ` softworkz .

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=CALweWgCqtkDQ6UaoT4d0LvKDy9X8NnfTxNuuP7-eaHxy7+AeiA@mail.gmail.com \
    --to=ramiro.polla@gmail.com \
    --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