Monday, August 24, 2026

Re: graphics/ffmpeg: update to 9.0.1

On Mon, 24 Aug 2026 10:09:10 +0200, Theo Buehler <tb@theobuehler.org> wrote: > > On Mon, Aug 24, 2026 at 12:25:19AM +0200, Kirill A. Korinsky wrote: > > On Sun, 23 Aug 2026 16:22:53 +0200, > > Theo Buehler <tb@theobuehler.org> wrote: > > > > > > On Sun, Aug 23, 2026 at 06:50:10AM -0400, Brad Smith wrote: > > > > On Sun, Aug 23, 2026 at 10:53:25AM +0200, Kirill A. Korinsky wrote: > > > > > On Thu, 13 Aug 2026 12:13:54 +0200, > > > > > Kirill A. Korinsky <kirill@korins.ky> wrote: > > > > > > > > > > > > ports@, Brad, > > > > > > > > > > > > here a diff to update graphics/ffmpeg to 9.0.1, and it fixes and bumps > > > > > > x11/mplayer as well. > > > > > > > > > > > > Bulk on amd64 with previous diffs and this one successeded, unsigned > > > > > > packages available here: https://kirill.korins.ky/pub/packages/ffmpeg-9.0.1/ > > > > > > > > > > > > Tests and OKs are welcome. > > > > > > > > > > > > > > > > The previous version was without subject what is fixed now. > > > > > > > > > > Also, it survives a few bulks on amd64 but I haven't tested BTI/IBT amd64, > > > > > so any tests are welcome. > > > > > > > > Here is an updated diff. The configure patch SSL changes can be > > > > simplified a bit and add in my MIPS fix for CABAC. > > > > > > It works for me in some light testing. Tests run into segfaults on both > > > amd64 and arm64, which is not necessarily a blocker but a bit annoying. > > > > > > Quite a few tests do run with amd64/ibt without SIGILL, so that is > > > reassuring. > > > > > > > > > apple M1: > > > > > > NEON: > > > FAILURE: float_fft_16384_neon (segmentation fault) > > > - av_tx [FAILED] > > > checkasm: 1 of 8 tests failed > > > threads=1 > > > > > > on both > > > > > > cpu0: 12th Gen Intel(R) Core(TM) i7-1260P, 1995.55 MHz, 06-9a-03, patch 0000043b > > > cpu0: AMD Ryzen 7 PRO 5850U with Radeon Graphics, 1900.00 MHz, 19-50-00, patch 0a500012 > > > > > > I see this: > > > > > > ffmpeg version 9.0.1 Copyright (c) 2000-2026 the FFmpeg developers > > > built with OpenBSD clang version 22.1.6 > > > configuration: --enable-shared --arch=amd64 --cc=cc --cxx=c++ --enable-debug --disable-stripping --disable-indev=jack --disable-vulkan --enable-fontconfig --enable-frei0r --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libdav1d --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libharfbuzz --enable-libmp3lame --enable-libopus --enable-libspeex --enable-libsvtav1 --enable-libtheora --enable-libv4l2 --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-nonfree --enable-openssl --enable-libvidstab --extra-cflags='-I/usr/local/include -I/usr/X11R6/include' --extra-libs='-L/usr/local/lib -L/usr/X11R6/lib' --extra-ldsoflags= --mandir=/usr/local/man --objcc=/usr/bin/false --optflags='-O2 -pipe -g -Wno-redundant-decls' > > > libavutil 61. 1.101 / 61. 1.101 > > > libavcodec 63. 1.101 / 63. 1.101 > > > libavformat 63. 1.101 / 63. 1.101 > > > libavdevice 63. 1.101 / 63. 1.101 > > > libavfilter 12. 1.101 / 12. 1.101 > > > libswscale 10. 1.101 / 10. 1.101 > > > libswresample 7. 1.101 / 7. 1.101 > > > Stream mapping: > > > crop:default -> Stream #0:0 (rawvideo) > > > Segmentation fault (core dumped) > > > threads=1 > > > > > > Program terminated with signal SIGSEGV, Segmentation fault. > > > #0 memcpy (dst0=0xf3c943c2000, src0=0xf3c87d941c4 <ff_init_hscaler_mmxext+180>, length=44) > > > at /usr/src/lib/libc/string/memcpy.c:97 > > > 97 TLOOP1(*dst++ = *src++); > > > [Current thread is 1 (process 148644)] > > > (gdb) bt > > > #0 memcpy (dst0=0xf3c943c2000, src0=0xf3c87d941c4 <ff_init_hscaler_mmxext+180>, length=44) > > > at /usr/src/lib/libc/string/memcpy.c:97 > > > #1 0x00000f3c87d943b5 in ff_init_hscaler_mmxext (dstW=40032, xInc=65504, > > > filterCode=0xf3c943c2000 "", filter=0xf3bda2a8000, filterPos=0xf3c966f6000, > > > numSplits=<optimized out>) at src/libswscale/x86/hscale_fast_bilinear_simd.c:157 > > > #2 0x00000f3c87d90eb0 in ff_sws_init_single_context (sws=0xf3c09903000, > > > srcFilter=0xf3c227dd770, dstFilter=0xf3c227dd770) at src/libswscale/utils.c:1705 > > > #3 0x00000f3c87c9c8ab in add_legacy_sws_pass (graph=0xf3c2131d400, src=0xf3c227dd988, > > > dst=0xf3c227dd900, input=0x0, output=0xf3c227dd8e8) at src/libswscale/graph.c:584 > > > > > > > > > > Thanks for testing amd64, here updated diff which fixes a bug. > > Thanks. Makes sense and passes regress on my IBT machine. I have an idea what can trigger crash on your M1, it uses ldr =constant instruction which should crash when it tries to read from segment without read permission. So, here a blind short. May I ask you to give it a try? Index: graphics/ffmpeg/Makefile =================================================================== RCS file: /home/cvs/ports/graphics/ffmpeg/Makefile,v diff -u -p -r1.260 Makefile --- graphics/ffmpeg/Makefile 17 Jun 2026 17:13:06 -0000 1.260 +++ graphics/ffmpeg/Makefile 23 Aug 2026 12:04:14 -0000 @@ -1,7 +1,7 @@ COMMENT= audio/video converter and streamer # keep it synced with x11/mplayer -V= 8.1.2 +V= 9.0.1 DISTNAME= ffmpeg-${V} CATEGORIES= graphics multimedia SITES= https://ffmpeg.org/releases/ @@ -22,13 +22,13 @@ USE_NOBTCFI-amd64= Yes EPOCH= 1 -SHARED_LIBS= avcodec 27.2 \ - avdevice 15.1 \ - avfilter 13.2 \ - avformat 24.2 \ - avutil 17.2 \ - swresample 6.1 \ - swscale 9.2 +SHARED_LIBS= avcodec 28.0 \ + avdevice 16.0 \ + avfilter 14.0 \ + avformat 25.0 \ + avutil 18.0 \ + swresample 7.0 \ + swscale 10.0 HOMEPAGE= https://ffmpeg.org/ Index: graphics/ffmpeg/distinfo =================================================================== RCS file: /home/cvs/ports/graphics/ffmpeg/distinfo,v diff -u -p -r1.74 distinfo --- graphics/ffmpeg/distinfo 17 Jun 2026 17:13:06 -0000 1.74 +++ graphics/ffmpeg/distinfo 23 Aug 2026 12:04:14 -0000 @@ -1,2 +1,2 @@ -SHA256 (ffmpeg-8.1.2.tar.xz) = RkvrXnvwwxHmi0WuLwTpzCr4iFGrtAgiMXQqdNl7Ukw= -SIZE (ffmpeg-8.1.2.tar.xz) = 11710924 +SHA256 (ffmpeg-9.0.1.tar.xz) = zzjg4ox+VgWULEp3dVNJsBRYBKOXrzfrH7THfLI39jU= +SIZE (ffmpeg-9.0.1.tar.xz) = 12036420 Index: graphics/ffmpeg/patches/patch-configure =================================================================== RCS file: /home/cvs/ports/graphics/ffmpeg/patches/patch-configure,v diff -u -p -r1.80 patch-configure --- graphics/ffmpeg/patches/patch-configure 2 Jun 2026 21:29:05 -0000 1.80 +++ graphics/ffmpeg/patches/patch-configure 23 Aug 2026 12:04:14 -0000 @@ -3,7 +3,7 @@ Index: configure --- configure.orig +++ configure -@@ -6076,7 +6076,6 @@ case $target_os in +@@ -6159,7 +6159,6 @@ case $target_os in enable section_data_rel_ro striptype="" SHFLAGS='-shared' @@ -11,7 +11,7 @@ Index: configure SLIB_INSTALL_LINKS= oss_indev_extralibs="-lossaudio" oss_outdev_extralibs="-lossaudio" -@@ -6451,7 +6450,7 @@ set_default libdir +@@ -6534,7 +6533,7 @@ set_default libdir set_default $PATHS_LIST set_default nm @@ -20,7 +20,7 @@ Index: configure enable_weak_pic() { disabled pic && return -@@ -6745,11 +6744,19 @@ elif enabled x86; then +@@ -6830,11 +6829,19 @@ elif enabled x86; then # As 'i' is stored on the stack, this program will crash # if the base pointer is used to access it because the # base pointer is cleared in the inline assembly code. @@ -41,7 +41,7 @@ Index: configure # check whether EBX is available on x86 check_inline_asm ebx_available '""::"b"(0)' && -@@ -7002,7 +7009,7 @@ check_headers asm/types.h +@@ -7090,7 +7097,7 @@ check_headers asm/types.h # # some configurations also require linking to libatomic, so try # both with -latomic and without @@ -50,22 +50,12 @@ Index: configure check_builtin stdatomic stdatomic.h \ "atomic_int foo, bar = -1; atomic_store(&foo, 0); foo += bar" \ $LATOMIC && eval stdatomic_extralibs="\$LATOMIC" && break -@@ -7489,13 +7496,13 @@ enabled omx_rpi && { test_code cc OMX_Core.h - enabled omx && require_headers OMX_Core.h && \ - warn "The OpenMAX encoders are deprecated and will be removed in future versions" - --enabled openssl && { { check_pkg_config openssl "openssl >= 3.0.0" openssl/ssl.h DTLS_get_data_mtu && -+enabled openssl && { { check_pkg_config openssl "openssl >= 3.0.0" openssl/ssl.h OPENSSL_init_ssl && +@@ -7551,7 +7558,7 @@ enabled opengl && { check_lib opengl GL/glx + enabled openssl && { { check_pkg_config openssl "openssl >= 3.0.0" openssl/ssl.h DTLS_get_data_mtu && { enabled gplv3 || ! enabled gpl || enabled nonfree || die "ERROR: OpenSSL >=3.0.0 requires --enable-version3"; }; } || { enabled gpl && ! enabled nonfree && die "ERROR: OpenSSL <3.0.0 is incompatible with the gpl"; } || - check_pkg_config openssl "openssl >= 1.1.1" openssl/ssl.h DTLS_get_data_mtu || -- check_lib openssl openssl/ssl.h DTLS_get_data_mtu -lssl -lcrypto || -- check_lib openssl openssl/ssl.h DTLS_get_data_mtu -lssl -lcrypto -lws2_32 -lgdi32 || -- die "ERROR: openssl (>= 1.1.1) not found"; } + check_pkg_config openssl "openssl >= 1.1.0" openssl/ssl.h OPENSSL_init_ssl || -+ check_lib openssl openssl/ssl.h OPENSSL_init_ssl -lssl -lcrypto || -+ check_lib openssl openssl/ssl.h OPENSSL_init_ssl -lssl -lcrypto -lws2_32 -lgdi32 || -+ die "ERROR: openssl (>= 1.1.0) not found"; } - enabled pocketsphinx && require_pkg_config pocketsphinx pocketsphinx pocketsphinx/pocketsphinx.h ps_init - enabled rkmpp && { require_pkg_config rkmpp "rockchip_mpp >= 1.3.8" "rockchip/rk_mpi.h rockchip/mpp_buffer.h" "mpp_create mpp_buffer_sync_begin_f" && - { enabled libdrm || + check_lib openssl openssl/ssl.h DTLS_get_data_mtu -lssl -lcrypto || + check_lib openssl openssl/ssl.h DTLS_get_data_mtu -lssl -lcrypto -lws2_32 -lgdi32 || + die "ERROR: openssl (>= 1.1.1) not found"; } Index: graphics/ffmpeg/patches/patch-ffbuild_library_mak =================================================================== RCS file: /home/cvs/ports/graphics/ffmpeg/patches/patch-ffbuild_library_mak,v diff -u -p -r1.5 patch-ffbuild_library_mak --- graphics/ffmpeg/patches/patch-ffbuild_library_mak 21 May 2026 16:24:15 -0000 1.5 +++ graphics/ffmpeg/patches/patch-ffbuild_library_mak 23 Aug 2026 12:04:14 -0000 @@ -1,7 +1,7 @@ Index: ffbuild/library.mak --- ffbuild/library.mak.orig +++ ffbuild/library.mak -@@ -96,8 +96,6 @@ clean:: +@@ -113,8 +113,6 @@ clean:: install-lib$(NAME)-shared: $(SUBDIR)$(SLIBNAME) $(Q)mkdir -p "$(SHLIBDIR)" $$(INSTALL) -m 755 $$< "$(SHLIBDIR)/$(SLIB_INSTALL_NAME)" Index: graphics/ffmpeg/patches/patch-libavcodec_cabac_functions_h =================================================================== RCS file: graphics/ffmpeg/patches/patch-libavcodec_cabac_functions_h diff -N graphics/ffmpeg/patches/patch-libavcodec_cabac_functions_h --- graphics/ffmpeg/patches/patch-libavcodec_cabac_functions_h 20 Jan 2026 17:22:00 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,15 +0,0 @@ - -Disable mips64-specific asm code that clang fails to assemble. - -Index: libavcodec/cabac_functions.h ---- libavcodec/cabac_functions.h.orig -+++ libavcodec/cabac_functions.h -@@ -48,7 +48,7 @@ - #if ARCH_X86 - # include "x86/cabac.h" -

No comments:

Post a Comment