Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 539872 - media-libs/mediastreamer-2.9.0-r1 - In file included from videofilters/videoenc.c:24:0: ../src/utils/ffmpeg-priv.h:73:38: fatal error: libavcodec/old_codec_ids.h: No such file or directory
Summary: media-libs/mediastreamer-2.9.0-r1 - In file included from videofilters/videoe...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Andrew Savchenko
URL:
Whiteboard:
Keywords:
: 591654 (view as bug list)
Depends on: 641512
Blocks: 575538
  Show dependency tree
 
Reported: 2015-02-12 15:23 UTC by Toralf Förster
Modified: 2019-11-24 10:17 UTC (History)
14 users (show)

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


Attachments
Patch containing updated ebuild and mediastreamer patches (0001-Patched-mediastreamer-to-compile-with-libav10.patch,33.39 KB, patch)
2015-03-22 02:51 UTC, Renee D'Netto
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2015-02-12 15:23:59 UTC
libtool: compile:  x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -DPACKAGE_PLUGINS_DIR=\"/usr/lib64/mediastreamer/plugins\" -DLOCALEDIR=\"/usr/share/locale\" -DMS2_INTERNAL -DMS2_FILTERS -I. -I.. -I../include/ -I../src/base -I../src/utils -I../src/voip -I../src/audiofilters -I../src/otherfilters -I../src/videofilters -D_REENTRANT -DVIDEO_ENABLED -DHAVE_GL -DHAVE_XV -I/usr/include/libdrm -DORTP_INET6 -O2 -pipe -Wall -fdiagnostics-show-option -pthread -D_REENTRANT -c videofilters/theora.c  -fPIC -DPIC -o videofilters/.libs/theora.o
videofilters/theora.c: In function ‘enc_process’:
videofilters/theora.c:335:5: warning: format ‘%i’ expects argument of type ‘int’, but argument 2 has type ‘size_t’ [-Wformat=]
     ms_message("sending theora packed conf (%i bytes)",msgdsize(om));
     ^
/bin/sh ../libtool  --tag=CC   --mode=compile x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -DPACKAGE_PLUGINS_DIR=\"/usr/lib64/mediastreamer/plugins\" -DLOCALEDIR=\"/usr/share/locale\" -DMS2_INTERNAL -DMS2_FILTERS -I. -I..  -I../include/ -I../src/base -I../src/utils -I../src/voip -I../src/audiofilters -I../src/otherfilters -I../src/videofilters   -D_REENTRANT         -DVIDEO_ENABLED -DHAVE_GL -DHAVE_XV -I/usr/include/libdrm    -DORTP_INET6 -O2 -pipe  -Wall -fdiagnostics-show-option -pthread -D_REENTRANT  -c -o videofilters/videoenc.lo videofilters/videoenc.c
libtool: compile:  x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -DPACKAGE_PLUGINS_DIR=\"/usr/lib64/mediastreamer/plugins\" -DLOCALEDIR=\"/usr/share/locale\" -DMS2_INTERNAL -DMS2_FILTERS -I. -I.. -I../include/ -I../src/base -I../src/utils -I../src/voip -I../src/audiofilters -I../src/otherfilters -I../src/videofilters -D_REENTRANT -DVIDEO_ENABLED -DHAVE_GL -DHAVE_XV -I/usr/include/libdrm -DORTP_INET6 -O2 -pipe -Wall -fdiagnostics-show-option -pthread -D_REENTRANT -c videofilters/videoenc.c  -fPIC -DPIC -o videofilters/.libs/videoenc.o
In file included from videofilters/videoenc.c:24:0:
../src/utils/ffmpeg-priv.h:73:38: fatal error: libavcodec/old_codec_ids.h: No such file or directory
 #include <libavcodec/old_codec_ids.h>
                                      ^
compilation terminated.
Makefile:1318: recipe for target 'videofilters/videoenc.lo' failed
make[3]: *** [videofilters/videoenc.lo] Error 1
make[3]: Leaving directory '/var/tmp/portage/media-libs/mediastreamer-2.9.0-r1/work/mediastreamer-2.9.0/src'
Makefile:872: recipe for target 'all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory '/var/tmp/portage/media-libs/mediastreamer-2.9.0-r1/work/mediastreamer-2.9.0/src'
Makefile:613: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/var/tmp/portage/media-libs/mediastreamer-2.9.0-r1/work/mediastreamer-2.9.0'
Makefile:520: recipe for target 'all' failed
make: *** [all] Error 2
 * ERROR: media-libs/mediastreamer-2.9.0-r1::gentoo failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=media-libs/mediastreamer-2.9.0-r1::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=media-libs/mediastreamer-2.9.0-r1::gentoo'`.
 * The complete build log is located at '/var/log/portage/media-libs:mediastreamer-2.9.0-r1:20150211-224650.log'.
 * For convenience, a symlink to the build log is located at '/var/tmp/portage/media-libs/mediastreamer-2.9.0-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/media-libs/mediastreamer-2.9.0-r1/temp/environment'.
 * Working directory: '/var/tmp/portage/media-libs/mediastreamer-2.9.0-r1/work/mediastreamer-2.9.0'
 * S: '/var/tmp/portage/media-libs/mediastreamer-2.9.0-r1/work/mediastreamer-2.9.0'

!!! existing preserved libs found


! ! !  This is a build bot chroot image at a hardened amd64 host ! ! !

Portage 2.2.15 (python 3.3.5-final-0, hardened/linux/amd64, gcc-4.9.2, glibc-2.20-r1, 3.18.5-hardened-r1 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-3.18.5-hardened-r1-x86_64-Intel-R-_Core-TM-_i7-3770_CPU_@_3.40GHz-with-gentoo-2.2
KiB Mem:    16166860 total,   5850304 free
KiB Swap:   16777212 total,  16758576 free
Timestamp of tree: Wed, 11 Feb 2015 21:15:01 +0000
sh bash 4.3_p33-r1
ld GNU ld (Gentoo 2.24 p1.4) 2.24
app-shells/bash:          4.3_p33-r1
dev-java/java-config:     2.2.0
dev-lang/perl:            5.20.1-r4
dev-lang/python:          2.7.9-r1, 3.3.5-r1
dev-util/cmake:           3.1.0
dev-util/pkgconfig:       0.28-r2
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.13.9
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6-r1, 1.13.4, 1.15
sys-devel/binutils:       2.24-r3
sys-devel/gcc:            4.9.2
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.5
sys-devel/make:           4.1-r1
sys-kernel/linux-headers: 3.18 (virtual/os-headers)
sys-libs/glibc:           2.20-r1
Repositories: gentoo
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/lib/hsqldb"
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 /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--nospinner --tree --quiet-build --quiet  --deep --jobs 1"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://mirror.leaseweb.com/gentoo/ http://ftp.uni-erlangen.de/pub/mirrors/gentoo http://ftp-stud.hs-esslingen.de/pub/Mirrors/gentoo/ http://gd.tuwien.ac.at/opsys/linux/gentoo/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j1"
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"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="X acl aes-ni alsa amd64 apache2 avx avx2 berkdb bzip2 cli corefonts cracklib crypt cups cxx dbus dnssec dri drmkms dvd ecc extraengine fontconfig fortran fpm gdbm gtk gudev gui hardened iconv isag jpeg justify libav libvirtd logrotate macvtap mbox minizip mmx modules multilib mysql ncurses nls nptl ogg opengl openmp pam pax_kernel pcre plasma png policykit qemu qt3support qt4 readline session spice sse sse2 sse4 sse4_1 sse4_2 ssh-askpass ssl ssse3 tcpd theora thinkpad threads tk tls truetype uml unicode urandom usb usbredir uxa v4l v4l2 vaapi video vorbis xa xattr xmp xscreensaver xtpax xvfb xvmc zenmap zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en en_GB" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGET S="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby19 ruby20" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON


The build log is stored in /var/log/portage/_emerge_20150211-234745.log
The chroot image is amd64-unstable-hardened
Comment 1 Steve Arnold archtester gentoo-dev 2015-02-14 21:16:48 UTC
Hit this on world update, ~amd64 laptop xfce build.  Latest pre-9999 libav is 54 but include file has:

#if (LIBAVCODEC_VERSION_MAJOR >= 56)
#include <libavcodec/old_codec_ids.h>
#endif

but the above variable appears nowhere in config.log (or anywhere else).  Still testing...
Comment 2 Stefan Triller 2015-02-25 09:23:32 UTC
I just ran into the same problem while updating my ~amd64 system. Maybe this is related to the use of libav instead of ffmpeg?
Comment 3 Markus Wernig 2015-03-09 10:57:39 UTC
Same here, same error.

I also have -ffmpeg and libav in make.conf
Comment 4 Renee D'Netto 2015-03-22 02:51:22 UTC
Created attachment 399442 [details, diff]
Patch containing updated ebuild and mediastreamer patches

From libav-9.17 libavcodec/old_codec_ids.h:
/*
 * This header exists to prevent new codec IDs from being accidentally added to
 * the deprecated list.
 * Do not include it directly. It will be removed on next major bump
 *
 * Do not add new items to this list. Use the AVCodecID enum instead.
 */

Unsurprisingly, mediastreamer includes it directly and breaks under libav 10+.

This has been fixed upstream [1] in commit a453745c: fix ffmpeg old_codec_ids detection. An additional patch (taken from Debian [2]) is needed for it to compile. (This appears to remove a lot of logic used for the Snow codec - not sure what's going on there.)
This only fixes the problem for mediastreamer 2.9.0 and later - the version in stable will need more work. I'll leave it the maintainer to decide whether those versions should simply depend on older libav, or if it's worth the effort of back-porting the patch.

[1] git://git.linphone.org/mediastreamer2.git
[2] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=739314
Comment 5 Adam Felson 2015-03-27 23:15:52 UTC
I applied the patch successfully;  verified that the ebuilds for 2.9.0 and 2.9.0-r1

It still fails to build.  Like the others, I have +libav -ffmpeg.

The emerge does bring in libav10.

tils/opengles_display.c: In function 'load_shaders':
utils/opengles_display.c:409:2: error: 'yuv2rgb_fs_len' undeclared (first use in this function)
  yuv2rgb_fs_len = yuv2rgb_fs_len;
  ^
utils/opengles_display.c:409:2: note: each undeclared identifier is reported only once for each function it appears in
utils/opengles_display.c:410:2: error: 'yuv2rgb_vs_len' undeclared (first use in this function)
  yuv2rgb_vs_len = yuv2rgb_vs_len;
  ^
utils/opengles_display.c:415:65: error: 'yuv2rgb_vs' undeclared (first use in this function)
  if (!compileShader(&vertShader, GL_VERTEX_SHADER, (const char*)yuv2rgb_vs))
                                                                 ^
utils/opengles_display.c:417:67: error: 'yuv2rgb_fs' undeclared (first use in this function)
  if (!compileShader(&fragShader, GL_FRAGMENT_SHADER, (const char*)yuv2rgb_fs))
                                                                   ^
Makefile:1308: recipe for target 'utils/opengles_display.lo' failed
make[3]: *** [utils/opengles_display.lo] Error 1

....
ideofilters/nowebcam.c: In function 'jpeg2yuv':
videofilters/nowebcam.c:85:2: warning: passing argument 2 of 'avcodec_decode_video2' from incompatible pointer type [enabled by default]
  if (avcodec_decode_video2(&av_context,&orig,&got_picture,&pkt) < 0) {
  ^
In file included from ../src/utils/ffmpeg-priv.h:36:0,
                 from videofilters/nowebcam.c:33:
/usr/include/libavcodec/avcodec.h:3630:5: note: expected 'struct AVFrame *' but argument is of type 'struct AVFrame **'
 int avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture,
     ^
libtool: link: ( cd ".libs" && rm -f "libmediastreamer_base.la" && ln -s "../libmediastreamer_base.la" "libmediastreamer_base.la" )
make[3]: Leaving directory '/var/tmp/portage/media-libs/mediastreamer-2.9.0/work/mediastreamer-2.9.0/src'
Makefile:861: recipe for target 'all' failed
Comment 6 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2015-08-18 20:36:53 UTC
bircoph: ping
Comment 7 Andrew Savchenko gentoo-dev 2015-09-01 07:46:22 UTC
Proposed patch (by Debian) removes Snow encoder support (probably libav have some issues with its API), so I'm unwilling to add this patch, at least unconditionally. Probably libav support should be disabled (and only ffmpeg allowed) or patches should be applied only for USE="libav".

As I can see from comment 5, proposed patches doesn't help with libav so further fixes are needed, I can't verify this myself since I don't use libav and I don't want to break my existing setups by forcefully removing ffmpeg and installing libav for testing. If someone can provide and *test* a patch for libav support I'll apply it (and I authorize any other developer to apply it in such case).

So, proper patch and testing are required.
Comment 8 Nikolaj Šujskij 2015-12-24 20:27:04 UTC
Maybe it's worth simply to bump version up to the one containing the changes?
Comment 9 Markus Wernig 2016-02-26 20:14:16 UTC
fwiw: I have libav-11.4, and mediastreamer will not compile with -ffmpeg +libav.

old_codec_ids.h does not exist anywhere in the file system and is apparently not part of any package.

Simply removing the include statement from src/utils/ffmpeg-priv.h gets further but breaks on multiple "error: ‘CODEC_ID_XXX’ undeclared (first use in this function)" (XXX varies)
Comment 10 Alexis Ballier gentoo-dev 2016-09-05 08:30:03 UTC
commit a90dcab374205a544499e3fc16dc79a6b1ecd208
Author: Alexis Ballier <aballier@gentoo.org>
Date:   Mon Sep 5 10:29:09 2016 +0200

    media-libs/mediastreamer: fix build with ffmpeg-3, part of bug #539872
Comment 11 Mattia Narducci 2017-02-19 19:04:39 UTC
ffmpeg-3 is now marked stable for amd64 and x86 while mediastreamer 2.9.0-r1 (the one that compiles fine against ffmpeg-3) is not
Comment 12 Andreas Sturmlechner gentoo-dev 2017-03-07 23:06:26 UTC
*** Bug 591654 has been marked as a duplicate of this bug. ***
Comment 13 Andreas Sturmlechner gentoo-dev 2019-11-24 10:17:05 UTC
I guess... this... was... fixed then? People, please close bugs when they are solved.