Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 489846 - media-video/ffmpeg - .../work/ffmpeg-1.2.4/libavcodec/arm/dca.h:37:5: error: can’t find a register in class ‘CORE_REGS’ while reloading ‘asm’
Summary: media-video/ffmpeg - .../work/ffmpeg-1.2.4/libavcodec/arm/dca.h:37:5: error: ...
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: ARM Linux
: Normal normal (vote)
Assignee: Gentoo Media-video project
URL: https://trac.ffmpeg.org/ticket/2756
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2013-10-29 23:52 UTC by David Racine
Modified: 2016-02-06 04:03 UTC (History)
2 users (show)

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


Attachments
PATCH: Backported fix to compile using GCC 4.8.1 (ffmpeg_arm_gcc48fix.patch.xz,720 bytes, patch)
2013-10-31 12:24 UTC, David Racine
Details | Diff
ffmpeg-1.2.4.ebuild (ffmpeg-1.2.4.ebuild,8.87 KB, text/plain)
2013-10-31 12:30 UTC, David Racine
Details
PATCH: Backported fix to compile ffmpeg using GCC 4.8.1 on ARM (ffmpeg_arm_gcc48fix.patch,3.99 KB, patch)
2013-10-31 12:33 UTC, David Racine
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Racine 2013-10-29 23:52:02 UTC
libavcodec/arm/dca.h gives a compilation error when building with GCC 4.8.1:

/var/tmp/portage/media-video/ffmpeg-1.2.4/work/ffmpeg-1.2.4/libavcodec/arm/dca.h:37:5: error: can’t find a register in class ‘CORE_REGS’ while reloading ‘asm’

ffmpeg's git has this patch to fix similar issue: https://github.com/FFmpeg/FFmpeg/commit/8067f55edf3719182aed6e5b57b7863889f80218#diff-0052a965e491138d5fd4a9aa76c0cdea

Reproducible: Always

Steps to Reproduce:
Build ffmpeg with GCC 4.7
Comment 1 David Racine 2013-10-29 23:53:14 UTC
Portage 2.2.7 (default/linux/arm/13.0/armv7a/desktop, gcc-4.8.1, glibc-2.17, 3.8.13.11-odroidu2-gentoo armv7l)
=================================================================
System uname: Linux-3.8.13.11-odroidu2-gentoo-armv7l-with-gentoo-2.2
KiB Mem:     2071028 total,    745344 free
KiB Swap:          0 total,         0 free
Timestamp of tree: Tue, 29 Oct 2013 01:15:01 +0000
ld GNU ld (GNU Binutils) 2.23.2
app-shells/bash:          4.2_p45
dev-lang/python:          2.7.5-r4, 3.3.2-r2
dev-util/cmake:           2.8.12
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.3
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6, 1.13.4, 1.14
sys-devel/binutils:       2.23.2
sys-devel/gcc:            4.7.3-r1, 4.8.1-r1
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.9 (virtual/os-headers)
sys-libs/glibc:           2.17
Repositories: gentoo odroid mali-x11
ACCEPT_KEYWORDS="arm ~arm"
ACCEPT_LICENSE="* -@EULA"
CBUILD="armv7a-hardfloat-linux-gnueabi"
CFLAGS="-O2 -pipe -march=armv7-a -mcpu=cortex-a9 -mfpu=neon -mfloat-abi=hard"
CHOST="armv7a-hardfloat-linux-gnueabi"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=armv7-a -mcpu=cortex-a9 -mfpu=neon -mfloat-abi=hard"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe -march=armv7-a"
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 -march=armv7-a"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="fr_CA.UTF-8"
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"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage-overlay/odroid /usr/local/portage-overlay/mali-x11"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="X a52 aac aalib acpi alsa ao arm audiofile avconv bash-completion bazaar berkdb bluetooth branding bzip2 cairo cdda cdr cec cli consolekit cracklib crypt css cvs cxx dbus dri dts dvdr egl emboss emovix encode exif faac fam firefox flac fontconfig fortran gbm gdbm gif git gles gles1 gles2 goom gpm gstreamer gtk gzip highlight iconv ipv6 jpeg jpeg2k lame lcms libcaca libkms libmpeg2 libnotify libv4l lzma lzo mad matroska mercurial midi mmap mng modules mp3 mp4 mpeg mplayer mudflap ncurses neon nfs nls nptl ntp ogg openal opengl openmp openvg pam pango pcre pdf perl png policykit ppds pulseaudio python python3 qt3support qt4 radio readline samba sdl session sharedmem smp smpeg sndfile sox spell sqlite ssl startup-notification static-libs subversion svg tcpd theora threads tiff timidity truetype twolame udev udisks unicode upcall upower usb v4l vorbis wav win32codecs winbind wxwidgets x264 xa xattr xcb xinerama xml xorg xv xvid xvmc xz zlib" 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" 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="evdev lirc" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="fr" LIRC_DEVICES="userspace" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby20" USERLAND="GNU" VIDEO_CARDS="exynos fbdev omap omapfb 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, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 2 David Racine 2013-10-31 12:24:02 UTC
Created attachment 362352 [details, diff]
PATCH: Backported fix to compile using GCC 4.8.1
Comment 3 David Racine 2013-10-31 12:26:21 UTC
Comment on attachment 362352 [details, diff]
PATCH: Backported fix to compile using GCC 4.8.1

Tested to work on my odroid U2 (armv7a) with the provided emerge --info. Did not try the backward compatibility (compile with GCC 4.7)
Comment 4 David Racine 2013-10-31 12:30:23 UTC
Created attachment 362356 [details]
ffmpeg-1.2.4.ebuild

Note that I am not experienced in writing ebuilds and that the patch is currently hosted on my PC, rehost it somewhere else if you adopt it as is.

Thank you.
Comment 5 David Racine 2013-10-31 12:33:08 UTC
Created attachment 362358 [details, diff]
PATCH: Backported fix to compile ffmpeg using GCC 4.8.1 on ARM
Comment 6 Jeroen Roovers (RETIRED) gentoo-dev 2013-10-31 14:34:37 UTC
Comment on attachment 362356 [details]
ffmpeg-1.2.4.ebuild

--- ffmpeg-1.2.4.ebuild 2013-10-28 14:17:17.642337645 +0100
+++ -   2013-10-31 15:33:50.176324017 +0100
@@ -23,6 +23,10 @@
 fi
 FFMPEG_REVISION="${PV#*_p}"
 
+SRC_URI="${SRC_URI} \
+         http://bassdr.servehttp.com/patches/${PN}_arm_gcc48fix.patch.xz
+"
+
 LICENSE="GPL-2 amr? ( GPL-3 ) encode? ( aac? ( GPL-3 ) )"
 SLOT="0"
 if [ "${PV#9999}" = "${PV}" ] ; then
@@ -132,6 +136,7 @@
                export revision=git-N-${FFMPEG_REVISION}
        fi
        epatch_user
+       epatch "${WORKDIR}/${PN}_arm_gcc48fix.patch"
 }
 
 src_configure() {
Comment 7 nebojsa 2014-01-18 12:15:50 UTC
Same problem, same solution for ffmpeg-1.2.5
Comment 8 coffnix 2014-02-09 08:20:21 UTC
This patch solve my problem to compile ffmpeg-1.2.5 on ARMv7
Comment 9 David Racine 2016-02-06 04:03:10 UTC
Earlier versions of ffmpeg are not affected.