Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 539914 - media-video/ffmpeg2theora-0.29-r2 - src/ffmpeg2theora.h:65:5: error: unknown type name 'ReSampleContext'
Summary: media-video/ffmpeg2theora-0.29-r2 - src/ffmpeg2theora.h:65:5: error: unknown ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: libav-10 ffmpeg-3
  Show dependency tree
 
Reported: 2015-02-12 22:19 UTC by Reto Gantenbein (ganto)
Modified: 2016-09-02 09:13 UTC (History)
1 user (show)

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


Attachments
media-video/ffmpeg2theora-0.29-r2 build.log against media-video/libav-11.2 (ffmpeg2theora-0.29-r2_build.log.xz,2.79 KB, application/x-xz)
2015-02-12 22:21 UTC, Reto Gantenbein (ganto)
Details
Patch to fix the "unknown type name 'ReSampleContext'" error (ffmpeg2theora-0.29-avcodec_decode_audio4-and-libswresample.patch,19.93 KB, patch)
2015-02-12 22:57 UTC, Reto Gantenbein (ganto)
Details | Diff
patch to fix CODEC_ID* bug (ffmpeg2theora-ebuild.patch,501 bytes, patch)
2015-03-13 12:51 UTC, DaggyStyle
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Reto Gantenbein (ganto) 2015-02-12 22:19:15 UTC
media-video/ffmpeg2theora-0.29-r2 fails to build against media-video/libav-11.2

Reproducible: Always

Steps to Reproduce:
1. ACCEPT_KEYWORDS="~amd64" emerge =media-video/libav-11.2 media-video/ffmpeg2theora-0.29-r2
Actual Results:  
gcc -o src/subtitles.o -c -DPACKAGE_VERSION=\"0.29\" -DPACKAGE_STRING=\"ffmpeg2theora-0.29\" -DPACKAGE=\"ffmpeg2theora\" -D_FILE_OFFSET_BITS=64 -march=amdfam10 -O2 -pipe -DHAVE_KATE -DHAVE_OGGKATE -DHAVE_ICONV -I. src/subtitles.c
In file included from src/subtitles.h:7:0,
                 from src/ffmpeg2theora.c:46:
src/ffmpeg2theora.h:65:5: error: unknown type name 'ReSampleContext'
     ReSampleContext *audio_resample_ctx;
     ^
[...]
src/ffmpeg2theora.c: In function 'find_category_for_subtitle_stream':
src/ffmpeg2theora.c:353:10: error: 'CODEC_ID_TEXT' undeclared (first use in this function)
     case CODEC_ID_TEXT:
          ^
src/ffmpeg2theora.c:353:10: note: each undeclared identifier is reported only once for each function it appears in
src/ffmpeg2theora.c:354:10: error: 'CODEC_ID_SSA' undeclared (first use in this function)
     case CODEC_ID_SSA:
          ^
src/ffmpeg2theora.c:355:10: error: 'CODEC_ID_MOV_TEXT' undeclared (first use in this function)
     case CODEC_ID_MOV_TEXT:
          ^
src/ffmpeg2theora.c:360:10: error: 'CODEC_ID_DVD_SUBTITLE' undeclared (first use in this function)
     case CODEC_ID_DVD_SUBTITLE:
          ^
[...]
scons: *** [src/avinfo.o] Error 1
scons: *** [src/ffmpeg2theora.o] Error 1
In file included from src/subtitles.h:7:0,
                 from src/subtitles.c:39:
src/ffmpeg2theora.h:65:5: error: unknown type name 'ReSampleContext'
     ReSampleContext *audio_resample_ctx;
     ^
scons: *** [src/subtitles.o] Error 1
scons: building terminated because of errors.

Expected Results:  
Successful build or note about incompatibility

Portage 2.2.14 (python 2.7.9-final-0, default/linux/amd64/13.0/no-emul-linux-x86/desktop/gnome/systemd, gcc-4.8.3, glibc-2.19-r1, 3.18.6-gentoo x86_64)
=================================================================
System uname: Linux-3.18.6-gentoo-x86_64-AMD_Phenom-tm-_II_X6_1075T_Processor-with-gentoo-2.2
KiB Mem:    16372244 total,   5498372 free
KiB Swap:    4194300 total,   4194300 free
Timestamp of tree: Thu, 12 Feb 2015 02:00:01 +0000
ld GNU ld (Gentoo 2.24 p1.4) 2.24
ccache version 3.1.9 [disabled]
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, 3.4.1
dev-util/ccache:          3.1.9-r4
dev-util/cmake:           2.8.12.2-r1
dev-util/pkgconfig:       0.28-r1
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.10.3-r1, 1.11.6-r1, 1.12.6, 1.13.4, 1.14.1
sys-devel/binutils:       2.24-r3
sys-devel/gcc:            4.8.3
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.4
sys-devel/make:           4.0-r1
sys-kernel/linux-headers: 3.19 (virtual/os-headers)
sys-libs/glibc:           2.19-r1
Repositories: gentoo x11 ruby
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=amdfam10 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/lib/hsqldb /var/spool/munin-async/.ssh"
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.5/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cli-php5.5/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=amdfam10 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fakeroot 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.switch.ch/ftp/mirror/gentoo/ http://de-mirror.org/distro/gentoo/"
LANG="en_US"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j7"
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="/var/lib/layman/x11 /var/lib/layman/ruby"
USE="3dnow 3dnowext X X509 a52 aac aalib acl acpi aio aisleriot alsa amd64 amr apng archive aspell async audio audit avahi bash-completion berkdb bluetooth bonjour bookmarks branding brasero btrfs bzip2 cairo caps ccache cdaudio cdda cddb cdio cdr cdrkit cjk cli clutter colord console corefonts cracklib crypt css cups curl cxx daap dbus dc1394 dconf deskbar device-mapper dga dhcp dia discouraged disk-partition diskio divx dmi dmraid dri drm dts dv dvd dvdr dvi dvipdfm eds emboss emerald enca encode evo exchange exif expat fam fasttrack fat fbcon ffmpeg firefox flac flickr fontconfig fortran ftp fts fts3 fuse gaim gallium gbm gcj gconf gd gdbm gdu gedit geoip gif gimp gimpprint git glamor glib glitz glsa glut gmp gnome gnome-keyring gnome-online-accounts gnome-print gnuplot gnutella gnutls gphoto2 gpm graphics graphviz grilo gs gsf gstreamer gtk gtk3 gtkhtml gudev guile h323 hddtemp hfs hwdb ical iconv icq icu id3tag idn ieee1394 imagemagick imap inherit-graph inkjar introspection ios ipod iptc ipv6 irc ithreads jabber jpeg kate kerberos keymap keyring kpathsea kqemu kvm lame lastfm latex lcms ldap libass libav libnotify libsamplerate libsecret libsexy live llvm-gcc lm_sensors logrotate lvm lzma lzo mad magic map matroska mdadm mdnsresponder-compat midi mjpeg mmap mmx mmxext mng modules mono mp2 mp3 mp4 mpeg msn mtp multilib musepack musicbrainz nautilus ncurses network networking networkmanager nfs nfsidmap nls nntp nolvm1 nolvmstatic nptl nsplugin nss ntfs ntfsprogs nvidia ocamlopt ofx ogg opengl openmp openvg osmesa pam pango parted pcntl pcre pdf pdfimport playlist plotutils png podcast policykit postscript ppds prediction print pstricks pulseaudio python3 qemu qt3support qt4 quicktime rar rdesktop readline resolvconf rtc rtmp rtsp sasl schroedinger science scrobbler sdl secure-delete sendto session shout sip smi smp socialweb soundtouch soup sourceview spell sse sse2 ssh ssl stream subtitles subversion svg symlink systemd taglib tagwriting tcpd telepathy tex4ht tga theora threads threadsonly tiff tk toolkit-scroll-bars totem tracker truetype udev udisks unicode unique upnp upower urandom usb usbredir v4l2 vala vcd vdisk vdpau video vim-syntax virtualbox vlm vnc vorbis vpx vte wav webgl webkit wma wmf wxwidgets x264 xa xanim xattr xcb xcomposite xetex xfs xinerama xml xmldoclet xmp xulrunner xv xvid xvmc youtube zeitgeist zeroconf zlib" ABI_X86="64" ALSA_CARDS="hda-intel" APACHE2_MPMS="worker" 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="3dnow 3dnowext mmx mmxext popcnt sse sse2 sse3 sse4a" CURL_SSL="openssl" 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" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en" OFFICE_IMPLEMENTATION="libreoffice" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python2_7 python3_4" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby20" SANE_BACKENDS="plustek" USERLAND="GNU" VIDEO_CARDS="nouveau vesa" 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, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, SYNC, USE_PYTHON
Comment 1 Reto Gantenbein (ganto) 2015-02-12 22:21:18 UTC
Created attachment 396288 [details]
media-video/ffmpeg2theora-0.29-r2 build.log against media-video/libav-11.2
Comment 2 Reto Gantenbein (ganto) 2015-02-12 22:36:30 UTC
Bug seems to be fixed in upstream repository. See Debian BTS #739237 (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=739237) for more information.
Comment 3 Reto Gantenbein (ganto) 2015-02-12 22:56:39 UTC
Attached the patch mentioned in the Debian bug (slightly adjusted to properly apply). The first build error because of the unknown 'ReSampleContext' type seems to be fixed with this.

However, the "error: 'CODEC_ID_TEXT' undeclared" (and so on) errors remain.
Comment 4 Reto Gantenbein (ganto) 2015-02-12 22:57:37 UTC
Created attachment 396300 [details, diff]
Patch to fix the "unknown type name 'ReSampleContext'" error
Comment 5 DaggyStyle 2015-03-13 12:51:27 UTC
Created attachment 398800 [details, diff]
patch to fix CODEC_ID* bug

this ebuild patch fixes the CODEC_ID* bug
Comment 6 Reto Gantenbein (ganto) 2015-03-18 21:23:16 UTC
They must have changed the API quite a bit... After adding both "fixes", I get another build error:

src/avinfo.c: In function 'json_codec_info':
src/avinfo.c:181:5: warning: 'codec_name' is deprecated (declared at /usr/include/libavcodec/avcodec.h:1065) [-Wdeprecated-declarations]
     } else if (enc->codec_name[0] != '\0') {
     ^
src/avinfo.c:182:9: warning: 'codec_name' is deprecated (declared at /usr/include/libavcodec/avcodec.h:1065) [-Wdeprecated-declarations]
         codec_name = enc->codec_name;
         ^
src/avinfo.c: In function 'json_stream_format':
src/avinfo.c:327:28: error: 'AVStream' has no member named 'r_frame_rate'
                          st->r_frame_rate.num, st->r_frame_rate.den);
                            ^
src/avinfo.c:327:50: error: 'AVStream' has no member named 'r_frame_rate'
                          st->r_frame_rate.num, st->r_frame_rate.den);
                                                  ^
src/avinfo.c: In function 'gen_oshash':
src/avinfo.c:448:18: warning: ignoring return value of 'fread', declared with attribute warn_unused_result [-Wunused-result]
             fread(buffer1, used, 8, file);
                  ^
src/avinfo.c:450:18: warning: ignoring return value of 'fread', declared with attribute warn_unused_result [-Wunused-result]
             fread(buffer1, 8192, 8, file);
                  ^
src/avinfo.c:452:18: warning: ignoring return value of 'fread', declared with attribute warn_unused_result [-Wunused-result]
             fread(&buffer1[8192], 8192, 8, file); 
                  ^
scons: *** [src/avinfo.o] Error 1
scons: *** [src/ffmpeg2theora.o] Error 1
scons: building terminated because of errors.

I think only patching build failures is not really the right solution for this bug. Someone must probably go through the code and adjust it to the new libav API.
Comment 7 Toralf Förster gentoo-dev 2016-02-21 19:48:05 UTC
FWIW -the -r1 enild triggers this (ffmpeg-3 ?) issue:

src/ffmpeg2theora.c: In function 'ff2theora_init':
src/ffmpeg2theora.c:229:25: error: 'PIX_FMT_YUV420P' undeclared (first use in this function)
         this->pix_fmt = PIX_FMT_YUV420P;
                         ^
Comment 8 Hanno Böck gentoo-dev 2016-08-29 10:55:26 UTC
There's now ffmpeg2theora-0.30 in the tree, which seems to work with ffmpeg3. So can we close this bug? (Probably should open a stabilization bug for it as well)
Comment 9 Alexis Ballier gentoo-dev 2016-09-02 09:13:54 UTC
(In reply to Hanno Boeck from comment #8)
> There's now ffmpeg2theora-0.30 in the tree, which seems to work with
> ffmpeg3. So can we close this bug? (Probably should open a stabilization bug
> for it as well)

yep