Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 547440 - media-video/motion-3.2.12-r2 should require USE=libav
Summary: media-video/motion-3.2.12-r2 should require USE=libav
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-22 22:02 UTC by A.J.
Modified: 2015-06-24 20:09 UTC (History)
2 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 A.J. 2015-04-22 22:02:38 UTC
After a full emerge to fix the recent change removing libav from the default ffmpeg implementation, I found that media-video/motion stopped working with a segfault.  I tried twice to restart.  From dmesg:

apalmer@tobiko ~ $ dmesg |grep motion
[  712.237763] motion[4262]: segfault at 0 ip 00007fbad7c6df48 sp 00007fbad4cb59d0 error 6 in libavformat.so.55.33.100[7fbad7bc4000+16a000]
[41974.218508] motion[22140]: segfault at 0 ip 00007f59be079f48 sp 00007f59bb0c19d0 error 6 in libavformat.so.55.33.100[7f59bdfd0000+16a000]
[151284.705398] motion[6501]: segfault at 0 ip 00007ff0394541b6 sp 00007ff03652d9f0 error 6 in libavformat.so.55.33.100[7ff0393bc000+14f000]

Every time this was from trying to create a video from the jpgs.  Even "emerge -e world" didn't fix this.

I turned on the useflag libav in make.conf, ran "emerge -auDN world," and the problem went away.

motion-3.2.12-r2 is old code and upstream pretty much says "download this version of ffmpeg ONLY".  libav is still compatible for the time being.
Comment 1 A.J. 2015-04-22 22:03:51 UTC
emerge --info after I rebuilt with USE=libav


Portage 2.2.18 (python 2.7.9-final-0, hardened/linux/amd64, gcc-4.8.4-hardenednopiessp, glibc-2.19-r1, 3.18.9-hardened x86_64)
=================================================================
System uname: Linux-3.18.9-hardened-x86_64-Intel-R-_Core-TM-_i5-3470_CPU_@_3.20GHz-with-gentoo-2.2
KiB Mem:    16123440 total,   1905980 free
KiB Swap:    4209016 total,   4188908 free
Timestamp of repository gentoo: Wed, 22 Apr 2015 19:30:01 +0000
sh bash 4.2_p53
ld GNU ld (Gentoo 2.24 p1.4) 2.24
app-shells/bash:          4.2_p53::gentoo
dev-java/java-config:     2.2.0::gentoo
dev-lang/perl:            5.20.2::gentoo
dev-lang/python:          2.7.9-r1::gentoo, 3.3.5-r1::gentoo
dev-util/cmake:           2.8.12.2-r1::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.13.11::gentoo
sys-apps/sandbox:         2.6-r1::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69::gentoo
sys-devel/automake:       1.11.6-r1::gentoo, 1.13.4::gentoo
sys-devel/binutils:       2.24-r3::gentoo
sys-devel/gcc:            4.8.4::gentoo
sys-devel/gcc-config:     1.7.3::gentoo
sys-devel/libtool:        2.4.6::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 3.18::gentoo (virtual/os-headers)
sys-libs/glibc:           2.19-r1::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000

ajp
    location: /usr/local/portage
    sync-type: git
    sync-uri: /home/apalmer/git/portage
    masters: gentoo
    priority: 50

fouxlay
    location: /var/lib/layman/fouxlay
    sync-type: laymansync
    sync-uri: https://github.com/foux/fouxlay.git
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/easy-rsa /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.0/conf"
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"
CXXFLAGS="-O2 -pipe -march=native"
DISTDIR="/usr/portage/distfiles"
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://distfiles.gentoo.org"
LANG="en_US.utf8"
LC_ALL="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
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"
PORTAGE_TMPDIR="/var/tmp"
USE="aac acl amd64 apache2 bash-completion bzip2 cli cracklib crypt cxx dbus dri exif ffmpeg gd gdbm hald hardened iconv imagemagick ipv6 jpeg justify libav mmx mmxext modules mp3 multilib mysql ncurses nls nptl openmp pam pax_kernel pcre pdo php png readline sdl session sse sse2 ssl tcpd tiff tty-helpers unicode unzip urandom xattr xml xtpax zip 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="alias auth_basic authn_file authz_host authz_user cgi dir env log_config mime mime_magic proxy proxy_http rewrite status threads" 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="mmx mmxext sse sse2" 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" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby19 ruby20" USERLAND="GNU" VIDEO_CARDS="intel" 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, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 2 Lukas Dzunko 2015-05-28 15:49:43 UTC
Hello AJ

I hit same bug, but I resolved it in different way. Can you please attach output from following commands to see if it is same problem ?

hekate ~ # eix -Ic libav
No matches found.

hekate ~ # eix -Ic ffmpeg
[I] media-video/ffmpeg (1.2.6-r1{tbz2}@05/01/2015): Complete solution to record, convert and stream audio and video. Includes libavcodec
[I] virtual/ffmpeg (9-r1{tbz2}@08/07/2014): Virtual package for FFmpeg executable implementation
Found 2 matches.

hekate ~ # ldd /usr/bin/motion | grep libav
        libavformat.so.54 => /usr/lib64/libavformat.so.54 (0x00007fb06d059000)
        libavcodec.so.54 => /usr/lib64/libavcodec.so.54 (0x00007fb06c298000)
        libavutil.so.52 => /usr/lib64/libavutil.so.52 (0x00007fb06c064000)

In my installation all files belong to media-video/ffmpeg-1.2.6-r1 (you can use equery b to check).

hekate ~ # for a in /usr/lib64/libavformat.so.54 /usr/lib64/libavcodec.so.54 /usr/lib64/libavutil.so.52; do equery b $a; done
 * Searching for /usr/lib64/libavformat.so.54 ...
media-video/ffmpeg-1.2.6-r1 (/usr/lib64/libavformat.so.54.63.104)
media-video/ffmpeg-1.2.6-r1 (/usr/lib64/libavformat.so.54 -> libavformat.so.54.63.104)
 * Searching for /usr/lib64/libavcodec.so.54 ...
media-video/ffmpeg-1.2.6-r1 (/usr/lib64/libavcodec.so.54 -> libavcodec.so.54.92.100)
media-video/ffmpeg-1.2.6-r1 (/usr/lib64/libavcodec.so.54.92.100)
 * Searching for /usr/lib64/libavutil.so.52 ...
media-video/ffmpeg-1.2.6-r1 (/usr/lib64/libavutil.so.52.18.100)
media-video/ffmpeg-1.2.6-r1 (/usr/lib64/libavutil.so.52 -> libavutil.so.52.18.100)

I faced problems with motion once I upgraded ffmpeg to media-video/ffmpeg-2.2.14. Following message occurred shortly after motion startup:

May 01 14:13:19 [kernel] [   31.864388] motion[2812]: segfault at 0 ip 00007f04c5575fb8 sp 00007f04c20f48c0 error 6 in libavformat.so.55.33.100[7f04c54c7000+174000]
May 01 14:16:12 [kernel] [   68.791094] motion[2822]: segfault at 0 ip 00007f8547559fb8 sp 00007f85440d88c0 error 6 in libavformat.so.55.33.100[7f85474ab000+174000]
May 01 14:19:56 [kernel] [  293.222526] motion[3541]: segfault at 0 ip 00007ff724e3afb8 sp 00007ff7219b98c0 error 6 in libavformat.so.55.33.100[7ff724d8c000+174000]
May 01 14:49:26 [kernel] [ 2062.894626] motion[9048]: segfault at 0 ip 00007fbc0394efb8 sp 00007fbc004cd8c0 error 6 in libavformat.so.55.33.100[7fbc038a0000+174000]

After downgrade of ffmpeg back to media-video/ffmpeg-1.2.6-r1 problem disappear ...

I think there may be compatibility problem with ffmpeg-2.*

Lukas
Comment 3 A.J. 2015-05-28 21:06:34 UTC
About two weeks ago I was completely unable to compile motion on my system with libav.  When I saw that the project had not been updated in 5 years, and learned that libav changes its API fairly frequently, I decided it was abandonware and switched to www-misc/zoneminder which at least allowed me to re-add other applications that work better with ffmpeg.

I would propose that motion be taken out of the portage tree, but if it's not time (there are a few more active git forks) then I can attempt to at least build it again and see what happens.
Comment 4 Lukas Dzunko 2015-05-29 20:59:04 UTC
That's bit strange. As I know motion should be build against ffmpeg not libav. I'll review it bit more and post results.

ZoneMinder looks good but it is bit overkill for me. I prefer to stay with motion if possible.
Comment 5 Pacho Ramos gentoo-dev 2015-06-24 20:09:10 UTC
+*motion-3.2.12-r3 (24 Jun 2015)
+
+  24 Jun 2015; Pacho Ramos <pacho@gentoo.org> +motion-3.2.12-r3.ebuild:
+  Use new ffmpeg/libav USEs style, autoreconf is needed after applying the
+  patches (#552224 by Marcin Jurkowski), use readme.gentoo.eclass.
+