When gst-plugins-ffmpeg is compiled with "econf --shared-libraries=no" this error is not encountered, but it's useless as a static library. When launching Miro, "Failed to load plugin" is returned for libgstffmpegscale.so, libgstffmpeg.so and libgstpostproc.so. In addition, that message is followed by "R_PPC_REL24 relocation at ${some-hex-location} for symbol '__memcpy_chk' out of range" Reproducible: Always Steps to Reproduce: 1.attempt to load gstreamer plugin from gst-plugins-ffmpeg 2.R_PPC_REL24 errors are returned 3. Actual Results: GStreamer-WARNING **: Failed to load plugin '/usr/lib/gstreamer-0.10/libgstffmpegscale.so': /usr/lib/libavutil.so.49: R_PPC_REL24 relocation at 0x0be0a8c8 for symbol '__memcpy_chk' out of range and this same message is repeated for the other two mentioned shared libraries Expected Results: Properly load the libraries so that gstreamer may be used to render video. Portage 2.1.6.13 (default/linux/powerpc/ppc32/2008.0, gcc-4.4.1, glibc-2.9_p20081201-r2, 2.6.30-gentoo-r3 ppc) ================================================================= System uname: Linux-2.6.30-gentoo-r3-ppc-7455,_altivec_supported-with-gentoo-2.0.1 Timestamp of tree: Sat, 22 Aug 2009 13:45:02 +0000 distcc 3.1 powerpc-unknown-linux-gnu [disabled] ccache version 2.4 [enabled] app-shells/bash: 4.0_p28 dev-java/java-config: 2.1.8-r1 dev-lang/python: 2.5.4-r2, 2.6.2-r1, 3.1.1 dev-python/pycrypto: 2.0.1-r8 dev-util/ccache: 2.4-r8 dev-util/cmake: 2.6.4-r1 sys-apps/baselayout: 2.0.1 sys-apps/openrc: 0.4.3-r3 sys-apps/sandbox: 2.0 sys-devel/autoconf: 2.13, 2.63-r1 sys-devel/automake: 1.5, 1.6.3, 1.7.9-r1, 1.9.6-r2, 1.10.2, 1.11 sys-devel/binutils: 2.19.1-r1 sys-devel/gcc-config: 1.4.1 sys-devel/libtool: 2.2.6a virtual/os-headers: 2.6.30-r1 ACCEPT_KEYWORDS="ppc ~ppc" ALSA_CARDS="aoa aoa-fabric-layout aoa-onyx aoa-soundbus aoa-soundbus-i2s aoa-tas aoa-toonie powermac usb-audio via82xx" 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 authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache 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" ARCH="ppc" AUTOCLEAN="yes" CBUILD="powerpc-unknown-linux-gnu" CCACHE_DIR="/var/tmp/ccache" CCACHE_SIZE="2G" CFLAGS="-O2 -pipe -mcpu=G4 -maltivec -mabi=altivec -fno-strict-aliasing" CHOST="powerpc-unknown-linux-gnu" CLEAN_DELAY="5" COLLISION_IGNORE="/lib/modules" COLORTERM="Terminal" CONFIG_PROTECT="/etc" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d" CVS_RSH="ssh" CXXFLAGS="-O2 -pipe -mcpu=G4 -maltivec -mabi=altivec -fno-strict-aliasing" DCCC_PATH="/usr/lib/distcc/bin" DISPLAY=":0.0" DISTCC_DIR="/var/tmp/.distcc" DISTCC_LOG="" DISTCC_VERBOSE="" DISTDIR="/usr/portage/distfiles" EDITOR="/bin/nano" ELIBC="glibc" EMERGE_DEFAULT_OPTS="--verbose" EMERGE_WARNING_DELAY="10" FEATURES="ccache distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch" FETCHCOMMAND="/usr/bin/wget -t 5 -T 60 --passive-ftp ${URI} -P ${DISTDIR}" GCC_SPECS="" GDK_USE_XFT="1" GENTOO_MIRRORS="http://open-systems.ufl.edu/mirrors/gentoo http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo" HOME="/home/nathan" HUSHLOGIN="FALSE" INFOPATH="/usr/share/info:/usr/share/binutils-data/powerpc-unknown-linux-gnu/2.19.1/info:/usr/share/gcc-data/powerpc-unknown-linux-gnu/4.3.2/info" INPUT_DEVICES="evdev keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LDFLAGS="-Wl,-O1" LESS="-R -M --shift 5" LESSOPEN="|lesspipe.sh %s" LINGUAS="en_US" LOGNAME="nathan" LS_COLORS="rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.pdf=00;32:*.ps=00;32:*.txt=00;32:*.patch=00;32:*.diff=00;32:*.log=00;32:*.tex=00;32:*.doc=00;32:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:" MAIL="/var/mail/nathan" MAKEOPTS="-j2" MANPATH="/usr/local/share/man:/usr/share/man:/usr/share/binutils-data/powerpc-unknown-linux-gnu/2.19.1/man:/usr/share/gcc-data/powerpc-unknown-linux-gnu/4.3.2/man:/usr/lib/php5/man/" NETBEANS="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml" NOCOLOR="true" OLDPWD="/home/nathan" OPENGL_PROFILE="xorg-x11" PAGER="/usr/bin/less" PATH="/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/powerpc-unknown-linux-gnu/gcc-bin/4.3.2:/usr/games/bin" PKGDIR="/usr/portage/packages" PORTAGE_ARCHLIST="ppc x86-openbsd ppc-openbsd ppc64 x86-winnt x86-fbsd ppc-aix alpha arm x86-freebsd s390 amd64 x86-macos x64-openbsd ia64-hpux hppa x86-netbsd amd64-linux ia64-linux x86 sparc-solaris x64-freebsd sparc64-solaris x86-linux x64-macos sparc m68k-mint ia64 mips ppc-macos x86-interix hppa-hpux amd64-fbsd x64-solaris mips-irix m68k sh x86-solaris sparc-fbsd" PORTAGE_BINHOST_CHUNKSIZE="3000" PORTAGE_BIN_PATH="/usr/lib/portage/bin" PORTAGE_COMPRESS_EXCLUDE_SUFFIXES="css gif htm[l]? jp[e]?g js pdf png" PORTAGE_CONFIGROOT="/" PORTAGE_DEBUG="0" PORTAGE_DEPCACHEDIR="/var/cache/edb/dep" PORTAGE_ELOG_CLASSES="warn error log" PORTAGE_ELOG_MAILFROM="portage@localhost" PORTAGE_ELOG_MAILSUBJECT="[portage] ebuild log for ${PACKAGE} on ${HOST}" PORTAGE_ELOG_MAILURI="root" PORTAGE_ELOG_SYSTEM="save_summary echo" PORTAGE_FETCH_CHECKSUM_TRY_MIRRORS="5" PORTAGE_FETCH_RESUME_MIN_SIZE="350K" PORTAGE_GID="250" PORTAGE_INST_GID="0" PORTAGE_INST_UID="0" PORTAGE_PYM_PATH="/usr/lib/portage/pym" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_RSYNC_RETRIES="3" PORTAGE_TMPDIR="/var/tmp" PORTAGE_TMPFS="/dev/shm" PORTAGE_VERBOSE="1" PORTAGE_WORKDIR_MODE="0700" PORTDIR="/usr/portage" PORT_LOGDIR="" PROFILE_ONLY_VARIABLES="ARCH ELIBC KERNEL USERLAND" PWD="/home/nathan/Desktop" RESUMECOMMAND="/usr/bin/wget -c -t 5 -T 60 --passive-ftp ${URI} -P ${DISTDIR}" ROOT="/" ROOTPATH="/opt/bin:/usr/powerpc-unknown-linux-gnu/gcc-bin/4.4.1" RPMDIR="/usr/portage/rpm" SESSION_MANAGER="local/gentoog4:@/tmp/.ICE-unix/29406,unix/gentoog4:/tmp/.ICE-unix/29406" SHELL="/bin/bash" SHLVL="3" SYNC="rsync://rsync21.us.gentoo.org/gentoo-portage" TERM="xterm" USE="X a52 aac acl alsa altivec avahi berkdb bzip2 cdr clamav cli cracklib crypt cups cxx dbus dga dri dvd dvdr encode ffmpeg flac fortran ftp gdbm gpm gstreamer gtk hal iconv ipv6 isdnlog jpeg libgda libnotify mdnsresponder-compat mime mp3 mpeg mpeg3 mudflap mysql ncurses nls nptl nptlonly ogg openal opengl openmp openssl pam pcre perl php png ppc pppd python readline reflection sdl session sockets speex spl sqlite ssl startup-notification stream subversion svg sysfs syslog tcpd theora truetype unicode v4l v4l2 vm vorbis xcb xml xorg xulrunner xvid zlib" ALSA_CARDS="aoa aoa-fabric-layout aoa-onyx aoa-soundbus aoa-soundbus-i2s aoa-tas aoa-toonie powermac usb-audio via82xx" 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 authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache 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" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en_US" USERLAND="GNU" VIDEO_CARDS="fglrx" USER="nathan" USERLAND="GNU" USE_EXPAND="ALSA_CARDS ALSA_PCM_PLUGINS APACHE2_MODULES APACHE2_MPMS CAMERAS CROSSCOMPILE_OPTS DVB_CARDS ELIBC FCDSL_CARDS FOO2ZJS_DEVICES FRITZCAPI_CARDS INPUT_DEVICES KERNEL LCD_DEVICES LINGUAS LIRC_DEVICES MISDN_CARDS NETBEANS_MODULES QEMU_SOFTMMU_TARGETS QEMU_USER_TARGETS SANE_BACKENDS USERLAND VIDEO_CARDS" USE_EXPAND_HIDDEN="CROSSCOMPILE_OPTS ELIBC KERNEL USERLAND" USE_ORDER="env:pkg:conf:defaults:pkginternal:env.d" VIDEO_CARDS="fglrx" WINDOWID="34198730" WINDOWPATH="8" XAUTHORITY="/home/nathan/.Xauthority" XDG_CONFIG_DIRS="/etc/xdg" XDG_DATA_DIRS="/usr/local/share:/usr/share" XDG_SESSION_COOKIE="3c795acd992264eac71dbf4c493b6d36-1248934477.849537-66614396" _="/usr/bin/emerge"
I'm not a PPC dev, but the equivalent error on x86/amd64 is caused by trying to load a 32bit library into a 64bit address space (which is not possible, at least on x86/amd64).
This is indeed an ffmpeg error. The shared libraries generated by ffmpeg are compiled without the -fPIC CFLAG and thus include R_PPC_REL24 relocations. As mentioned in bug #13032 this is not allowed for shared libraries on ppc. Recompiling ffmpeg with -fPIC fixed the problem for me. The ffmpeg ebuild needs to be fixed.
Re-assigning to ffmpeg maintainers then. Keeping gstreamer@ in CC, gnome@ doesn't need to worry about this (gstreamer is being gradually transitioned to be gstreamer@ only instead of together with gnome@).
please paste a ffmpeg build log, try with 0.5 and latest ~arch do ffplay & ffmpeg work correctly? also try if 'EXTRA_FFMPEG_CONF=--enable-pic emerge -1 ffmpeg' works with ~arch ffmpeg.
Created attachment 205568 [details] ffmpeg build log (latest ~ppc) Attached the build log of ffmpeg 0.5_p19928 (latest ~ppc).
Created attachment 205569 [details] ffmpeg build log with EXTRA_FFMPEG_CONF=--enable-pic the --enable-pic option adds -fPIC to the compiler flags and thus seems to fix the problem.
I tried 0.5-r1 (current ppc stable) where the problem exists. I also tried 0.5_p19928 (latest ~ppc) which still has the same problem. The build also warns about that: * QA Notice: The following files contain runtime text relocations * Text relocations force the dynamic linker to perform extra * work at startup, waste system resources, and may pose a security * risk. On some architectures, the code may not even function * properly, if at all. * For more information, see http://hardened.gentoo.org/pic-fix-guide.xml * Please include the following list of files in your report: * TEXTREL usr/lib/libavcodec.so.52.35.0 * TEXTREL usr/lib/libpostproc.so.51.2.0 * TEXTREL usr/lib/libavformat.so.52.38.0 * TEXTREL usr/lib/libavdevice.so.52.2.0 * TEXTREL usr/lib/libavfilter.so.0.5.0 * TEXTREL usr/lib/libswscale.so.0.7.1 * TEXTREL usr/lib/libavutil.so.50.3.0 ffplay works correctly (didn't test ffmpeg). But the code fails when gstreamer is trying to load the shared libraries as plugin. I then tried the EXTRA_FFMPEG_CONF=--enable-pic which seems to fix the problem by adding -fPIC to the compiler flags. See the attached build logs for the differences.
I got it too. Now, we have to know if it's ppc-only or more complicated than that. If a ppc team member can try to reproduce this bug.
(In reply to comment #8) > I got it too. > Now, we have to know if it's ppc-only or more complicated than that. > > If a ppc team member can try to reproduce this bug. > Honestly, I don't know why this isn't fixed, yet. The fix is quite simple and according to the QA Notice it should be applied on all architectures, not only ppc. Is there any reason to build the shared libraries of ffmpeg without the --enable-pic switch?
(In reply to comment #9) > (In reply to comment #8) > > I got it too. > > Now, we have to know if it's ppc-only or more complicated than that. > > > > If a ppc team member can try to reproduce this bug. > > > > Honestly, I don't know why this isn't fixed, yet. The fix is quite simple and > according to the QA Notice it should be applied on all architectures, not only > ppc. Is there any reason to build the shared libraries of ffmpeg without the > --enable-pic switch? It is upstream default because pic makes ffmpeg *much* slower. As far as I understand it, the ppc problem is not because shared libs have to be pic but because relocations are too "big" when loaded from some libraries (ffplay/ffmpeg seems to work and load the same library). I've added a pic useflag to -9999 ebuild, which means it'll be in the next snapshot and ppc team will be able to use.force it.
I was able to get ffmpeg-0.5-r1 working with USE="X alsa altivec amr dirac encode faac faad gsm hardcoded-tables mp3 schroedinger sdl speex theora vorbis x264 xvid zlib -3dnow -3dnowext -bindist -custom-cflags -debug -doc -ieee1394 -ipv6 -jpeg2k -mmx -mmxext -network -oss -ssse3 -test -threads -v4l -v4l2 -vdpau -vhook -video_cards_nvidia" I'm not sure why and how it's now working because I was using these flags before. Maybe linked to gcc bump ? I don't know. Anyhow, I can't reproduce this bug anymore on my laptop.
I can't reproduce this either. Please re-open the bug if you have this happen again.
*** Bug 304589 has been marked as a duplicate of this bug. ***
I am experiencing REL24 errors as mentioned in this bug running on Linux fernet 2.6.31-gentoo-r6 #3 Thu Feb 18 10:31:49 PST 2010 ppc 7447A, altivec supported PowerBook6,4 GNU/Linux When trying to watch an avi on totem I get (totem:25711): GStreamer-WARNING **: Failed to load plugin '/usr/lib/gstreamer-0.10/libgstffmpeg.so': /usr/lib/gstreamer-0.10/libgstffmpeg.so: R_PPC_REL24 relocation at 0x0c88cfbc for symbol `__errno_location' out of range ffplay shows the file fine without trouble and it is the latest stable ppc and was compiled with USE=pic: $ ffmpeg FFmpeg version SVN-r20373, Copyright (c) 2000-2009 Fabrice Bellard, et al. built on Jun 24 2010 16:34:21 with gcc 4.3.4 configuration: --prefix=/usr --libdir=/usr/lib --shlibdir=/usr/lib --mandir=/usr/share/man --enable-static --enable-shared --cc=powerpc-unknown-linux-gnu-gcc --disable-debug --disable-network --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libx264 --enable-libxvid --enable-libdc1394 --disable-indev=oss --disable-indev=jack --disable-outdev=oss --enable-x11grab --enable-pthreads --enable-libfaad --enable-libspeex --enable-libgsm --enable-libfaac --enable-nonfree --disable-vdpau --disable-vdpau --disable-vaapi --disable-mmx --disable-ssse3 --disable-mmx2 --disable-amd3dnow --disable-amd3dnowext --enable-pic --cpu=7450 --enable-gpl --enable-version3 --enable-postproc --enable-avfilter --enable-avfilter-lavf --disable-stripping --enable-hardcoded-tables libavutil 50. 3. 0 / 50. 3. 0 libavcodec 52.37. 1 / 52.37. 1 libavformat 52.39. 2 / 52.39. 2 libavdevice 52. 2. 0 / 52. 2. 0 libavfilter 1. 4. 1 / 1. 4. 1 libswscale 0. 7. 1 / 0. 7. 1 libpostproc 51. 2. 0 / 51. 2. 0
My previous post was misplaced, the relocation issues were on gst-plugins-ffmpeg, opened a corresponding bug there.