Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 392371 - sci-geosciences/grass-6.4.1 with media-video/ffmpeg-8.* - gsd_img_mpeg.c:69:21: error: »CODEC_TYPE_VIDEO« undeclared (first use in this function)
Summary: sci-geosciences/grass-6.4.1 with media-video/ffmpeg-8.* - gsd_img_mpeg.c:69:2...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Steve Arnold
URL:
Whiteboard:
Keywords:
: 400583 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-11-29 08:48 UTC by jannis
Modified: 2012-04-21 09:08 UTC (History)
6 users (show)

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


Attachments
emerge --info (einfo-ayanta,17.25 KB, text/plain)
2011-11-29 08:49 UTC, jannis
Details
build.log.xz (build.log.xz,168.07 KB, application/x-xz)
2011-11-29 08:55 UTC, jannis
Details
Rename macros (gentoo392371a.patch,1.12 KB, patch)
2011-12-08 09:28 UTC, Martin von Gagern
Details | Diff
Fixed patch from 390827c5 (gentoo392371b.patch,1.83 KB, patch)
2011-12-08 17:18 UTC, Martin von Gagern
Details | Diff
Bzip2ed /var/tmp/portage/sci-geosciences/grass-6.4.1/temp/build.log (build.log.bz2,119.24 KB, application/x-bzip)
2011-12-22 12:27 UTC, Juergen Rose
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jannis 2011-11-29 08:48:42 UTC
After upgrading media-video/ffmpeg from 0.7.8 to 0.8.7,
sci-geosciences/grass-6.4.1 fails to compile. emerge --info and build.log will be
attached.

USE-flag ffmpeg on grass is set. I assume that disabling it will help but it
compiled fine against the older version of ffmpeg.

Reproducible: Always
Comment 1 jannis 2011-11-29 08:49:00 UTC
Created attachment 294145 [details]
emerge --info
Comment 2 jannis 2011-11-29 08:55:07 UTC
Created attachment 294147 [details]
build.log.xz

Uncompressed build.log is about 4.8MB

Search for "Fehler". grass' build system is quite verbose and there are many warnings to the actual error is well hidden.
Comment 3 jannis 2011-11-29 08:57:06 UTC
Reference to #390827 ([PATCH] sci-geosciences/grass-6.4.1: libav support) has been added since a possible path has to cooperate with the patch mentioned there.
Comment 4 Martin von Gagern 2011-11-30 10:04:31 UTC
Looks like the same issue here. Essence of the build log:

gsd_img_mpeg.c: In function ‘write_video_frame’:
gsd_img_mpeg.c:218:15: error: ‘PKT_FLAG_KEY’ undeclared (first use in this function)
Comment 5 Juergen Rose 2011-11-30 11:56:28 UTC
I have the same issue. And the patch from comment 3 did not remove the problem for me.
Comment 6 jannis 2011-11-30 12:13:10 UTC
(In reply to comment #5)
> I have the same issue. And the patch from comment 3 did not remove the problem
> for me.

The patch is not meant to fix the problem. It's mentioned since it makes grass compatible to libav which is a fork of ffmpeg.
Comment 7 Jeroen Roovers (RETIRED) gentoo-dev 2011-12-04 03:51:51 UTC
Next time please create build logs using LC_ALL=C.
Comment 8 Martin von Gagern 2011-12-08 09:28:30 UTC
Created attachment 295177 [details, diff]
Rename macros

This patch fixes the issue for me. Although I wrote it independently, it turns out to be a subset of the patch from bug #390827 comment #5.

Relevant upstream commits, as far as I can tell:

http://git.videolan.org/?p=ffmpeg.git;a=commit;h=8f3f2e067605b6ef
  Add AV_PKT_FLAG_KEY and deprecate PKT_FLAG_KEY.

http://git.videolan.org/?p=ffmpeg.git;a=commit;h=72415b2adb2c25f9
  Define AVMediaType enum, and use it instead of enum CodecType, which
  is deprecated and will be dropped at the next major bump.

http://git.videolan.org/?p=ffmpeg.git;a=commit;h=3453a231a6cebe59
  lavc: remove misc disabled cruft.
Comment 9 Martin von Gagern 2011-12-08 17:18:25 UTC
Created attachment 295203 [details, diff]
Fixed patch from 390827c5

(In reply to comment #8)
> This patch fixes the issue for me.

Dunno why I thought this worked, because when I try to reproduce my success, it turns out that the compiler is satisfied but the linker is not, complaining about guess_format and av_alloc_format_context. Those are exactly the parts from bug #390827 comment #5 I had omitted, so I gave that patch another try.

Surprisingly, I still got the same errors. Took me quite a while to figure out that an extra newline after the third hunk was confusing patch: it ignored all subsequent text without so much as a warning, unless one passed --verbose on the command line. The attached patch has that line removed, so it will apply in full. With this patch in place (simply dropped into the /etc/portage/patches/sci-geosciences/grass-6.4.1 directory thanks to epatch_user), grass emerges all right for me using media-video/ffmpeg-0.8.7. Don't forget to credit Fabio Erculiani as the original author of the patch; I really only did a minor fix.
Comment 10 Juergen Rose 2011-12-09 12:36:22 UTC
What about bringing a patched version into the regular portage tree?
Comment 11 Juergen Rose 2011-12-22 12:26:25 UTC
I tried the patch, but 'emerge grass' still fails for me because of undefined reference to `guess_format' and `av_alloc_format_context' in .../grass-6.4.1/dist.x86_64-pc-linux-gnu/lib/libgrass_ogsf.so. I have ffmpeg-0.9. A bzipped build.log will be attached. 

root@moose:/home/rose(112)# emerge --info =sci-geosciences/grass-6.4.1
Portage 2.1.10.41 (default/linux/amd64/10.0/desktop, gcc-4.5.3, glibc-2.14.1-r1, 3.1.5-gentoo x86_64)
=================================================================
                        System Settings
=================================================================
System uname: Linux-3.1.5-gentoo-x86_64-Intel-R-_Core-TM-2_Quad_CPU_Q9650_@_3.00GHz-with-gentoo-2.1
Timestamp of tree: Wed, 21 Dec 2011 17:30:01 +0000
app-shells/bash:          4.2_p20
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.2-r3::sage-on-gentoo, 3.2.2
dev-util/cmake:           2.8.6-r4
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.1
sys-apps/openrc:          0.9.7
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.9.6-r3, 1.10.3, 1.11.1-r1
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.5.3-r2
sys-devel/gcc-config:     1.5-r2
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 3.1 (virtual/os-headers)
sys-libs/glibc:           2.14.1-r1
Repositories: gentoo x11 arcon qting-edge bicatali sage-on-gentoo java-overlay sunrise science x-portage x-cpan g-octave
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA PUEL dlj-1.1 skype-eula googleearth AdobeFlash-10.1 cadsoft Oracle-BCLA-JavaSE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.0/conf /usr/share/openvpn/easy-rsa /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/apache2-php5.4/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/php/cli-php5.4/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="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-march=native -O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="de fr"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/x11 /var/lib/layman/arcon /var/lib/layman/qting-edge /var/lib/layman/bicatali /var/lib/layman/sage-on-gentoo /var/lib/layman/java-overlay /var/lib/layman/sunrise /var/lib/layman/science /usr/local/portage /var/lib/cpan /var/lib/g-octave"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="64bit R X Xaw3d a52 aac abiword acl acpi admin afs alsa amd64 ao apache2 applet archive arpack asf aspell assistant atlas audacious audiofile automap automount bash-completion beagle berkdb blas blast bluetooth boo boost branding bzip2 cairo cdda cddb cdf cdio cdparanoia cdr cg cgi chm cli consolekit corba cracklib crypt css cuda cups curl cxx daap db dbase dbi dbm dbus declarative designer devhelp device-mapper dga dia djvu doc dri ds2490 ds9097 ds9097u dts dv dvb dvd dvdr dvi dynamicplugin eds elf emacs emboss emf encode epiphany evo examples exif expat extensions extra extras fam fame ffmpeg fftw firefox fits flac fltk fontconfig foomaticdb fortran fortran95 fpx fts3 fuse galago garmin gcj gd gdal gdbm gdu gedit geoip geolocation geos gfortran gif gimp ginac git glade glib glpk gml gmp gmtsuppl gnome gnome-keyring gnome-print gnuplot gnutls gphoto2 gpm grammar graphics graphtft graphviz grass gs gsl gsm gstreamer gtk gudev guile harness hddtemp hdf hdf5 hdri http httpd hvm hwdb iconv icq icu id3 ide imagemagick imap innodb inotify ipod ipv6 irda ithreads jabber jadetex java java6 jbig john jpeg jpeg2k kdrive kerberos kpathsea kqemu kvm ladspa lame lapack latex latex3 lcms ldap lensfun libffi libgda libnotify libsamplerate lirc lm_sensors lua lzo mad mail maildir mapnik math matroska mkl mmx mmxext mng modules mono moonlight motif mozilla mp3 mp4 mpeg mpi mplayer mtp mudflap multilib musicbrainz mysql mysqli nautilus ncurses neXt netcdf netpbm network networking networkmanager nfs nls nntp nptl nptlonly nsplugin ntfs ntp numpy nvidia obex objc ocaml ocr octave odbc ogdi ogg ole openexr opengl openmp overview pae pam pango pcre pda pdf perl plotutils plugins png podcast policykit portaudio posix postgres postscript ppds pppd preview-latex proj projectx pstricks pulseaudio python python-bindings q16 q32 qemu qhull qt3support qt4 quicktime readline reiserfs reports rle romio rpc rrdcgi rrdtool sage samba sasl science sdk sdl secure-delete semantic-desktop server session sip slang slp smbclient smp sms sndfile snmp soup sox speex spell sql sqlite sse sse2 sse4 ssl ssse3 startup-notification stlport subtitles subversion suexec svg svm swig sysfs szip t1lib tcl tcpd tex tex4ht texmacs tgif theora threads thunderbird tidy tiff tk tools truetype udev unicode usb userlocales utempter v4l2 vaapi video virtualbox vorbis wav webdav webdav-serf webkit wifi wmf wxwidgets x264 xattr xcb xemacs xext xft xine xml xmlreader xmlrpc xorg xpm xulrunner xv xvid xvmc yaml zlib zvbi" ALSA_CARDS="intel8x0" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgid dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan stage tables krita karbon braindump" CAMERAS="canon" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" 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 ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de fr" NETBEANS_MODULES="apisupport cnd dlight enterprise ergonomics groovy gsf harness ide identity j2ee java mobility nb php profiler ruby websvccommon xml" PHP_TARGETS="php5-3" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nv 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

=================================================================
                        Package Settings
=================================================================

sci-geosciences/grass-6.4.1 was built with the following:
USE="X cairo cxx ffmpeg fftw jpeg motif (multilib) mysql nls odbc opengl png postgres python readline sqlite tiff truetype wxwidgets -debug -gmath"



root@moose:/home/rose(114)# emerge -pqv =sci-geosciences/grass-6.4.1
[ebuild   R   ] sci-geosciences/grass-6.4.1  USE="X cairo cxx ffmpeg fftw jpeg motif mysql nls odbc opengl png postgres python readline sqlite tiff truetype wxwidgets -debug -gmath"
Comment 12 Juergen Rose 2011-12-22 12:27:31 UTC
Created attachment 296651 [details]
Bzip2ed /var/tmp/portage/sci-geosciences/grass-6.4.1/temp/build.log
Comment 13 Martin von Gagern 2011-12-22 15:43:25 UTC
(In reply to comment #12)
> Created attachment 296651 [details]
> Bzip2ed /var/tmp/portage/sci-geosciences/grass-6.4.1/temp/build.log

Quoting from that log:
 * Applying gentoo392371a.patch
Looks like you were using the obsolete patch from comment #8, not the latest one from comment #9.

(In reply to comment #11)
> I tried the patch, but 'emerge grass' still fails for me because of undefined
> reference to `guess_format' and `av_alloc_format_context' in
> .../grass-6.4.1/dist.x86_64-pc-linux-gnu/lib/libgrass_ogsf.so.

Sounds like the problems I mentioned in comment #9, which caused me to obsolete my previous patch and offer a better one to address them as well.

Steps to build grass with the latest patch without using a portage overlay:
# mkdir -p /etc/portage/patches/sci-geosciences/grass-6.4.1
# wget -O /etc/portage/patches/sci-geosciences/grass-6.4.1/gentoo392371b.patch \
  'https://bugs.gentoo.org/attachment.cgi?id=295203'
# emerge -1 grass

(In reply to comment #10)
> What about bringing a patched version into the regular portage tree?

I very much hope that Gentoo maintainers for grass will do so pretty soon, thus obsoleting the above instructions. When they do, you might have to delete the downloaded patch.
Comment 14 Juergen Rose 2011-12-28 15:34:23 UTC
The patch from Comment 9 works for me.
Comment 15 Samuli Suominen (RETIRED) gentoo-dev 2012-01-24 11:28:07 UTC
*** Bug 400583 has been marked as a duplicate of this bug. ***
Comment 16 jannis 2012-03-26 10:24:27 UTC
Patch from Comment 9 works perfectly with grass-6.4.1-r1 . Can we please have it in the official tree?
Comment 17 jannis 2012-04-21 08:29:27 UTC
Sorry to bump this again but I just hit it again (trying to rebuild grass due to changed profile-default USE-flags.
What stops this (patch from #9) from going into the official tree?
Comment 18 Tomáš Chvátal (RETIRED) gentoo-dev 2012-04-21 09:08:24 UTC
Fixed in cvs thanks for the patches.