Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 920808 - media-video/ffmpeg-4.4.4-r8: fails to emerge "read-only segment has dynamic relocations"
Summary: media-video/ffmpeg-4.4.4-r8: fails to emerge "read-only segment has dynamic r...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: binutils-2.41
  Show dependency tree
 
Reported: 2023-12-27 09:23 UTC by disperato
Modified: 2025-03-11 09:03 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build log (media-video:ffmpeg-4.4.4-r8:20231227-090943.log.bz2,60.48 KB, application/x-bzip)
2023-12-27 09:29 UTC, disperato
Details

Note You need to log in before you can comment on or make changes to this bug.
Description disperato 2023-12-27 09:23:24 UTC
I'd like to be specific, but the error message is very cryptic giving no clues:
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: libavutil/x86/float_dsp.o: warning: relocation in read-only section `.text'
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: read-only segment has dynamic relocations
collect2: error: ld returned 1 exit status

Reproducible: Always

Steps to Reproduce:
1.emerge =media-video/ffmpeg-4.4.4-r8
2.
3.



I'm attaching the emerge log, system info, and use flags enabled
Comment 1 disperato 2023-12-27 09:29:56 UTC
Created attachment 880707 [details]
build log
Comment 2 disperato 2023-12-27 09:31:18 UTC
# emerge --info
Portage 3.0.57 (python 3.11.7-final-0, default/linux/amd64/17.1/desktop, gcc-13, glibc-2.37-r7, 5.11.13-gentoo x86_64)
=================================================================
System uname: Linux-5.11.13-gentoo-x86_64-Intel-R-_Core-TM-_i7-4702MQ_CPU_@_2.20GHz-with-glibc2.37
KiB Mem:    16313116 total,   7685224 free
KiB Swap:    4462588 total,   4462588 free
Timestamp of repository gentoo: Wed, 27 Dec 2023 07:00:01 +0000
Head commit of repository gentoo: ccc7f238b3ca3a918426c81a5ac36d553698c7e8
Timestamp of repository science: Tue, 26 Dec 2023 14:18:15 +0000
Head commit of repository science: 6db5cba5d6a76eb8c29608143528e698132d78a9

sh bash 5.1_p16-r6
ld GNU ld (Gentoo 2.41 p2) 2.41.0
ccache version 4.8.3 [enabled]
app-misc/pax-utils:        1.3.5::gentoo
app-shells/bash:           5.1_p16-r6::gentoo
dev-java/java-config:      2.3.3-r1::gentoo
dev-lang/perl:             5.38.2-r1::gentoo
dev-lang/python:           2.7.18_p13::myebs, 3.10.13::gentoo, 3.11.7::gentoo, 3.12.1::gentoo
dev-lang/rust:             1.71.1::gentoo
dev-util/ccache:           4.8.3::gentoo
dev-util/cmake:            3.27.7::gentoo
dev-util/meson:            1.2.3::gentoo
sys-apps/baselayout:       2.14-r1::gentoo
sys-apps/openrc:           0.48::gentoo
sys-apps/sandbox:          2.38::gentoo
sys-devel/autoconf:        2.13-r7::gentoo, 2.71-r6::gentoo
sys-devel/automake:        1.16.5-r1::gentoo
sys-devel/binutils:        2.40-r9::gentoo, 2.41-r2::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/clang:           16.0.6::gentoo
sys-devel/gcc:             8.4.0-r2::myebs, 12.2.1_p20230121-r1::myebs, 13.2.1_p20231118::myebs
sys-devel/gcc-config:      2.11::gentoo
sys-devel/libtool:         2.4.7-r1::gentoo
sys-devel/llvm:            16.0.6::gentoo
sys-devel/make:            4.4.1-r1::gentoo
sys-kernel/linux-headers:  6.1::gentoo (virtual/os-headers)
sys-libs/glibc:            2.37-r7::gentoo
Repositories:

gentoo
    location: /sync/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    volatile: True
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-max-age: 3
    sync-rsync-extra-opts: --exclude-from=/etc/portage/rsync_excludes --timeout=23
    sync-rsync-verify-metamanifest: yes

myebs
    location: /sync/gentoo/myebs
    masters: gentoo
    priority: 0
    volatile: True

science
    location: /var/db/repos/science
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/science.git
    masters: gentoo
    volatile: False

Installed sets: @system
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=core-avx2 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.6/ext-active/ /etc/php/apache2-php8.1/ext-active/ /etc/php/cgi-php5.6/ext-active/ /etc/php/cgi-php8.1/ext-active/ /etc/php/cli-php5.6/ext-active/ /etc/php/cli-php8.1/ext-active/ /etc/php/fpm-php8.1/ext-active/ /etc/php/phpdbg-php8.1/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=core-avx2 -O2 -pipe"
DISTDIR="/sync/gentoo/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg-live ccache config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_GB.UTF-8"
LC_ALL="en_GB.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,now -Wl,--hash-style=gnu"
LEX="flex"
MAKEOPTS="-j5"
PKGDIR="/sync/gentoo/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--exclude-from=/etc/portage/rsync_excludes --timeout=23"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/hugetmp/portage"
SHELL="/bin/bash"
USE="R X a52 aac aalib acl acpi alsa amd64 apache2 aspell bluetooth branding bzip2 cairo caps cdda cdparanoia cdr cli consolekit crypt cscope cups cxx dbus dillo dri dts dv dvb dvd dvdr egl encode examples exif expat fam fbcon ffmpeg fftw flac foomatic fortran gd gdbm ggi gif glut gmp gnutls gphoto2 gpl gpm gstreamer gtk gtk3 gui guile hardened hdf5 iconv icu ieee1394 ipv6 jack jpeg latex lcms ldap libcaca libnotify libtirpc libwww m17n-lib mad man mhash mikmod mime mjpeg mng motif mp3 mp4 mpeg mplayer multilib ncurses netcdf nls nptl objc ogg openal opengl openmp pam pango pcre pdf perl plotutils png policykit portaudio ppds pulseaudio qt5 radius readline ruby samba scanner sdl seccomp smp sndfile sound speex spell split-usr ssl startup-notification svg szip tcl test-rust theora threads tidy tiff tk truetype uclibc udev udisks unicode upower usb vcd vim-syntax vorbis vulkan wifi wmf wxwidgets x264 xattr xcb xft xml xpm xscreensaver xv xvid xvmc zlib" ABI_X86="64 32" ADA_TARGET="gnat_2021" ALSA_CARDS="hda-intel" APACHE2_MODULES="access auth auth_dbm auth_anon authn_core auth_digest authz_core authz_host alias file-cache echo charset-lite cache disk-cache mem-cache ext-filter case_filter case-filter-in deflate filter mime-magic cern-meta expires headers usertrack unique_id proxy proxy-connect proxy-ftp proxy-http info include cgi dav dav-fs vhost-alias speling rewrite log_config logio env setenvif mime status autoindex asis negotiation dir imap actions unixd userdir so socache_shmcb" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="abm aes avx avx2 bmi bmi2 f16c fsgsbase fma fma3 no-fma4 lzcnt mmx mmxext no-lwp no-tbm no-xop pclmul pni popcnt rdrnd sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 ntrip navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" INPUT_DEVICES="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-4" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_11" PYTHON_TARGETS="python3_11" RUBY_TARGETS="ruby31" SANE_BACKENDS="epson epson2 canon canon630u canon_dr canon_pp" VIDEO_CARDS="nvidia vesa" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipp2p iface geoip fuzzy condition tarpit sysrq proto logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LD, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Comment 3 disperato 2023-12-27 09:32:05 UTC
$ equery u ffmpeg
[ Legend : U - final flag setting for installation]
[        : I - package is installed with flag     ]
[ Colors : set, unset                             ]
 * Found these USE flags for media-video/ffmpeg-6.0-r9:
 U I
 + + X                      : Add support for X11
 + + abi_x86_32             : 32-bit (x86) libraries
 + + alsa                   : Add support for media-libs/alsa-lib (Advanced Linux Sound Architecture)
 - - amr                    : Enables Adaptive Multi-Rate Audio support
 - - amrenc                 : Enables Adaptive Multi-Rate Audio encoding support with media-libs/vo-amrwbenc.
 - - bluray                 : Enable playback of Blu-ray filesystems
 - - bs2b                   : Enables media-libs/libbs2b based Bauer stereo-to-binaural filter.
 + + bzip2                  : Enable bzip2 compression support
 - - cdio                   : Enables audio CD grabbing with dev-libs/libcdio.
 - - chromaprint            : Enables audio fingerprinting support with media-libs/chromaprint.
 - - chromium               : Builds libffmpeg.so to enable media playback in Chromium-based browsers like Opera and Vivaldi.
 - - codec2                 : Enables codec2 low bit rate speech codec support via media-libs/codec2.
 - - cpu_flags_x86_3dnow    : Use the 3DNow! instruction set
 - - cpu_flags_x86_3dnowext : Use the Enhanced 3DNow! instruction set
 + + cpu_flags_x86_aes      : Enable support for Intel's AES instruction set (AES-NI)
 + + cpu_flags_x86_avx      : Adds support for Advanced Vector Extensions instructions
 + + cpu_flags_x86_avx2     : Adds support for Advanced Vector Extensions 2 instructions
 + + cpu_flags_x86_fma3     : Use the Fused Multiply Add 3 instruction set ([fma] in cpuinfo)
 - - cpu_flags_x86_fma4     : Use the Fused Multiply Add 4 instruction set
 + + cpu_flags_x86_mmx      : Use the MMX instruction set
 + + cpu_flags_x86_mmxext   : Use the Extended MMX instruction set (a subset of SSE) ([mmxext] or [sse] in cpuinfo)
 + + cpu_flags_x86_sse      : Use the SSE instruction set
 + + cpu_flags_x86_sse2     : Use the SSE2 instruction set
 + + cpu_flags_x86_sse3     : Use the SSE3 instruction set ([pni] in cpuinfo, NOT ssse3)
 + + cpu_flags_x86_sse4_1   : Enable SSE4.1 instruction support
 + + cpu_flags_x86_sse4_2   : Enable SSE4.2 instruction support
 + + cpu_flags_x86_ssse3    : Use the SSSE3 instruction set (NOT sse3/pni)
 - - cpu_flags_x86_xop      : Enable the XOP instruction set
 - - cpudetection           : Enables runtime CPU detection (useful for bindist, compatibility on other CPUs)
 + - dav1d                  : Enables AV1 decoding via media-libs/dav1d.
 - - debug                  : Enable extra debug codepaths, like asserts and extra output. If you want to get meaningful backtraces see https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Backtraces
 - - doc                    : Add extra documentation (API, Javadoc, etc). It is recommended to enable per package instead of globally
 + + encode                 : Add support for encoding of audio or video files
 - - fdk                    : Use external fdk-aac library for AAC encoding
 + - fftools_aviocat        : cat's a URL to another one, useful for dumping streams.
 + - fftools_cws2fws        : converts cws files (Macromedia Flash, compressed) to fws ones (Macromedia Flash, uncompressed).
 + - fftools_ffescape       : Escapes an input string, adopting the av_get_token() escaping logic.
 + - fftools_ffeval         : A simple expression evalutor.
 + - fftools_ffhash         : Computes a file's digest using libavutil algorithms.
 + - fftools_fourcc2pixfmt  : Shows the relationships between rawvideo pixel formats and FourCC tags.
 + - fftools_graph2dot      : A tool to convert a libavfilter graph to a dot file.
 + - fftools_ismindex       : A tool for creating smooth streaming manifests.
 + - fftools_pktdumper      : Dumps packets as demuxed by libavformat.
 + - fftools_qt-faststart   : Rearranges a Quicktime file to facilitate network streaming.
 + - fftools_sidxindex      : Write an MPD file for fragmented MP4 files with a sidx index at the start of the file.
 + - fftools_trasher        : Writes burts of random data into a file. Great for testing error robustness/resilience/concealment.
 - - flite                  : Adds a text-to-speech filter based on app-accessibility/flite.
 - - fontconfig             : Support for configuring and customizing font access via media-libs/fontconfig
 - - frei0r                 : Enable frei0r wrapping in libavfilter
 - - fribidi                : Enables fribidi support in the drawtext filter.
 - - gcrypt                 : Enables gcrypt support: Needed for rtmp(t)e support if openssl, librtmp or gmp is not used.
 - - gme                    : Enables support for media-libs/game-music-emu for playing various video game music formats.
 + + gmp                    : Add support for dev-libs/gmp (GNU MP library)
 + + gnutls                 : Prefer net-libs/gnutls as SSL/TLS provider (ineffective with USE=-ssl)
 + + gpl                    : Build GPL code. Should be enabled unless you require LGPL binaries.
 - - gsm                    : Add support for the gsm lossy speech compression codec
 - - hardcoded-tables       : Use pre-calculated tables rather than calculating them on the fly. It results in an increase of approximately 15% in the size of libavcodec, the main library impacted by this change.
                              It enables savings in table generation time, done once at codec initialization, since by hardcoding the tables, they do not need to be computed at runtime. However, the savings are
                              often negligible (~100k cycles is a typical number) especially when amortized over the entire encoding/decoding operation. Improvements are being made to the runtime initialization,
                              and so over time, this option will have an impact on fewer and fewer codecs. 
 + + iconv                  : Enable support for the iconv character set conversion library
 - - iec61883               : Support for FireWire DV/HDV input device using media-libs/libiec61883.
 + + ieee1394               : Enable FireWire/iLink IEEE1394 support (dv, camera, ...)
 + + jack                   : Add support for the JACK Audio Connection Kit
 - - jpeg2k                 : Support for JPEG 2000, a wavelet-based image compression format
 - - jpegxl                 : Add JPEG XL image support
 - - kvazaar                : Enables media-libs/kvazaar based HEVC encoder.
 - - ladspa                 : Enable the ability to support ladspa plugins
 + + lcms                   : Enable ICC profile support via media-libs/lcms.
 + - libaom                 : Enables media-libs/libaom based AV1 codec support.
 - - libaribb24             : Enables ARIB text and caption decoding via media-libs/aribb24.
 - - libass                 : SRT/SSA/ASS (SubRip / SubStation Alpha) subtitle support
 + + libcaca                : Add support for colored ASCII-art graphics
 - - libdrm                 : Enables x11-libs/libdrm support for better screen grabbing and hardware accelerated codecs.
 - - libilbc                : Enables iLBC de/encoding via media-libs/libilbc.
 - - libplacebo             : Adds flexible GPU-accelerated processing filter based on media-libs/libplacebo.
 - - librtmp                : Enables Real Time Messaging Protocol using librtmp (media-video/rtmpdump) in addition to FFmpeg's native implementation.
 - - libsoxr                : Enables audio resampling through media-libs/soxr.
 - - libtesseract           : Enables the OCR filter via app-text/tesseract.
 - - libv4l                 : Uses media-libs/libv4l for video4linux instead of direct calls. Adds support for more devices via the userspace library.
 - - libxml2                : Uses dev-libs/libxml2 to enable dash demuxing support.
 - - lv2                    : Enables lv2 audio filter wrapper.
 - - lzma                   : Support for LZMA compression algorithm
 - - modplug                : Add libmodplug support for playing SoundTracker-style music files
 + + mp3                    : Add support for reading mp3 files
 + - network                : Enables network streaming support
 + - nvenc                  : Add support for NVIDIA Encoder/Decoder (NVENC/NVDEC) API for hardware accelerated encoding and decoding on NVIDIA cards (requires x11-drivers/nvidia-drivers)
 + + openal                 : Add support for the Open Audio Library
 - - opencl                 : Enable OpenCL support (computation on GPU)
 + + opengl                 : Add support for OpenGL (3D graphics)
 + - openh264               : Enables H.264 encoding suppoprt via media-libs/openh264.
 - - openssl                : Enables dev-libs/openssl support. Adds support for encrypted network protocols (TLS/HTTPS).
 + - opus                   : Enable Opus audio codec support
 - - oss                    : Add support for OSS (Open Sound System)
 - - pic                    : Force shared libraries to be built as PIC (this is slower)
 + - postproc               : Build and install libpostproc.
 + + pulseaudio             : Add sound server support via media-libs/libpulse (may be PulseAudio or PipeWire)
 - - rav1e                  : Enables AV1 encoding support via media-video/rav1e.
 - - rubberband             : Adds time-stretching and pitch-shifting audio filter based on media-libs/rubberband.
 + + samba                  : Add support for SAMBA (Windows File and Printer sharing)
 + + sdl                    : Add support for Simple Direct Layer (media library)
 - - snappy                 : Enable app-arch/snappy support. Required for e.g. Vidvox Hap encoder.
 - - sndio                  : Enable support for the media-sound/sndio backend
 + + speex                  : Add support for the speex audio codec (used for speech)
 - - srt                    : Enable support for Secure Reliable Transport (SRT) via net-libs/srt
 - - ssh                    : Enable SSH/sftp support via net-libs/libssh.
 - - static-libs            : Build static versions of dynamic libraries as well
 + + svg                    : Add support for SVG (Scalable Vector Graphics)
 - - svt-av1                : Enables AV1 encoding support via media-libs/svt-av1.
 - - test                   : Enable dependencies and/or preparations necessary to run tests (usually controlled by FEATURES=test but can be toggled independently)
 + + theora                 : Add support for the Theora Video Compression Codec
 + + threads                : Add threads support for various packages. Usually pthreads
 + + truetype               : Enables drawtext filter via media-libs/freetype and media-libs/harfbuzz.
 - - twolame                : Enables MP2 encoding via media-sound/twolame as an alternative to the internal encoder.
 - - v4l                    : Enable support for video4linux (using linux-headers or userspace libv4l libraries)
 + - vaapi                  : Enable Video Acceleration API for hardware decoding
 - - vdpau                  : Enable the Video Decode and Presentation API for Unix acceleration interface
 - - verify-sig             : Verify upstream signatures on distfiles
 - - vidstab                : Enables video stabilization filter using vid.stab library (media-libs/vidstab).
 + + vorbis                 : Add support for the OggVorbis audio codec
 + - vpx                    : Enables VP8 and VP9 codec support using libvpx: Decoding does not require this to be enabled but libvpx can also be used for decoding; encoding requires this useflag to be enabled
                              though.
 + + vulkan                 : Add support for 3D graphics and computing via the Vulkan cross-platform API
 - - webp                   : Add support for the WebP image format
 + + x264                   : Enable h264 encoding using x264
 - - x265                   : Enables HEVC encoding with media-libs/x265.
 + + xvid                   : Add support for xvid.org's open-source mpeg-4 codec
 - - zeromq                 : Enables net-libs/zeromq support with the zmq/azmq filters.
 - - zimg                   : Enables media-libs/zimg based scale filter.
 + + zlib                   : Add support for zlib compression
 - - zvbi                   : Enables media-libs/zvbi based teletext decoder.
Comment 4 Larry the Git Cow gentoo-dev 2024-01-03 06:39:36 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dba143d2e7f2485076b975290c8cff16202a5f6d

commit dba143d2e7f2485076b975290c8cff16202a5f6d
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-01-03 06:38:03 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-01-03 06:38:03 +0000

    media-video/ffmpeg: enable USE=pic by default
    
    binutils-2.41 is configured in Gentoo to reject textrels by default which
    the non-PIC-safe x86 (32-bit) asm requires.
    
    Start by defaulting USE=pic to on in general but we can remove the USE flag
    later and then just pass --disable-asm for 32-bit x86.
    
    Bug: https://bugs.gentoo.org/916067
    Bug: https://bugs.gentoo.org/920808
    Signed-off-by: Sam James <sam@gentoo.org>

 media-video/ffmpeg/ffmpeg-4.4.4-r8.ebuild | 2 +-
 media-video/ffmpeg/ffmpeg-5.1.4-r1.ebuild | 4 ++--
 media-video/ffmpeg/ffmpeg-6.0-r10.ebuild  | 4 ++--
 media-video/ffmpeg/ffmpeg-6.0-r9.ebuild   | 4 ++--
 media-video/ffmpeg/ffmpeg-6.0.1.ebuild    | 4 ++--
 media-video/ffmpeg/ffmpeg-6.1-r3.ebuild   | 4 ++--
 media-video/ffmpeg/ffmpeg-6.1.1.ebuild    | 2 +-
 media-video/ffmpeg/ffmpeg-9999.ebuild     | 4 ++--
 8 files changed, 14 insertions(+), 14 deletions(-)
Comment 5 Larry the Git Cow gentoo-dev 2025-03-11 09:03:43 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=00eddc65d7bd9ecaa9973fd46e544bbbfe5c9479

commit 00eddc65d7bd9ecaa9973fd46e544bbbfe5c9479
Author:     Ionen Wolkens <ionen@gentoo.org>
AuthorDate: 2025-03-07 13:02:23 +0000
Commit:     Ionen Wolkens <ionen@gentoo.org>
CommitDate: 2025-03-11 09:03:17 +0000

    media-video/ffmpeg: rewrite live ebuild
    
    This does not list all changes compared to original due to being
    essentially a rewrite (not much sense in looking at the diff
    given almost no lines in common), but to list or explain notable
    ones:
    
    * Cleanup a lot of obsolete logic, like mirror://gentoo snapshots,
      SCM type, <openssl-3 handling, etc...
    
    * Re-arrange IUSE=soc handling to drop the IUSE when FFMPEG_SOC_PATCH
      is empty until maintainer of the patch has time to look at that
      (easier to bump without it and removes the need to mask in 9999)
    
    * Drop some IUSE, ffmpeg has a bit too many often confusing users and,
      while debatable, some are not really useful to control bare at most
      for expert user that could use EXTRA_ECONF if *really* wanted:
    
      - debug (disabled): does very little beside override users' -g*,
        albeit if want nasm debug symbols will need to set X86ASMFLAGS.
    
      - encode (enabled): debated keeping it for disabling encoders
        without their own USE for bit of size/build time reduction despite
        no dependencies, but feel it is not really worth it as it
        complicates the ebuild and can break expectations for a lot
        of revdeps (many likely lack the [encode] that they need) --
        removal also handles bug #770439
    
      - fftools_* (disabled): almost no distros install these, many have
        rather generic names, we were missing installing new ones,
        upstream ffmpeg does not even have an install target for them,
        and a global USE_EXPAND for this feels wasteful (*could* consider
        adding a all-in-one IUSE=tools if some are wanted by users anyway
        but let us try without and see if anyone complains)
    
      - glslang (disabled): redundant with USE=shaderc and is a pain to
        use directly given glslang often breaks things, esp. worse for
        packages with a slow release cycle and old LTS versions like
        ffmpeg (bug #918989, bug #920283, bug #922333, bug #922433) --
        upstream also seems to favour shaderc: "libshaderc and libglslang
        are mutually exclusive, if in doubt, disable libglslang"
        (from ./configure)
    
      - harcoded-tables (disabled): off by default upstream and listed as a
        "experts only" option that seemingly provide little gains for a
        notable size increase, do not believe it is worth exposing as a USE
    
      - iconv (enabled): virtual/libiconv is essentially free anywhere but
        prefix and disabling iconv can be rather broken for a few things
    
      - network (enabled): no dependencies, fairly small, and many revdeps
        likely expect it to be enabled and just missing the [network]
        (tempting to do the same with USE=postproc but it would still be
        conditional through USE=gpl and be more confusing, and then forcing
        GPL also has its own issues)
    
      - oss (auto): does not have a dedicated option and just checks
        linux-headers and is very small, hardly anyone need this
        but that argument could be applied to a *ton* of in/outdevs,
        filters, de/encoders, and such and we would never see the end
        of it
    
      - pic (enabled): makes little sense not to enable nowadays and
        handles bug #903754 + bug #916067 -- USE had the secondary
        effect of disabling x86-32 asm which still doing given it is
        difficult to support either way due to textrels and
        >=binutils-2.41's enforcing (bug #916067, bug #920808), and
        it is possibly broken for older hardware (bug #733556) -- as
        a minor bonus, this should also let LTO work with abi_x86_32
        (bug #654118)
    
      - static-libs (disabled): cannot think of much of a use for this
        esp. given how massive these libraries are and it would still
        require to link with all its shared-only dependencies
    
      - test (irrelevant): tests are not gone but there is no dependencies
        (bc and wget are not needed) nor REQUIRED_USE to handle anymore,
        thus USE is useless
    
      - threads (auto): no real sense in disabling (bug #868471), and
        leaving it auto let ffmpeg figure out the right implementation
        to use which in most cases means default --enable-pthreads
    
      - cpu_flags_* + cpudetection (enabled): tentatively anyway, just
        let ffmpeg do its thing normally -- simplifies the ebuild a lot,
        "should" fix bug #915384, and also handles whatever ebuild
        was doing wrong wrt bug #752507 + bug #778035 (one minor "issue"
        however is that all these flags being removed will leave users
        confused as to what happened, if reading this and worried about
        optimizations.. then no they are *not* disabled, and it is fine
        for other machines thanks to detection at runtime)
    
    * New IUSE:
    
      - openmpt: requested in bug #921313
    
      - npp: requested in bug #695210 -- note have not tested the
        arm64 (sbsa) support, but it should work in theory as cuda
        toolkit does install npp prebuilt arm64 libraries
    
      - rabbitmq: trivial, may as well add support
    
      (meant to add more but others did not fare as well and will leave
      for later rather than during big changes, kept some minor notes in
      the ebuild about things still not supported)
    
    * Renamed IUSE:
    
      - mp3->lame: this is only for encoding but it made it "sound"
        needed for decoding (not the only case like this but this one
        felt too generic), may surprise those that had it actually
        enabled for encoding
    
      - libxml2->xml and libdrm->drm: given newly enabling these by
        default (see below), it's a good occasion to rename to the
        more commonly used USE without causing issues
    
      - libv4l->v4l: to be precise IUSE=v4l was removed and it gained
        the meaning that IUSE=libv4l had -- old v4l is always enabled
        (if linux) due to the hard dependency on linux-headers (see below)
        -- given the old REQUIRED_USE with libv4l? ( v4l ), all users of
        libv4l will have the new USE enabled already
    
      - libdvdnav+libdvdread->dvd(combined): similar to mpv, simpler
        for users when they just want dvds to work than worry about
        each library (dvd support is new in ffmpeg-7, so this only
        ever been masked)
    
    * Enable a few extra IUSE by default that, while not everyone needs,
      are useful and have dependencies that many users will already have.
    
      - libass,truetype,fontconfig: for proper text/subtitles drawing
        (kdenlive also wants [libass]), albeit video players tend to
        have their own handling (that pull the same depdencies)
    
      - drm: used in various pieces of code and little reason to
        disable when mesa depends on libdrm either way
    
      - xml: needed for DASH-type streams, notably used by youtube,
        and about everyone has libxml2
    
      (one downside of new defaults is MULTILIB_USEDEP, users that only
      selectively enable abi_x86_32 rather than globally may be faced with
      conflicts when updating)
    
    * Always depend on linux-headers if linux, not *required* (except for
      v4l) but this prevents a lot of automagic and going through alternate
      code paths if missing (also go with >=6 which is needed for v4l2m2m
      and I believe also USE=soc for v4l2request)
    
    * Add missing vulkan-headers dependency wrt bug #865201, and also
      opencl-headers wrt bug #941506 (not 100% sure that this is what
      happened for the latter, but given binhost is setup it is likely).
    
    * Bump nv-codec-headers min req to 12.1.14.0, while not *required*
      it spares us for setting up ranges and 11.x is due for cleanup.
    
    * Add missing x11-base/xorg-proto wrt bug #934196 -- technically
      was longer an issue given libX11 RDEPENDs on it "now", but would
      still rather keep these for now.
    
    * Depend on >=librsvg-2.52 wrt bug #918613, USE=svg is not essential
      for arches without rust and upstream bug been went 1.5 years without
      activity.
    
    * Update REQUIRED_USE a bit, cuda does not *need* nvenc (just get
      one filter in less), libplacebo does nothing without sdl(ffplay)
      or vulkan, and few others like these (likely still missing some).
    
    * Drop musl HAVE_POSIX_IOCTL workaround, this is automatically set by
      ./configure since ffmpeg-7.1. However, note that there is another
      related issue with libv4l (not v4l) that is not fixed (bug #911499).
    
    * No longer ignore ffmpeg-spec-disposition test, fixed in 7.1.1.
    
    * Fix verify-sig paths on prefix wrt bug #947253 (untested)
    
    * No longer pass e.g. --disable-indev=alsa when already doing
      --disable-alsa, ./configure seem to figure this out just fine.
    
    * No longer pass --cpu, this expects the -march=<exact> reported by
      the compiler or probes compiler with =native if =host), however it
      does not account for -mno-* both passed or implied by =native and
      could enable things it shouldn't. Furthermore, it adds -march=<exact>
      after the users' -march=native (which is more correct, can enable
      or disable additional features). This option only seem like trouble
      and likely does not get tested much. Removing also handles
      bug #830165 albeit ffmpeg-chromium is still affected.
    
    * Replace EXTRA_FFMPEG_CONF by EXTRA_ECONF, while it is not using
      econf nor autoconf, the latter is more widely known while the former
      needs users to look at the ebuild -- also die if old variable is set
      so users know about this change.
    
    * Skip installing doc/*.txt, that seems mostly oriented at ffmpeg devs,
      and feels noisy in the docdir, but do keep doc/APIChanges
    
    * Replace all *GPL* by the + version given ./configure always output
      with "or later" when listing the final license.
    
    * Maybe not best way to go about this, but when doing incompatible
      --enable-gpl --enable-nonfree, on top of the RESTRICT="bindist"
      also add "all-rights-reserved" so a typical freedom ACCEPT_LICENSE
      can block it.
    
    * Rearrange chromium patch a bit to need less ebuild logic, and make
      it unused for ffmpeg-compat.
    
    * Drop EGIT_MIN_CLONE_TYPE, shallow clones seem fine now? If not,
      could consider just using the official github mirror by default.
    
    List of closed bugs may not be complete, plans are to recheck
    still-open bugs after this is merged.
    
    Bug: https://bugs.gentoo.org/830165
    Closes: https://bugs.gentoo.org/654118
    Closes: https://bugs.gentoo.org/695210
    Closes: https://bugs.gentoo.org/733556
    Closes: https://bugs.gentoo.org/752507
    Closes: https://bugs.gentoo.org/770439
    Closes: https://bugs.gentoo.org/778035
    Closes: https://bugs.gentoo.org/865201
    Closes: https://bugs.gentoo.org/868471
    Closes: https://bugs.gentoo.org/903754
    Closes: https://bugs.gentoo.org/915384
    Closes: https://bugs.gentoo.org/916067
    Closes: https://bugs.gentoo.org/918613
    Closes: https://bugs.gentoo.org/918989
    Closes: https://bugs.gentoo.org/920283
    Closes: https://bugs.gentoo.org/920808
    Closes: https://bugs.gentoo.org/921313
    Closes: https://bugs.gentoo.org/922333
    Closes: https://bugs.gentoo.org/922433
    Closes: https://bugs.gentoo.org/934196
    Closes: https://bugs.gentoo.org/941506
    Closes: https://bugs.gentoo.org/947253
    Signed-off-by: Ionen Wolkens <ionen@gentoo.org>

 media-video/ffmpeg/ffmpeg-9999.ebuild      | 1014 +++++++++++++---------------
 media-video/ffmpeg/files/chromium-r3.patch |   53 ++
 media-video/ffmpeg/metadata.xml            |    8 +
 3 files changed, 538 insertions(+), 537 deletions(-)