FTBFS with AltiVec on ppc64el

Bug #1263802 reported by Dimitri John Ledkov on 2013-12-23
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libav (Ubuntu)
High
Reinhard Tartler
mythtv (Ubuntu)
Undecided
Unassigned

Bug Description

gcc -Llibavcodec -Llibavdevice -Llibavfilter -Llibavformat -Llibavresample -Llibavutil -Llibswscale -Wl,-z,relro -Wl,--as-needed -Wl,--warn-common -Wl,-rpath-link=libswscale:libavfilter:libavdevice:libavformat:libavcodec:libavutil:libavresample -o avconv avconv_opt.o avconv_filter.o avconv.o cmdutils.o -lavdevice -lavfilter -lavformat -lavresample -lavcodec -lswscale -lavutil -ldl -lXfixes -lXext -lX11 -lcdio_paranoia -lcdio_cdda -lcdio -ljack -lasound -ldc1394 -lraw1394 -lgcrypt -lxvidcore -lvpx -lvpx -lvorbisenc -lvorbis -logg -ltheoraenc -ltheoradec -logg -lspeex -lschroedinger-1.0 -lrtmp -lz -lgnutls -lpulse-simple -lpulse -lopus -lopenjpeg -lmp3lame -lgsm -lgnutls -lva -lm -pthread -lbz2 -lz
gcc -Llibavcodec -Llibavdevice -Llibavfilter -Llibavformat -Llibavresample -Llibavutil -Llibswscale -Wl,-z,relro -Wl,--as-needed -Wl,--warn-common -Wl,-rpath-link=libswscale:libavfilter:libavdevice:libavformat:libavcodec:libavutil:libavresample -o avplay avplay.o cmdutils.o -lavdevice -lavfilter -lavformat -lavresample -lavcodec -lswscale -lavutil -ldl -lXfixes -lXext -lX11 -lcdio_paranoia -lcdio_cdda -lcdio -ljack -lasound -ldc1394 -lraw1394 -lgcrypt -lxvidcore -lvpx -lvpx -lvorbisenc -lvorbis -logg -ltheoraenc -ltheoradec -logg -lspeex -lschroedinger-1.0 -lrtmp -lz -lgnutls -lpulse-simple -lpulse -lopus -lopenjpeg -lmp3lame -lgsm -lgnutls -lva -lm -pthread -lbz2 -lz -lSDL
gcc -Llibavcodec -Llibavdevice -Llibavfilter -Llibavformat -Llibavresample -Llibavutil -Llibswscale -Wl,-z,relro -Wl,--as-needed -Wl,--warn-common -Wl,-rpath-link=libswscale:libavfilter:libavdevice:libavformat:libavcodec:libavutil:libavresample -o avprobe avprobe.o cmdutils.o -lavdevice -lavfilter -lavformat -lavresample -lavcodec -lswscale -lavutil -ldl -lXfixes -lXext -lX11 -lcdio_paranoia -lcdio_cdda -lcdio -ljack -lasound -ldc1394 -lraw1394 -lgcrypt -lxvidcore -lvpx -lvpx -lvorbisenc -lvorbis -logg -ltheoraenc -ltheoradec -logg -lspeex -lschroedinger-1.0 -lrtmp -lz -lgnutls -lpulse-simple -lpulse -lopus -lopenjpeg -lmp3lame -lgsm -lgnutls -lva -lm -pthread -lbz2 -lz
gcc -Llibavcodec -Llibavdevice -Llibavfilter -Llibavformat -Llibavresample -Llibavutil -Llibswscale -Wl,-z,relro -Wl,--as-needed -Wl,--warn-common -Wl,-rpath-link=libswscale:libavfilter:libavdevice:libavformat:libavcodec:libavutil:libavresample -Wl,-E -o avserver avserver.o cmdutils.o -lavdevice -lavfilter -lavformat -lavresample -lavcodec -lswscale -lavutil -ldl -lXfixes -lXext -lX11 -lcdio_paranoia -lcdio_cdda -lcdio -ljack -lasound -ldc1394 -lraw1394 -lgcrypt -lxvidcore -lvpx -lvpx -lvorbisenc -lvorbis -logg -ltheoraenc -ltheoradec -logg -lspeex -lschroedinger-1.0 -lrtmp -lz -lgnutls -lpulse-simple -lpulse -lopus -lopenjpeg -lmp3lame -lgsm -lgnutls -lva -lm -pthread -lbz2 -lz
/usr/bin/ld: libavcodec/libavcodec.a(fft_altivec_s.o): ABI version 1 is not compatible with ABI version 2 output
/usr/bin/ld: failed to merge target specific data of file libavcodec/libavcodec.a(fft_altivec_s.o)
collect2: error: ld returned 1 exit status
make[1]: *** [avserver] Error 1

Porting required?

tags: added: altivec ppc64el
Revision history for this message
Breno Leitão (breno-leitao) wrote :

Yep, it seems that the file libavcodec/ppc/asm.S needs to be ported to ABI v2. Let me work internally at IBM to do a patch for it.

Revision history for this message
Thierry FAUCK (thierry-j) wrote :

Here is a patch for the ABI v2:

--- libav-9.10.orig/libavcodec/ppc/asm.S
+++ libav-9.10/libavcodec/ppc/asm.S
@@ -36,12 +36,20 @@

 .macro extfunc name
     .global X(\name)
+#if _CALL_ELF == 2
+ .text
+X(\name):
+ addis %r2,%r12,.TOC.-X(\name)@ha
+ addi %r2,%r2,.TOC.-X(\name)@l
+ .localentry (\name),-X(\name)
+#else
     .section .opd, "aw"
 X(\name):
     .quad L(\name), .TOC.@tocbase, 0
     .previous
     .type X(\name), STT_FUNC
 L(\name):
+#endif
 .endm

 .macro movrel rd, sym, gp

Revision history for this message
Daniel T Chen (crimsun) wrote :

For mythtv (and probably libav, too), this build still fails on ppc64el in Ubuntu 14.04 with the above changes:

...
AS libavcodec/ppc/fft_altivec_s.o
libavcodec/ppc/fft_altivec_s.S: Assembler messages:
libavcodec/ppc/fft_altivec_s.S:448: Error: expected comma after name `' in .localentry directive
libavcodec/ppc/fft_altivec_s.S:449: Error: expected comma after name `' in .localentry directive
make[4]: *** [libavcodec/ppc/fft_altivec_s.o] Error 1

[See https://launchpadlibrarian.net/162444884/buildlog_ubuntu-trusty-ppc64el.mythtv_2%3A0.27.0%2Bfixes.20130919.5b917e8-0ubuntu4_FAILEDTOBUILD.txt.gz]

Changed in mythtv (Ubuntu):
status: New → Confirmed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mythtv - 2:0.27.0+fixes.20130919.5b917e8-0ubuntu4

---------------
mythtv (2:0.27.0+fixes.20130919.5b917e8-0ubuntu4) trusty; urgency=low

  * Use patch for altivec ABI v2, resolving FTBFS on ppc64el.
    (LP: #1263802)
 -- Daniel T Chen <email address hidden> Tue, 14 Jan 2014 10:44:59 -0500

Changed in mythtv (Ubuntu):
status: Confirmed → Fix Released
Daniel T Chen (crimsun) on 2014-01-14
Changed in mythtv (Ubuntu):
status: Fix Released → Confirmed
Revision history for this message
Mario Limonciello (superm1) wrote :

This appears to be fixed in libav in Trusty by now. The patch got accidentally clobbered for mythtv, will add it back soon.

Revision history for this message
Logan Rosen (logan) wrote :

Looks like this popped up again with libav 6:10.1-1: https://launchpad.net/ubuntu/+source/libav/6:10.1-1/+build/6034328

Changed in libav (Ubuntu):
status: New → Triaged
importance: Undecided → High
Revision history for this message
Dimitri John Ledkov (xnox) wrote : Re: [Bug 1263802] Re: FTBFS with altivec on ppc64el

On 23 May 2014 05:11, Logan Rosen <email address hidden> wrote:
> Looks like this popped up again with libav 6:10.1-1:
> https://launchpad.net/ubuntu/+source/libav/6:10.1-1/+build/6034328
>

First I enabled altivec, that FTBFS. Then I've tried applying a patch
for ELFv2 compat, that still FTBFS. I am not sure if altivec is
operational properly, or support on libav on ppc64el yet.

--
Regards,

Dimitri.

Logan Rosen (logan) on 2014-05-26
summary: - FTBFS with altivec on ppc64el
+ FTBFS with AltiVec on ppc64el
Revision history for this message
Reinhard Tartler (siretart) wrote :

What about this workaround for now:

diff --git a/configure b/configure
@@ -3673,6 +3678,11 @@ elif enabled ppc; then
     check_inline_asm ppc4xx '"maclhw r10, r11, r12"'
     check_inline_asm xform_asm '"lwzx %1, %y0" :: "Z"(*(int*)0), "r"(0)'

+ # cf. https://bugs.launchpad.net/bugs/1263802
+ if enabled bigendian; then
+ disable altivec
+ fi
+
     # AltiVec flags: The FSF version of GCC differs from the Apple version
     if enabled altivec; then
         nogas=warn

Revision history for this message
Reinhard Tartler (siretart) wrote :

I believe the linked branch fixes this issue, but I'd appreciate testing (I don't have the hardware available to test myself)

Changed in libav (Ubuntu):
assignee: nobody → Reinhard Tartler (siretart)
Revision history for this message
Reinhard Tartler (siretart) wrote :

libav (6:10.1-1ubuntu1) utopic; urgency=low

  * add patch to fix FTBFS on ppc64el, LP: #1263802
  * add patch to fix FTBFS on arm64, LP: #1323144
 -- Reinhard Tartler <email address hidden> Thu, 29 May 2014 07:34:56 -0400

Changed in libav (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mythtv - 2:0.27.1+fixes.20140624.aa822f5-0ubuntu2

---------------
mythtv (2:0.27.1+fixes.20140624.aa822f5-0ubuntu2) utopic; urgency=medium

  * avoid_bswap_conflict.patch: Rename the unused bswap_dbl function from
    ffmpeg to avoid a symbol conflict on big-endian arches like powerpc.
  * ppc64el-abiv2.patch: Snag patch from libav for ppc64el (LP: #1263802)
 -- Adam Conrad <email address hidden> Wed, 30 Jul 2014 20:08:37 -0600

Changed in mythtv (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers