Bug 196660 - [arm] multimedia/gstreamer1-libav fails to compile
Summary: [arm] multimedia/gstreamer1-libav fails to compile
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: arm Any
: --- Affects Some People
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-12 21:24 UTC by Sean Bruno
Modified: 2015-01-16 22:34 UTC (History)
5 users (show)

See Also:
sbruno: maintainer-feedback?


Attachments
disable clang integrated assembler (421 bytes, patch)
2015-01-14 16:09 UTC, Mikael Urankar
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sean Bruno freebsd_committer freebsd_triage 2015-01-12 21:24:04 UTC
libavcodec/aacsbr.c:389:16: warning: variable 'max_qmf_subbands' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
    } else if (sbr->sample_rate >= 48000)
               ^~~~~~~~~~~~~~~~~~~~~~~~~
libavcodec/aacsbr.c:392:33: note: uninitialized use occurs here
    if (sbr->k[2] - sbr->k[0] > max_qmf_subbands) {
                                ^~~~~~~~~~~~~~~~
libavcodec/aacsbr.c:389:12: note: remove the 'if' if its condition is always true
    } else if (sbr->sample_rate >= 48000)
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libavcodec/aacsbr.c:324:40: note: initialize the variable 'max_qmf_subbands' to silence this warning
    unsigned int temp, max_qmf_subbands;
                                       ^
                                        = 0
CC      libavcodec/ac3dec_data.o
CC      libavcodec/ac3dsp.o
CC      libavcodec/ac3enc.o
CC      libavcodec/ac3enc_fixed.o
CC      libavcodec/ac3enc_float.o
CC      libavcodec/ac3tab.o
CC      libavcodec/acelp_filters.o
CC      libavcodec/acelp_pitch_delay.o
CC      libavcodec/acelp_vectors.o
CC      libavcodec/adpcm.o
CC      libavcodec/adpcm_data.o
CC      libavcodec/adpcmenc.o
CC      libavcodec/adx.o
CC      libavcodec/adxdec.o
CC      libavcodec/adx_parser.o
CC      libavcodec/adxenc.o
CC      libavcodec/aic.o
CC      libavcodec/alac.o
CC      libavcodec/alac_data.o
CC      libavcodec/alacenc.o
CC      libavcodec/allcodecs.o
CC      libavcodec/alsdec.o
CC      libavcodec/amrnbdec.o
CC      libavcodec/amrwbdec.o
CC      libavcodec/anm.o
1 warning generated.
CC      libavcodec/ansi.o
CC      libavcodec/apedec.o
CC      libavcodec/arm/aacpsdsp_init_arm.o
AS      libavcodec/arm/ac3dsp_arm.o
AS      libavcodec/arm/ac3dsp_armv6.o
<instantiation>:19:9: error: unknown directive
ldr gp, .Lpicoff\@
                ^
<instantiation>:7:9: note: while in macro instantiation
        ldpic gp, _GLOBAL_OFFSET_TABLE_
        ^
libavcodec/arm/ac3dsp_armv6.S:29:9: note: while in macro instantiation
        movrelx r4, ff_ac3_bin_to_band_tab, r11
        ^
<instantiation>:2:1: error: unknown directive
.Lpic\@:
^
<instantiation>:7:9: note: while in macro instantiation
        ldpic gp, _GLOBAL_OFFSET_TABLE_
        ^
libavcodec/arm/ac3dsp_armv6.S:29:9: note: while in macro instantiation
        movrelx r4, ff_ac3_bin_to_band_tab, r11
        ^
<instantiation>:10:48: error: unbalanced parentheses in macro argument
        def_pic _GLOBAL_OFFSET_TABLE_ - (.Lpic\@ + (8 >> 0)), .Lpicoff\@
                                               ^
<instantiation>:7:9: note: while in macro instantiation
        ldpic gp, _GLOBAL_OFFSET_TABLE_
        ^
libavcodec/arm/ac3dsp_armv6.S:29:9: note: while in macro instantiation
        movrelx r4, ff_ac3_bin_to_band_tab, r11
        ^
<instantiation>:13:25: error: unexpected token in argument list
        ldr r4, .Lpicoff\@
                        ^
libavcodec/arm/ac3dsp_armv6.S:29:9: note: while in macro instantiation
        movrelx r4, ff_ac3_bin_to_band_tab, r11
        ^
<instantiation>:1:1: error: unknown directive
.altmacro
^
<instantiation>:15:9: note: while in macro instantiation
        def_pic ff_ac3_bin_to_band_tab(GOT), .Lpicoff\@
        ^
libavcodec/arm/ac3dsp_armv6.S:29:9: note: while in macro instantiation
        movrelx r4, ff_ac3_bin_to_band_tab, r11
        ^
<instantiation>:1:16: error: expected identifier in '.macro' directive
.macro put_pic_%.Lpic_idx
               ^
<instantiation>:2:9: note: while in macro instantiation
        do_def_pic %.Lpic_idx, ff_ac3_bin_to_band_tab(GOT), .Lpicoff\
        ^
<instantiation>:15:9: note: while in macro instantiation
        def_pic ff_ac3_bin_to_band_tab(GOT), .Lpicoff\@
        ^
libavcodec/arm/ac3dsp_armv6.S:29:9: note: while in macro instantiation
        movrelx r4, ff_ac3_bin_to_band_tabCC    libavcodec/arm/ac3dsp_init_arm.o
, r11
        ^
<instantiation>:2:11: error: unknown token in expression
      .if %.Lpic_idx
          ^
<instantiation>:2:9: note: while in macro instantiation
        do_def_pic %.Lpic_idx, ff_ac3_bin_to_band_tab(GOT), .Lpicoff\
        ^
<instantiation>:15:9: note: while in macro instantiation
        def_pic ff_ac3_bin_to_band_tab(GOT), .Lpicoff\@
        ^
libavcodec/arm/ac3dsp_armv6.S:29:9: note: while in macro instantiation
        movrelx r4, ff_ac3_bin_to_band_tab, r11
        ^
<instantiation>:3:9: error: unknown directive
        .altmacro
        ^
<instantiation>:2:9: note: while in macro instantiation
        do_def_pic %.Lpic_idx, ff_ac3_bin_to_band_tab(GOT), .Lpicoff\
        ^
<instantiation>:15:9: note: while in macro instantiation
        def_pic ff_ac3_bin_to_band_tab(GOT), .Lpicoff\@
        ^
libavcodec/arm/ac3dsp_armv6.S:29:9: note: while in macro instantiation
        movrelx r4, ff_ac3_bin_to_band_tab, r11
        ^
<instantiation>:1:9: error: unexpected token in operand
put_pic_%(%.Lpic_idx-1)
        ^
<instantiation>:4:9: note: while in macro instantiation
        put_pic %(%.Lpic_idx - 1)
        ^
<instantiation>:2:9: note: while in macro instantiation
        do_def_pic %.Lpic_idx, ff_ac3_bin_to_band_tab(GOT), .Lpicoff\
        ^
<instantiation>:15:9: note: while in macro instantiation
        def_pic ff_ac3_bin_to_band_tab(GOT), .Lpicoff\@
        ^
libavcodec/arm/ac3dsp_armv6.S:29:9: note: while in macro instantiation
        movrelx r4, ff_ac3_bin_to_band_tab, r11
        ^
<instantiation>:5:9: error: unknown directive
        .noaltmacro
        ^
<instantiation>:2:9: note: while in macro instantiation
        do_def_pic %.Lpic_idx, ff_ac3_bin_to_band_tab(GOT), .Lpicoff\
        ^
<instantiation>:15:9: note: while in macro instantiation
        def_pic ff_ac3_bin_to_band_tab(GOT), .Lpicoff\@
        ^
libavcodec/arm/ac3dsp_armv6.S:29:9: note: while in macro instantiation
        movrelx r4, ff_ac3_bin_to_band_tab, r11
        ^
<instantiation>:7:1: error: unknown directive
.Lpicoff\: .word ff_ac3_bin_to_band_tab(GOT)
^
<instantiation>:2:9: note: while in macro instantiation
        do_def_pic %.Lpic_idx, ff_ac3_bin_to_band_tab(GOT), .Lpicoff\
   Makefile:47: recipe for target 'libavcodec/arm/ac3dsp_arm.o' failed
     ^
<instantiation>:15:9: note: while in macro instantiation
        def_pic ff_ac3_bin_to_band_tab(GOT), .Lpicoff\@
        ^
libavcodec/arm/ac3dsp_armv6.S:29:9: note: while in macro instantiation
        movrelx r4, ff_ac3_bin_to_band_tab, r11
        ^
<instantiation>:8:25: error: unexpected token in '.purgem' directive
        .purgem put_pic_%.Lpic_idx
                        ^
<instantiation>:2:9: note: while in macro instantiation
        do_def_pic %.Lpic_idx, ff_ac3_bin_to_band_tab(GOT), .Lpicoff\
        ^
<instantiation>:15:9: note: while in macro instantiation
        def_pic ff_ac3_band_start_tab(GOT), .Lpicoff\@
        ^
/tmp/ac3dsp_armv6-361f97.s:271:9: note: while in macro instantiation
        movrelx lr, ff_ac3_band_start_tab
        ^
<instantiation>:7:1: error: unknown directive
.Lpicoff\: .word ff_ac3_band_start_tab(GOT)
^
<instantiation>:2:9: note: while in macro instantiation
        do_def_pic %.Lpic_idx, ff_ac3_band_start_tab(GOT), .Lpicoff\
        ^
<instantiation>:15:9: note: while in macro instantiation
        def_pic ff_ac3_band_start_tab(GOT), .Lpicoff\@
        ^
/tmp/ac3dsp_armv6-361f97.s:271:9: note: while in macro instantiation
        movrelx lr, ff_ac3_band_start_tab
        ^
<instantiation>:8:25: error: unexpected token in '.purgem' directive
        .purgem put_pic_%.Lpic_idx
                        ^
<instantiation>:2:9: note: while in macro instantiation
        do_def_pic %.Lpic_idx, ff_ac3_band_start_tab(GOT), .Lpicoff\
        ^
<instantiation>:15:9: note: while in macro instantiation
        def_pic ff_ac3_band_start_tab(GOT), .Lpicoff\@
        ^
/tmp/ac3dsp_armv6-361f97.s:271:9: note: while in macro instantiation
        movrelx lr, ff_ac3_band_start_tab
        ^
<instantiation>:3:9: error: unknown directive
        .noaltmacro
        ^
<instantiation>:15:9: note: while in macro instantiation
        def_pic ff_ac3_band_start_tab(GOT), .Lpicoff\@
        ^
/tmp/ac3dsp_armv6-361f97.s:271:9: note: while in macro instantiation
        movrelx lr, ff_ac3_band_start_tab
        ^
<instantiation>:3:9: error: unknown directive
        .altmacro
        ^
/tmp/ac3dsp_armv6-361f97.s:325:1: note: while in macro instantiation
endfunc
^
<instantiation>:1:9: error: unexpected token in operand
put_pic_%(.Lpic_idx-1)
        ^
<instantiation>:4:9: note: while in macro instantiation
        put_pic %(.Lpic_idx - 1)
        ^
/tmp/ac3dsp_armv6-361f97.s:325:1: note: while in macro instantiation
endfunc
^
<instantiation>:5:9: error: unknown directive
        .noaltmacro
        ^
/tmp/ac3dsp_armv6-361f97.s:325:1: note: while in macro instantiation
endfunc
^
<instantiation>:8:9: error: unknown directive
        .endfunc
        ^
/tmp/ac3dsp_armv6-361f97.s:325:1: note: while in macro instantiation
endfunc
^
Makefile:47: recipe for target 'libavcodec/arm/ac3dsp_armv6.o' failed
gmake[6]: *** [libavcodec/arm/ac3dsp_armv6.o] Error 1
1 warning generated.
gmake[6]: Leaving directory '/wrkdirs/usr/ports/multimedia/gstreamer1-libav/work/gst-libav-1.4.5/gst-libs/ext/libav'
Makefile:657: recipe for target 'all-local' failed
gmake[5]: *** [all-local] Error 2
gmake[5]: Leaving directory '/wrkdirs/usr/ports/multimedia/gstreamer1-libav/work/gst-libav-1.4.5/gst-libs/ext'
Makefile:451: recipe for target 'all-recursive' failed
gmake[4]: *** [all-recursive] Error 1
gmake[4]: Leaving directory '/wrkdirs/usr/ports/multimedia/gstreamer1-libav/work/gst-libav-1.4.5/gst-libs/ext'
Makefile:437: recipe for target 'all-recursive' failed
gmake[3]: *** [all-recursive] Error 1
gmake[3]: Leaving directory '/wrkdirs/usr/ports/multimedia/gstreamer1-libav/work/gst-libav-1.4.5/gst-libs'
Makefile:530: recipe for target 'all-recursive' failed
gmake[2]: *** [all-recursive] Error 1
gmake[2]: Leaving directory '/wrkdirs/usr/ports/multimedia/gstreamer1-libav/work/gst-libav-1.4.5'
Makefile:458: recipe for target 'all' failed
gmake[1]: *** [all] Error 2
gmake[1]: Leaving directory '/wrkdirs/usr/ports/multimedia/gstreamer1-libav/work/gst-libav-1.4.5'
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make: stopped in /usr/ports/multimedia/gstreamer1-libav
Comment 1 Sean Bruno freebsd_committer freebsd_triage 2015-01-12 21:29:35 UTC
Not sure if this is fixable outside of using --no-integrated-as without reworking the asm.
Comment 2 Mikael Urankar freebsd_committer freebsd_triage 2015-01-14 16:09:55 UTC
Created attachment 151625 [details]
disable clang integrated assembler

clang integrated assembler does not support GNU AS assembler directives, libav authors suggest to use gas-preprocessor to feed clang (cf https://patches.libav.org/patch/50894/)

I think the easiest solution is to disable clang integrated assembler (cf attached patch)
Comment 3 Sean Bruno freebsd_committer freebsd_triage 2015-01-15 18:16:02 UTC
I will commit this if there's no objections.  Fixes build on head for ARMv6
Comment 4 commit-hook freebsd_committer freebsd_triage 2015-01-16 22:34:35 UTC
A commit references this bug:

Author: sbruno
Date: Fri Jan 16 22:34:23 UTC 2015
New revision: 377204
URL: https://svnweb.freebsd.org/changeset/ports/377204

Log:
  These ports utilize GAS assembly and probably won't ever change.  For the ARM
  case, do not use -integrated-as.

  PR:	196660 196774 196775 196776
  Submitted by:	mikael.urankar@gmail.com
  Approved by:	mentor (inplicit)

Changes:
  head/multimedia/ffmpeg/Makefile
  head/multimedia/gstreamer1-libav/Makefile
  head/multimedia/libav/Makefile
  head/multimedia/mplayer/Makefile