Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 933202 - media-video/ffmpeg-6.1.1-r5 won't compile against x11-drivers/nvidia-drivers-550.78 after kernel update because of missing media-libs/nv-codec-headers files
Summary: media-video/ffmpeg-6.1.1-r5 won't compile against x11-drivers/nvidia-drivers-...
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal minor (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-30 17:01 UTC by Valentin Saussois
Modified: 2024-05-30 20:22 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Valentin Saussois 2024-05-30 17:01:20 UTC
After emerging gentoo-sources ffmpeg-6.1.1-r5 won't compile unless I re-emerge media-libs/nv-codec-headers

Neither the ffmpeg-6.1.1-r5 ebuild nor the manual kernel upgrade procedure
(
make modules_prepare
make
emerge --ask @module-rebuild 
make modules_install
)

will trigger media-libs/nv-codec-headers emerge that have to be re emerged explicitly for media-video/ffmpeg-6.1.1-r5 to emerge succefully.

emerge --info
Portage 3.0.63 (python 3.11.9-final-0, default/linux/amd64/23.0/split-usr/desktop, gcc-13, glibc-2.39-r6, 6.6.30-gentoo x86_64)
=================================================================
System uname: Linux-6.6.30-gentoo-x86_64-Intel-R-_Core-TM-_i5-3570_CPU_@_3.40GHz-with-glibc2.39
KiB Mem:    16334864 total,   1853112 free
KiB Swap:   25165820 total,  24959388 free
Timestamp of repository gentoo: Wed, 22 May 2024 06:30:00 +0000
Head commit of repository gentoo: 89f1f7279fdf49d4c6ee94af1de06883da17921b
Head commit of repository dimibyte: e4497f31c6b4f227376aac70dcbaf7a913762c7f

Timestamp of repository tastytea: Wed, 22 May 2024 01:48:43 +0000
Head commit of repository tastytea: 4820acd001b9b9f0d89063e70b1bb0f77945139f

Head commit of repository flatpak-overlay: 4bf9a7815ca9361f86459c8a8e9bc403e3721704

sh bash 5.1_p16-r6
ld GNU ld (Gentoo 2.42 p3) 2.42.0
app-misc/pax-utils:        1.3.7::gentoo
app-shells/bash:           5.1_p16-r6::gentoo
dev-build/autoconf:        2.71-r7::gentoo
dev-build/automake:        1.13.4-r2::gentoo, 1.16.5-r2::gentoo
dev-build/cmake:           3.28.5::gentoo
dev-build/libtool:         2.4.7-r4::gentoo
dev-build/make:            4.4.1-r1::gentoo
dev-build/meson:           1.4.0-r1::gentoo
dev-java/java-config:      2.3.3-r1::gentoo
dev-lang/perl:             5.38.2-r3::gentoo
dev-lang/python:           3.10.14_p1::gentoo, 3.11.9::gentoo, 3.12.3::gentoo
dev-lang/rust-bin:         1.77.1::gentoo
sys-apps/baselayout:       2.15::gentoo
sys-apps/openrc:           0.54::gentoo
sys-apps/sandbox:          2.38::gentoo
sys-devel/binutils:        2.42-r1::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/clang:           17.0.6::gentoo
sys-devel/gcc:             13.2.1_p20240210::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-devel/llvm:            17.0.6::gentoo
sys-kernel/linux-headers:  6.6-r1::gentoo (virtual/os-headers)
sys-libs/glibc:            2.39-r6::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    volatile: True
    sync-rsync-extra-opts: 
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-max-age: 3
    sync-rsync-verify-metamanifest: yes

dimibyte
    location: /var/db/git/dimibyte
    sync-type: git
    sync-uri: https://github.com/dimibyte/gentoo-overlay.git
    masters: gentoo
    volatile: True

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

flatpak-overlay
    location: /usr/flatpak-overlay
    sync-type: git
    sync-uri: git://github.com/fosero/flatpak-overlay.git
    masters: gentoo
    priority: 50
    volatile: True

stefantalpalaru
    location: /var/lib/layman/stefantalpalaru
    masters: gentoo
    priority: 50
    volatile: True

Installed sets: @steam
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=ivybridge -O2 -pipe -fomit-frame-pointer"
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/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=ivybridge -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/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 config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync merge-wait multilib-strict network-sandbox news parallel-fetch pid-sandbox pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://ftp.free.fr/mirrors/ftp.gentoo.org/ http://gentoo.mirrors.ovh.net/gentoo-distfiles/ http://mirrors.evowise.com/gentoo/"
LANG="en_GB.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs"
LEX="flex"
LINGUAS="en en_GB ja jp fr fr-FR "
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
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="/var/tmp"
SHELL="/bin/bash"
USE="7zip X a52 aac aalib acpi alsa amd64 asf audiofile avif background bash-completion bcmath berkdb bidi bonobo branding bzip2 cairo canna cdb cdda cdparanoia cdr celt cet cjk ckj colord commercial cpudetection crypt cscope css cue cups curl dbus dga dio divx dlloader dri dssi dts dv dvd dvdr dvdread dvi dxvk effects elogind enblend enca encode exif extraicons extramodules faac fame fat fbcon festival ffmpeg fftw flac flash flatpak fluidsynth fontconfig foomatic-db freetype ftp fuse g3dvl gcj gd gdbm ggi gif gimp gimpprint glut gnutls gphoto2 gpm gps graphviz gs gstreamer gtk gtk2 gtkhtml gudev gui hddtemp hplip hwdb iconv icu imagemagick imap imlib inkjar ipv6 irc jabber jack jackmidi javascript jbig joystick jpeg jpeg2k jpegxl jpg kdeenablefinal kerberos keymap krb4 kvazaar ladspa lame laptop lcd lcms libao libcaca libnotify libsamplerate libtirpc live lm_sensors lzo mad mail matroska midi mjpeg mmap mmx mng mod modplug mp3 mp4 mpeg mplayer mtp multilib musepack ncurses netboot network networking nls nptl nptlonly ntfs nvenc nvidia ogg openal opencl opengl openmp opus osc pam pango pcre pdf plugin png policykit polkit portaudio ppds pulseaudio python quicktime quota rar readline real realmedia reiser4 reiserfs rss rubberband samba scanner schroedinger sdl seccomp sift slang slp smp sms sna sndfile snmp sound sox speech speex spell split-usr sqlite srt sse sse2 sse3 sse4_1 ssh ssl ssockets ssse3 startup-notification streams svg test-rust theora threads tiff tools trayicon truetype ttf twolame udev udisks unicode upower usb userlocales v4l v4l2 vaapi vdpau vidstab vkd3d voice vorbis vpx vulkan wavpack webkit webp wifi win32codecs winbind wisualization wma wmf wmp wpa wxwidgets wxwindows x264 x265 xattr xcb xcomposite xface xfce xft xml xml2 xmlrpc xmms xosd xprint xrandr xscreensaver xv xvid xvmc zeroconf zimg zlib zsh" ABI_X86="64" ADA_TARGET="gcc_12" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_anon authn_dbm authn_file authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir env expires ext_filter file_cache filter headers include info log_config logio mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx f16c mmx mmxext pc1mu1 popcnt sse sse2 sse3 ssse3 sse4_1 sse4_2" 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 keyboard mouse joystick wacom" KERNEL="linux" L10N="fr en ja en-GB" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-1" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_11" PYTHON_TARGETS="python3_11" RUBY_TARGETS="ruby31 ruby32" SANE_BACKENDS="plustek canon" VIDEO_CARDS="intel nvidia" 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, LC_ALL, LD, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS

Error log

x86_64-pc-linux-gnu-gcc -m32 -mfpmath=sse -I. -Isrc/ -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DPIC -DZLIB_CONST -DHAVE_AV_CONFIG_H -DBUILDING_avcodec -march=ivybridge -O2 -pipe -fomit-frame-pointer   -march=ivybridge -std=c11 -fPIC     -pthread     -I/usr/include/fribidi -I/usr/include/freetype2 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -I/usr/include/libdrm  -I/usr/include/freetype2 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DHWY_SHARED_DEFINE    -I/usr/include/openjpeg-2.5 -I/usr/include/opus -I/usr/include/opus -D_REENTRANT -I/usr/include/librsvg-2.0 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/webp -I/usr/lib/libffi/include -pthread -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/cairo -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1    -I/usr/include/srt -I/usr/include/svt-av1 -DEB_DLL -I/usr/include/leptonica         -I/usr/include/webp -I/usr/include/webp -DX264_API_IMPORTS   -I/usr/include/AL         -I/usr/include/libdrm     -Wdeclaration-after-statement -Wall -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wwrite-strings -Wtype-limits -Wundef -Wmissing-prototypes -Wstrict-prototypes -Wempty-body -Wno-parentheses -Wno-switch -Wno-format-zero-length -Wno-pointer-sign -Wno-unused-const-variable -Wno-bool-operation -Wno-char-subscripts -march=ivybridge -O2 -pipe -fomit-frame-pointer -fno-math-errno -fno-signed-zeros -fno-tree-vectorize -Werror=format-security -Werror=implicit-function-declaration -Werror=missing-prototypes -Werror=return-type -Werror=vla -Wformat -Wno-maybe-uninitialized -I/usr/include/SDL2 -D_REENTRANT   -MMD -MF libavcodec/on2avc.d -MT libavcodec/on2avc.o -c -o libavcodec/on2avc.o src/libavcodec/on2avc.c
src/libavcodec/nvenc.c: In function ‘nvenc_setup_hevc_config’:
src/libavcodec/nvenc.c:1373:9: error: ‘NV_ENC_CONFIG_HEVC’ has no member named ‘pixelBitDepthMinus8’
 1373 |     hevc->pixelBitDepthMinus8 = IS_10BIT(ctx->data_pix_fmt) ? 2 : 0;
      |         ^~
src/libavcodec/nvenc.c: In function ‘nvenc_setup_av1_config’:
src/libavcodec/nvenc.c:1458:8: error: ‘NV_ENC_CONFIG_AV1’ has no member named ‘inputPixelBitDepthMinus8’
 1458 |     av1->inputPixelBitDepthMinus8 = IS_10BIT(ctx->data_pix_fmt) ? 2 : 0;
      |        ^~
src/libavcodec/nvenc.c:1459:8: error: ‘NV_ENC_CONFIG_AV1’ has no member named ‘pixelBitDepthMinus8’
 1459 |     av1->pixelBitDepthMinus8 = (IS_10BIT(ctx->data_pix_fmt) || ctx->highbitdepth) ? 2 : 0;
      |        ^~
src/libavcodec/nvenc.c: In function ‘nvenc_map_buffer_format’:
src/libavcodec/nvenc.c:1692:16: error: ‘NV_ENC_BUFFER_FORMAT_YV12_PL’ undeclared (first use in this function); did you mean ‘NV_ENC_BUFFER_FORMAT_YV12’?
 1692 |         return NV_ENC_BUFFER_FORMAT_YV12_PL;
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                NV_ENC_BUFFER_FORMAT_YV12
src/libavcodec/nvenc.c:1692:16: note: each undeclared identifier is reported only once for each function it appears in
src/libavcodec/nvenc.c:1694:16: error: ‘NV_ENC_BUFFER_FORMAT_NV12_PL’ undeclared (first use in this function); did you mean ‘NV_ENC_BUFFER_FORMAT_NV12’?
 1694 |         return NV_ENC_BUFFER_FORMAT_NV12_PL;
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                NV_ENC_BUFFER_FORMAT_NV12
x86_64-pc-linux-gnu-gcc -m32 -mfpmath=sse -I. -Isrc/ -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DPIC -DZLIB_CONST -DHAVE_AV_CONFIG_H -DBUILDING_avcodec -march=ivybridge -O2 -pipe -fomit-frame-pointer   -march=ivybridge -std=c11 -fPIC     -pthread     -I/usr/include/fribidi -I/usr/include/freetype2 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -I/usr/include/libdrm  -I/usr/include/freetype2 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DHWY_SHARED_DEFINE    -I/usr/include/openjpeg-2.5 -I/usr/include/opus -I/usr/include/opus -D_REENTRANT -I/usr/include/librsvg-2.0 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/webp -I/usr/lib/libffi/include -pthread -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/cairo -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1    -I/usr/include/srt -I/usr/include/svt-av1 -DEB_DLL -I/usr/include/leptonica         -I/usr/include/webp -I/usr/include/webp -DX264_API_IMPORTS   -I/usr/include/AL         -I/usr/include/libdrm     -Wdeclaration-after-statement -Wall -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wwrite-strings -Wtype-limits -Wundef -Wmissing-prototypes -Wstrict-prototypes -Wempty-body -Wno-parentheses -Wno-switch -Wno-format-zero-length -Wno-pointer-sign -Wno-unused-const-variable -Wno-bool-operation -Wno-char-subscripts -march=ivybridge -O2 -pipe -fomit-frame-pointer -fno-math-errno -fno-signed-zeros -fno-tree-vectorize -Werror=format-security -Werror=implicit-function-declaration -Werror=missing-prototypes -Werror=return-type -Werror=vla -Wformat -Wno-maybe-uninitialized -I/usr/include/SDL2 -D_REENTRANT   -MMD -MF libavcodec/on2avcdata.d -MT libavcodec/on2avcdata.o -c -o libavcodec/on2avcdata.o src/libavcodec/on2avcdata.c
src/libavcodec/nvenc.c:1700:16: error: ‘NV_ENC_BUFFER_FORMAT_YUV444_PL’ undeclared (first use in this function); did you mean ‘NV_ENC_BUFFER_FORMAT_YUV444’?
 1700 |         return NV_ENC_BUFFER_FORMAT_YUV444_PL;
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                NV_ENC_BUFFER_FORMAT_YUV444
make: *** [/var/tmp/portage/media-video/ffmpeg-6.1.1-r5/work/ffmpeg-6.1.1/ffbuild/common.mak:81: libavcodec/nvenc.o] Error 1
Comment 1 Ionen Wolkens gentoo-dev 2024-05-30 17:07:22 UTC
That doesn't really make sense, nv-codec-headers is just headers that do not change (re-emerging just gets you the same thing).

and nvidia-drivers is not needed to compile ffmpeg at all, it should not be impacting anything.

What version of nv-codec-headers are you using, is it being pulled from an overlay or something? ::stefantalpalaru that you have in your list notably has it and may be the cause of your problems.
Comment 2 Valentin Saussois 2024-05-30 17:26:41 UTC
(In reply to Ionen Wolkens from comment #1)
> That doesn't really make sense, nv-codec-headers is just headers that do not
> change (re-emerging just gets you the same thing).
> 
> and nvidia-drivers is not needed to compile ffmpeg at all, it should not be
> impacting anything.
> 
> What version of nv-codec-headers are you using, is it being pulled from an
> overlay or something? ::stefantalpalaru that you have in your list notably
> has it and may be the cause of your problems.

> That doesn't really make sense, nv-codec-headers is just headers that do not
> change (re-emerging just gets you the same thing).
> 
> and nvidia-drivers is not needed to compile ffmpeg at all, it should not be
> impacting anything.
> 
> What version of nv-codec-headers are you using, is it being pulled from an
> overlay or something? ::stefantalpalaru that you have in your list notably
> has it and may be the cause of your problems.


(In reply to Ionen Wolkens from comment #1)


You are right, when it happened I tried to emerge the previous versions available in my local tree and effectively the previous version was from "stefantalpalaru" overlay, and that's when the media-libs/nv-codec-headers have been dragged in my system. Then the ffmpeg-6.1.1-r5 successfully compile after...  but maybe it's not what provided the necessary changes for the emerge to be successful. 

Sorry I've been too careless and hasty in my deductions.

I encountered the problem just after I've updated my kernel before to get my system up to date before profile switching (17.1 -> 23.0) and at this moment ffmpeg failed to compile then after trying other version (and maybe compiling and rebooting to new kernel ?) succeeded.

Now I'm at the end of emerge --emptytree -uDNav @world (and gentoo-soruces have been re emerged, I could have excluded it...) and ffmpeg-6.1.1-r5 compilation is acting-up again with the same error. 

I'm getting back to this bug report when I'll really get to the bottom of this.
Sorry for the noise.
Comment 3 Jonas Stein gentoo-dev 2024-05-30 20:22:29 UTC
Thank you. 
I suggest, you open a new ticket then with all information at hand. 
I will close this one here so you have a clean new ticket then. 
If you want, we can help you to locate the problem in our support channels 
https://www.gentoo.org/support/