When installing blender-2.44 with the ffmpeg use flag, the compile fails. If I add -ffmpeg to my package.use file, blender compiles with no problems. Using: blender-2.44 ffmpeg-0.4.9_p20070616-r1 Reproducible: Always Steps to Reproduce: 1. USE="ffmpeg" emerge blender Actual Results: Blender compile fails: Linking program ==> 'blender' /var/tmp/portage/media-gfx/blender-2.44/work/build/linux2/lib/libbf_blenkernel.a(writeffmpeg.o): In function `append_ffmpeg': writeffmpeg.c:(.text+0xf84): undefined reference to `img_convert' /var/tmp/portage/media-gfx/blender-2.44/work/build/linux2/lib/libbf_imbuf.a(anim.o): In function `IMB_anim_absolute': anim.c:(.text+0xc89): undefined reference to `img_convert' collect2: ld returned 1 exit status scons: *** [/var/tmp/portage/media-gfx/blender-2.44/work/build/linux2/bin/blender] Error 1 scons: building terminated because of errors. Expected Results: Blender compiles successfully using: media-gfx/blender-2.44 USE="blender-game ffmpeg jpeg nls openal openexr png -sdl -verse" media-video/ffmpeg-0.4.9_p20070616-r1 USE="X aac encode mmx ogg threads truetype vorbis xvid -a52 (-altivec) -amr -debug -doc -ieee1394 -imlib -network -oss -sdl -test -theora -v4l -x264 -zlib" Blender-2.44 did compile correctly with those same use variables with the previous version of ffmpeg (0.4.9_p20070330).
Add the output from 'emerge --info' please
(In reply to comment #1) > Add the output from 'emerge --info' please > oops, sorry. Portage 2.1.3_rc8 (default-linux/amd64/2006.1, gcc-4.1.2, glibc-2.6-r0, 2.6.22-gentoo-r1 x86_64) ================================================================= System uname: 2.6.22-gentoo-r1 x86_64 AMD Athlon(tm) 64 Processor 2800+ Gentoo Base System release 1.12.10 Timestamp of tree: Mon, 16 Jul 2007 16:30:01 +0000 ccache version 2.4 [enabled] dev-java/java-config: 1.3.7, 2.0.33-r1 dev-lang/python: 2.4.4-r4 dev-python/pycrypto: 2.0.1-r5 dev-util/ccache: 2.4-r7 sys-apps/sandbox: 1.2.18.1 sys-devel/autoconf: 2.13, 2.61-r1 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10 sys-devel/binutils: 2.17 sys-devel/gcc-config: 1.3.16 sys-devel/libtool: 1.5.24 virtual/os-headers: 2.6.22-r1 ACCEPT_KEYWORDS="amd64 ~amd64" AUTOCLEAN="yes" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=athlon64 -O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config" CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/texmf/web2c" CXXFLAGS="-march=athlon64 -O2 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="ccache distlocks metadata-transfer prelink sandbox sfperms strict unmerge-orphans" GENTOO_MIRRORS="http://gentoo.chem.wisc.edu/gentoo/" LANG="en_US" LC_ALL="en_US.iso-8859-1" LINGUAS="en en_US" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="3ds X aac aalib acessibility acl aim alsa amd64 apache2 arts bash-completion berkdb bitmap-fonts blender-game bootstrap bzip2 cdparanoia cdr cli cpudetection cracklib crypt cups curl dbus dhcp double-precision dri dvd dvdr dvdread emacs encode extra-cardsets ffmpeg filepicker firefox foomaticdb fortran gdbm gif gimp glib glitz gnutls gpm grammar gtk hal iconv imagemagick ipv6 isdnlog jack java jpeg kde kdeenablefinal kerberos kig-scripting lame lcms ldap libclamav libg++ mad math midi mikmod mng mozbranding mozdevelop mozilla mp3 mpeg mplayer mpm-peruser mppe-mppc msn mudflap musicbrainz mysql mysqli ncurses njb nls nptl nptlonly nsplugin oav offensive ogg openal openexr opengl openmp pam pcre pdf perl png ppds pppd python qt qt3 qt4 quicktime readline reflection rt2500pci samba session smb sound spell spl ssl svg symlink tcpd thesaurus threads tiff tk truetype truetype-fonts type1-fonts unicode usb vcd visualizations vorbis wifi xcomposite xforms xine xinerama xml xorg xscreensaver xvid yv12 zeroconf" ALSA_CARDS="emu10k1" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_US" USERLAND="GNU" VIDEO_CARDS="nvidia" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
looks like blender doesn't use the swscale interface and instead uses the now deprecated imgconvert one... I'll try to fix it soon.
*** Bug 185696 has been marked as a duplicate of this bug. ***
Created attachment 125324 [details, diff] New local use flag for ffmpeg: swscaler Hi folks, I created a patch to the ffmpeg-0.4.9_p20070616-r1.ebuild that introduces a new use flag "swscaler". Setting USE="-swscaler" and remerging ffmpeg should fix the problems with sws-unaware software for the time being. Regards, Torsten
*** Bug 186091 has been marked as a duplicate of this bug. ***
Created attachment 125886 [details, diff] Make blender use swscale Please try this patch
Tried the patch above and got the following (sorry about the few Finnish strings in the output): Linking library ==> 'libbf_openexr.a' ar: luodaan /var/tmp/portage/media-gfx/blender-2.44/work/build/linux2/lib/libbf_openexr.a Compiling ==> 'messaging.c' Compiling ==> 'GEN_HashedPtr.cpp' Compiling ==> 'GEN_Matrix4x4.cpp' Compiling ==> 'SYS_SingletonSystem.cpp' Compiling ==> 'SYS_System.cpp' Linking library ==> 'libbf_kernel.a' ar: luodaan /var/tmp/portage/media-gfx/blender-2.44/work/build/linux2/lib/libbf_kernel.a Compiling ==> 'creator.c' Linking library ==> 'libblender_creator.a' ar: luodaan /var/tmp/portage/media-gfx/blender-2.44/work/build/linux2/lib/libblender_creator.a Compiling ==> 'buildinfo.c' Linking program ==> 'blender' /var/tmp/portage/media-gfx/blender-2.44/work/build/linux2/lib/libbf_blenkernel.a(writeffmpeg.o): In function `append_ffmpeg': writeffmpeg.c:(.text+0xfa0): undefined reference to `sws_scale' writeffmpeg.c:(.text+0x1207): undefined reference to `sws_getContext' /var/tmp/portage/media-gfx/blender-2.44/work/build/linux2/lib/libbf_imbuf.a(anim.o): In function `IMB_anim_absolute': anim.c:(.text+0xc89): undefined reference to `img_convert' collect2: ld returned 1 exit status scons: *** [/var/tmp/portage/media-gfx/blender-2.44/work/build/linux2/bin/blender] Error 1 scons: building terminated because of errors. !!! ERROR: media-gfx/blender-2.44 failed. Call stack: ebuild.sh, line 1632: Called dyn_compile ebuild.sh, line 983: Called qa_call 'src_compile' ebuild.sh, line 44: Called src_compile blender-2.44.ebuild, line 97: Called die !!! !!! Please add /var/tmp/portage/media-gfx/blender-2.44/work/blender-2.44/scons.config when filing bugs reports to bugs.gentoo.org !!! If you need support, post the topmost build error, and the call stack if relevant. !!! A complete build log is located at '/var/tmp/portage/media-gfx/blender-2.44/temp/build.log'. !!! This ebuild is from an overlay: '/var/local/portage' My emerge --info: Portage 2.1.2.11 (default-linux/amd64/2006.1, gcc-4.1.2, glibc-2.5-r4, 2.6.20-gentoo-r8 x86_64) ================================================================= System uname: 2.6.20-gentoo-r8 x86_64 AMD Athlon(tm) 64 Processor 3800+ Gentoo Base System release 1.12.9 Timestamp of tree: Mon, 06 Aug 2007 10:30:01 +0000 dev-java/java-config: 1.3.7, 2.0.33-r1 dev-lang/python: 2.4.4-r4 dev-python/pycrypto: 2.0.1-r6 sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.61 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10 sys-devel/binutils: 2.17 sys-devel/gcc-config: 1.3.16 sys-devel/libtool: 1.5.23b virtual/os-headers: 2.6.21 ACCEPT_KEYWORDS="amd64" AUTOCLEAN="yes" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=athlon64 -O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/applications/kde /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/applications /usr/share/applications/kde /usr/share/config" CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/php/apache1-php5/ext-active/ /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c" CXXFLAGS="-march=athlon64 -O2 -pipe" DISTDIR="/var/cache/portage/distfiles" FEATURES="distlocks metadata-transfer sandbox sfperms strict" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" LANG="fi_FI.utf8" LINGUAS="fi en en_GB sv" PKGDIR="/var/cache/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/var/cache/portage" PORTDIR_OVERLAY="/var/local/portage /var/local/layman/sunrise" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="7zip X a52 aac acl acpi admin aiglx alsa amd64 amr aotuv apache2 asf audiofile berkdb bitmap-fonts bittorrent bluetooth bzip2 cairo cdparanoia cli connectionstatus cpudetection cracklib crypt css ctype cups daap dbus dia djvu dmi dri dts dv dvd dvdr enca enchant encode exif extrafilters fam fame ffmpeg flac fontconfig foomaticdb fortran fpx ftp gdbm gif glitz gpac gphoto2 gpm graphviz hal history iconv idn ifp imagemagick inkjar ipod ipv6 isdnlog java java5 javascript jbig jikes jingle joystick jpeg jpeg2k kde kipi ladspa latex lcms libg++ libsamplerate live lm_sensors logrotate lzo mad matroska midi mjpeg mmap mng modplug mp2 mp3 mp4 mpeg mplayer mtp mudflap musepack musicbrainz mysql nagios-ping nagios-ssh ncurses network njb nls nptl nptlonly nsplugin odk ogg openal openexr opengl openmp pam pcre pdf perl php pic plotutils png pnm postgres postscript ppds pppd python qt3 quicktime rar readline reflection rtc ruby samba sasl scanner sdl sensord session slp sms sndfile snmp sound sox speex spell spl sql srt srvdir ssl subversion svg syslog tcpd theora tidy tiff tivo tk tmispell truetype truetype-fonts type1-fonts unicode usb utempter vcd vhosts vorbis wavpack webdav wmf x264 xcb xcomposite xine xml xmlrpc xorg xpm xscreensaver xv xvid xvmc yv12 zeroconf zip zlib" 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" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="evdev joystick keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="fi en en_GB sv" USERLAND="GNU" VIDEO_CARDS="nvidia vesa vmware" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LDFLAGS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
The undefined reference to img_convert above is called in blender-2.44/source/blender/imbuf/intern/anim.c and should be easy to fix. The undefined references to sws_scale and sws_getContext in blender-2.44/source/blender/blenkernel/intern/writeffmpeg.c are a bit weirder since the patch adds an include for ffmpeg/swscale.h, which should do.
I get a similar error (blender-2.44 and ffmpeg-0.4.9_p20070616-r1): Linking program ==> 'blender' /var/tmp/portage/media-gfx/blender-2.44/work/build/linux2/lib/libbf_blenkernel.a(writeffmpeg.o): In function `generate_video_frame': source/blender/blenkernel/intern/writeffmpeg.c:329: undefined reference to `sws_scale' source/blender/blenkernel/intern/writeffmpeg.c:323: undefined reference to `sws_getContext' /var/tmp/portage/media-gfx/blender-2.44/work/build/linux2/lib/libbf_imbuf.a(anim.o): In function `ffmpeg_fetchibuf': source/blender/imbuf/intern/anim.c:709: undefined reference to `img_convert' collect2: ld returned 1 exit status scons: *** [/var/tmp/portage/media-gfx/blender-2.44/work/build/linux2/bin/blender] Error 1 scons: building terminated because of errors. # emerge --info Portage 2.1.3.7 (default-linux/x86/2007.0/desktop, gcc-4.2.0, glibc-2.6-r0, 2.6.22-gentoo-r2 i686) ================================================================= System uname: 2.6.22-gentoo-r2 i686 AMD Athlon(tm) XP 2400+ Gentoo Base System release 1.12.10 Timestamp of tree: Sun, 26 Aug 2007 11:20:01 +0000 app-shells/bash: 3.2_p17-r1 dev-java/java-config: 1.3.7, 2.0.33-r1 dev-lang/python: 2.4.4-r5, 2.5.1-r2 dev-python/pycrypto: 2.0.1-r6 sys-apps/baselayout: 1.12.10-r4 sys-apps/sandbox: 1.2.18.1 sys-devel/autoconf: 2.13, 2.61-r1 sys-devel/automake: 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10 sys-devel/binutils: 2.17 sys-devel/gcc-config: 1.4.0-r1 sys-devel/libtool: 1.5.24 virtual/os-headers: 2.6.22-r2 ACCEPT_KEYWORDS="x86 ~x86" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -march=athlon-xp -pipe -ggdb" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config" CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/php/apache2-php4/ext-active/ /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php4/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php4/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/texmf/web2c" CXXFLAGS="-O2 -march=athlon-xp -pipe -ggdb" DISTDIR="/usr/portage/distfiles" FEATURES="collision-protect distlocks fixpackages metadata-transfer parallel-fetch sandbox sfperms splitdebug strict test unmerge-orphans userfetch userpriv usersandbox" GENTOO_MIRRORS="http://gentoo.mirrors.pair.com/ http://gentoo.zie.pg.gda.pl http://gentoo.prz.rzeszow.pl http://gentoo.mirrors.pair.com/ http://gentoo.osuosl.org/ http://gentoo.mirrors.pair.com/ ftp://gentoo.mirrors.pair.com/" LANG="pl_PL.UTF-8" LC_ALL="pl_PL.UTF-8" LINGUAS="pl" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/portage/local/layman/sarven /usr/portage/local/overlay" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" USE="3dnow X a52 aac acl acpi alsa amarok apache2 bash-completion berkdb bitmap-fonts bluetooth branding bzip2 cairo cdparanoia cdr cjk cli cracklib crypt cups dbus dlloader dri dv dvd dvdr dvdread emboss encode evo exif fam fbcon ffmpeg firefox flac foomaticdb fortran gdbm gif glitz gphoto2 gpm gstreamer hal iconv ieee1394 ipv6 irmc isdnlog jabber java java5 javascript jpeg kde kdehiddenvisibility kerberos kipi libnotify mad matroska midi mikmod mime mmx mng mp3 mpeg mplayer mudflap musepack mysql ncurses nls nptl nptlonly nsplugin nvidia offensive ogg openal opengl openmp pam pcre pdf perl png ppds pppd python qt qt3 qt3support qt4 quicktime readline real realmedia reflection sdl session spell spl sse ssl subversion svg tcpd test theora threads tiff truetype truetype-fonts type1-fonts unicode usb vcd videos vorbis win32codecs x264 x86 xcomposite xine xml xorg xprint xscreensaver xv xvid zlib" ALSA_CARDS="intel8x0" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="pl" USERLAND="GNU" VIDEO_CARDS="nvidia none" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
http://projects.blender.org/tracker/?group_id=9&atid=125&func=detail&aid=6940 "Datum: 2007-08-22 05:32 Sender: Stephen Swaney One of the quaint features of the ffmpeg project is that they do not have a published API. This is why we provide ffmpeg in our extern dir. The img_convert() func lives in extern/ffmpeg/libavcodec/imgconvert.c Since the ffmpeg api is a moving target, I'm not sure what we can do about this."
Created attachment 130942 [details, diff] blender-2.44-r1.ebuild remove unneeded ffmpeg garbage
Created attachment 130948 [details, diff] blender-2.44-swscale.patch - take 2 blender-2.44-swscale.patch (+ blender-2.44-r1) libswscale is copied over from GPL mplayer to the LGPLed ffmpeg and linking this makes than blender GPL-only. I am not sure about this stuff, there is zero documentation in the code or elsewhere, but it actualy does the right thing, it compiles and encodes the animations to mpeg quite perfect :-)
Thank you for completing the patch =) I'll commit this soon, would you mind sending the same upstream?
done http://projects.blender.org/tracker/index.php?func=detail&aid=7350&group_id=9&atid=125
In portage