NetBSD Problem Report #48680
From www@NetBSD.org Tue Mar 25 21:53:30 2014
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
(using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits))
(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
by mollari.NetBSD.org (Postfix) with ESMTPS id E02D2A5805
for <gnats-bugs@gnats.NetBSD.org>; Tue, 25 Mar 2014 21:53:30 +0000 (UTC)
Message-Id: <20140325215329.371FFA580E@mollari.NetBSD.org>
Date: Tue, 25 Mar 2014 21:53:29 +0000 (UTC)
From: jdbaker@mylinuxisp.com
Reply-To: jdbaker@mylinuxisp.com
To: gnats-bugs@NetBSD.org
Subject: gcc48 chokes on ffmpeg2 inline assembly (i386-6.99.38)
X-Send-Pr-Version: www-1.0
>Number: 48680
>Category: pkg
>Synopsis: gcc48 chokes on ffmpeg2 inline assembly (i386-6.99.38)
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Mar 25 21:55:00 +0000 2014
>Closed-Date: Sat Dec 06 18:50:48 +0000 2014
>Last-Modified: Sat Dec 06 18:50:48 +0000 2014
>Originator: John D. Baker
>Release: NetBSD/i386-6.99.38(gcc48), pkgsrc-HEAD (pre-pkgsrc-2014Q1)
>Organization:
>Environment:
NetBSD gx260a 6.99.38 NetBSD 6.99.38 (GENERIC) #11: Mon Mar 24 22:17:52 CDT 2014 sysop@verthandi.technoskunk.fur:/d0/build/current/obj/i386/sys/arch/i386/compile/GENERIC i386
>Description:
On NetBSD/i386-6.99.38 built with HAVE_GCC=48 and thus using gcc 4.8.3, building
multimedia/ffmpeg2 fails as follows:
[...]
CC libavcodec/x86/ac3dsp_init.o
libavcodec/x86/ac3dsp_init.c: In function 'ac3_downmix_sse':
libavcodec/x86/ac3dsp_init.c:65:5: error: 'asm' operand has impossible constraints
__asm__ volatile ( \
^
libavcodec/x86/ac3dsp_init.c:149:9: note: in expansion of macro 'MIX5'
MIX5(IF0, IF1);
^
libavcodec/x86/ac3dsp_init.c:65:5: error: 'asm' operand has impossible constraints
__asm__ volatile ( \
^
libavcodec/x86/ac3dsp_init.c:153:9: note: in expansion of macro 'MIX5'
MIX5(IF1, IF0);
^
common.mak:48: recipe for target 'libavcodec/x86/ac3dsp_init.o' failed
gmake: *** [libavcodec/x86/ac3dsp_init.o] Error 1
*** Error code 2
Stop.
make[1]: stopped in /x/pkgsrc/multimedia/ffmpeg2
[...]
>How-To-Repeat:
On a NetBSD/i386-current system using gcc 4.8.3 (amd64? other gcc48-ready arches?)
attempt to build multimedia/ffmpeg2
>Fix:
>Release-Note:
>Audit-Trail:
From: "John D. Baker" <jdbaker@mylinuxisp.com>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/48680 (gcc48 chokes on ffmpeg2 inline assembly (i386-6.99.38))
Date: Tue, 1 Apr 2014 21:27:43 -0500 (CDT)
This error persists with "ffmpeg2-2.2" from pkgsrc-HEAD. The line numbers
where the errors are reported in the affected file are different but
follow the same pattern:
[...]
CC libavcodec/x86/ac3dsp_init.o
libavcodec/x86/ac3dsp_init.c: In function 'ac3_downmix_sse':
libavcodec/x86/ac3dsp_init.c:79:5: error: 'asm' operand has impossible constraints
__asm__ volatile ( \
^
libavcodec/x86/ac3dsp_init.c:163:9: note: in expansion of macro 'MIX5'
MIX5(IF0, IF1);
^
libavcodec/x86/ac3dsp_init.c:79:5: error: 'asm' operand has impossible constraints
__asm__ volatile ( \
^
libavcodec/x86/ac3dsp_init.c:167:9: note: in expansion of macro 'MIX5'
MIX5(IF1, IF0);
^
common.mak:49: recipe for target 'libavcodec/x86/ac3dsp_init.o' failed
gmake: *** [libavcodec/x86/ac3dsp_init.o] Error 1
*** Error code 2
Stop.
make[1]: stopped in /x/pkgsrc/multimedia/ffmpeg2
--
|/"\ John D. Baker, KN5UKS NetBSD Darwin/MacOS X
|\ / jdbaker[snail]mylinuxisp[flyspeck]com OpenBSD FreeBSD
| X No HTML/proprietary data in email. BSD just sits there and works!
|/ \ GPGkeyID: D703 4A7E 479F 63F8 D3F4 BD99 9572 8F23 E4AD 1645
From: "John D. Baker" <jdbaker@mylinuxisp.com>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/48680 (gcc48 chokes on ffmpeg2 inline assembly (i386-6.99.38))
Date: Tue, 8 Apr 2014 23:06:16 -0500 (CDT)
The problem does not affect NetBSD/amd64-6.99.40. "multimedia/ffmpeg2"
built without problems.
--
|/"\ John D. Baker, KN5UKS NetBSD Darwin/MacOS X
|\ / jdbaker[snail]mylinuxisp[flyspeck]com OpenBSD FreeBSD
| X No HTML/proprietary data in email. BSD just sits there and works!
|/ \ GPGkeyID: D703 4A7E 479F 63F8 D3F4 BD99 9572 8F23 E4AD 1645
From: "John D. Baker" <jdbaker@mylinuxisp.com>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/48680 (gcc48 chokes on ffmpeg2 inline assembly (i386-6.99.38))
Date: Fri, 11 Apr 2014 13:37:34 -0500 (CDT)
On Tue, 1 Apr 2014, John D. Baker wrote:
This error persists with "ffmpeg2-2.2.1" from pkgsrc-HEAD. The line
numbers where the errors are reported in the affected file are the same
as from ffmpeg2-2.2.
Again, so far, this problem has only been observed on NetBSD/i386 platform
(6.99.40 now). An amd64-6.99.40 host does not exhibit the problem.
--
|/"\ John D. Baker, KN5UKS NetBSD Darwin/MacOS X
|\ / jdbaker[snail]mylinuxisp[flyspeck]com OpenBSD FreeBSD
| X No HTML/proprietary data in email. BSD just sits there and works!
|/ \ GPGkeyID: D703 4A7E 479F 63F8 D3F4 BD99 9572 8F23 E4AD 1645
From: "John D. Baker" <jdbaker@mylinuxisp.com>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/48680 (gcc48 chokes on ffmpeg2 inline assembly (i386-6.99.38))
Date: Thu, 17 Apr 2014 08:56:26 -0500 (CDT)
On NetBSD/i386-6.99.40, "multimedia/ffmpeg" (ffmpeg-20140305.1.2.6) also
fails in the same way, although the line numbers are different:
[...]
CC libavcodec/x86/ac3dsp_init.o
libavcodec/x86/ac3dsp_init.c: In function 'ac3_downmix_sse':
libavcodec/x86/ac3dsp_init.c:65:5: error: 'asm' operand has impossible constraints
__asm__ volatile ( \
^
libavcodec/x86/ac3dsp_init.c:149:9: note: in expansion of macro 'MIX5'
MIX5(IF0, IF1);
^
libavcodec/x86/ac3dsp_init.c:65:5: error: 'asm' operand has impossible constraints
__asm__ volatile ( \
^
libavcodec/x86/ac3dsp_init.c:153:9: note: in expansion of macro 'MIX5'
MIX5(IF1, IF0);
^
common.mak:48: recipe for target 'libavcodec/x86/ac3dsp_init.o' failed
gmake: *** [libavcodec/x86/ac3dsp_init.o] Error 1
*** Error code 2
Stop.
make[4]: stopped in /x/pkgsrc/multimedia/ffmpeg
[...]
NetBSD/amd64-6.99.40 does not have this problem and ffmpeg-20140305.1.2.6
builds successfully.
--
|/"\ John D. Baker, KN5UKS NetBSD Darwin/MacOS X
|\ / jdbaker[snail]mylinuxisp[flyspeck]com OpenBSD FreeBSD
| X No HTML/proprietary data in email. BSD just sits there and works!
|/ \ GPGkeyID: D703 4A7E 479F 63F8 D3F4 BD99 9572 8F23 E4AD 1645
From: Onno van der Linden <o.vd.linden@quicknet.nl>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/48680
Date: Mon, 16 Jun 2014 19:35:12 +0200
Two problems in the current ffmpeg and ffmpeg2 packages
for NetBSD/i386:
1) compile error in ac3dsp_init.c
2) alignment issues with gcc 4.8
Fixed (1) by the diff from http://svnweb.freebsd.org/ports/head/multimedia/ffmpeg2/files/patch-libavcodec-x86-ac3dsp_init.c?view=markup&pathrev=329611
(1) can also be fixed by changing libavutil/x86/asm.h as done in http://svnweb.freebsd.org/ports/head/multimedia/ffmpeg/files/patch-libavutil-x86-asm.h?revision=332397&view=markup with __clang__ replace by ARCH_X86_32
As noted in http://ffmpeg.org/pipermail/ffmpeg-cvslog/2012-December/058557.html
a better fix would be to change the inline asm to yasm. An attempt
is available from https://patches.libav.org/patch/30666/ but that would
change the package too much.
Fixed (2) by changing the ffmpeg and ffmpeg2 Makefile slightly
for i386 to give gcc 4.[01].* no-asm and the rest of gcc 4
the alignment options.
Onno
--- libavcodec/x86/ac3dsp_init.c.orig 2013-08-11 01:23:26.000000000 +0200
+++ libavcodec/x86/ac3dsp_init.c 2013-10-06 17:43:36.000000000 +0200
@@ -70,11 +70,11 @@ void ff_ac3_extract_exponents_ssse3(uint
"shufps $0, %%xmm6, %%xmm6 \n" \
"shufps $0, %%xmm7, %%xmm7 \n" \
"1: \n" \
- "movaps (%0, %2), %%xmm0 \n" \
- "movaps (%0, %3), %%xmm1 \n" \
- "movaps (%0, %4), %%xmm2 \n" \
- "movaps (%0, %5), %%xmm3 \n" \
- "movaps (%0, %6), %%xmm4 \n" \
+ "movups (%0, %2), %%xmm0 \n" \
+ "movups (%0, %3), %%xmm1 \n" \
+ "movups (%0, %4), %%xmm2 \n" \
+ "movups (%0, %5), %%xmm3 \n" \
+ "movups (%0, %6), %%xmm4 \n" \
"mulps %%xmm5, %%xmm0 \n" \
"mulps %%xmm6, %%xmm1 \n" \
"mulps %%xmm5, %%xmm2 \n" \
@@ -85,8 +85,8 @@ void ff_ac3_extract_exponents_ssse3(uint
"addps %%xmm3, %%xmm0 \n" \
"addps %%xmm4, %%xmm2 \n" \
mono("addps %%xmm2, %%xmm0 \n") \
- "movaps %%xmm0, (%0, %2) \n" \
- stereo("movaps %%xmm2, (%0, %3) \n") \
+ "movups %%xmm0, (%0, %2) \n" \
+ stereo("movups %%xmm2, (%0, %3) \n") \
"add $16, %0 \n" \
"jl 1b \n" \
: "+&r"(i) \
@@ -106,24 +106,26 @@ void ff_ac3_extract_exponents_ssse3(uint
"mov %5, %2 \n" \
"1: \n" \
"mov -%c7(%6, %2, %c8), %3 \n" \
- "movaps (%3, %0), %%xmm0 \n" \
+ "movups (%3, %0), %%xmm0 \n" \
stereo("movaps %%xmm0, %%xmm1 \n") \
"mulps %%xmm4, %%xmm0 \n" \
stereo("mulps %%xmm5, %%xmm1 \n") \
"2: \n" \
"mov (%6, %2, %c8), %1 \n" \
- "movaps (%1, %0), %%xmm2 \n" \
+ "movups (%1, %0), %%xmm2 \n" \
stereo("movaps %%xmm2, %%xmm3 \n") \
- "mulps (%4, %2, 8), %%xmm2 \n" \
- stereo("mulps 16(%4, %2, 8), %%xmm3 \n") \
+ "movups (%4, %2, 8), %%xmm4 \n" \
+ "mulps %%xmm4, %%xmm2 \n" \
+ stereo("movups 16(%4, %2, 8), %%xmm4 \n") \
+ stereo("mulps %%xmm4, %%xmm3 \n") \
"addps %%xmm2, %%xmm0 \n" \
stereo("addps %%xmm3, %%xmm1 \n") \
"add $4, %2 \n" \
"jl 2b \n" \
"mov %5, %2 \n" \
stereo("mov (%6, %2, %c8), %1 \n") \
- "movaps %%xmm0, (%3, %0) \n" \
- stereo("movaps %%xmm1, (%1, %0) \n") \
+ "movups %%xmm0, (%3, %0) \n" \
+ stereo("movups %%xmm1, (%1, %0) \n") \
"add $16, %0 \n" \
"jl 1b \n" \
: "+&r"(i), "=&r"(j), "=&r"(k), "=&r"(m) \
@@ -152,7 +154,7 @@ static void ac3_downmix_sse(float **samp
matrix_cmp[3][0] == matrix_cmp[4][0]) {
MIX5(IF1, IF0);
} else {
- DECLARE_ALIGNED(16, float, matrix_simd)[AC3_MAX_CHANNELS][2][4];
+ float matrix_simd[AC3_MAX_CHANNELS][2][4];
float *samp[AC3_MAX_CHANNELS];
for (j = 0; j < in_ch; j++)
@@ -166,8 +168,8 @@ static void ac3_downmix_sse(float **samp
"movss 4(%2, %0), %%xmm5 \n"
"shufps $0, %%xmm4, %%xmm4 \n"
"shufps $0, %%xmm5, %%xmm5 \n"
- "movaps %%xmm4, (%1, %0, 4) \n"
- "movaps %%xmm5, 16(%1, %0, 4) \n"
+ "movups %%xmm4, (%1, %0, 4) \n"
+ "movups %%xmm5, 16(%1, %0, 4) \n"
"jg 1b \n"
: "+&r"(j)
: "r"(matrix_simd), "r"(matrix)
--- ffmpeg/Makefile.orig 2014-06-16 19:10:35.000000000 +0200
+++ ffmpeg/Makefile 2014-06-16 19:05:39.000000000 +0200
@@ -41,15 +41,14 @@
.include "../../mk/compiler.mk"
# disable asm on i386 for non-gcc and gcc < 4.2
-# no alignment options needed for gcc >= 4.6 on i386
.if ${MACHINE_ARCH} == "i386"
. if !empty(MACHINE_PLATFORM:MDarwin-*-i386) \
|| !empty(MACHINE_PLATFORM:MSunOS-*-i386) \
|| !empty(CC_VERSION:Mgcc-[123]*) \
- || !empty(CC_VERSION:Mgcc-4.[01]*) \
+ || !empty(CC_VERSION:Mgcc-4.[01].*) \
|| empty(CC_VERSION:Mgcc*)
CONFIGURE_ARGS+= --disable-asm
-. elif !empty(CC_VERSION:Mgcc-4.[23456]*)
+. elif !empty(CC_VERSION:Mgcc-4.*)
CFLAGS+= -mstackrealign -mpreferred-stack-boundary=4
. endif
.endif
#### End of ffmpeg fixes, start of ffmpeg2 fixes
--- ffmpeg2/Makefile.orig 2014-06-16 19:10:45.000000000 +0200
+++ ffmpeg2/Makefile 2014-06-16 19:06:17.000000000 +0200
@@ -37,15 +37,14 @@
.include "../../mk/compiler.mk"
# disable asm on i386 for non-gcc and gcc < 4.2
-# no alignment options needed for gcc >= 4.6 on i386
.if ${MACHINE_ARCH} == "i386"
. if !empty(MACHINE_PLATFORM:MDarwin-*-i386) \
|| !empty(MACHINE_PLATFORM:MSunOS-*-i386) \
|| !empty(CC_VERSION:Mgcc-[123]*) \
- || !empty(CC_VERSION:Mgcc-4.[01]*) \
+ || !empty(CC_VERSION:Mgcc-4.[01].*) \
|| empty(CC_VERSION:Mgcc*)
CONFIGURE_ARGS+= --disable-asm
-. elif !empty(CC_VERSION:Mgcc-4.[23456]*)
+. elif !empty(CC_VERSION:Mgcc-4.*)
CFLAGS+= -mstackrealign -mpreferred-stack-boundary=4
. endif
.endif
--- libavcodec/x86/ac3dsp_init.c.orig 2014-06-02 23:18:54.000000000 +0200
+++ libavcodec/x86/ac3dsp_init.c 2014-06-14 21:27:55.000000000 +0200
@@ -84,11 +84,11 @@
"shufps $0, %%xmm6, %%xmm6 \n" \
"shufps $0, %%xmm7, %%xmm7 \n" \
"1: \n" \
- "movaps (%0, %2), %%xmm0 \n" \
- "movaps (%0, %3), %%xmm1 \n" \
- "movaps (%0, %4), %%xmm2 \n" \
- "movaps (%0, %5), %%xmm3 \n" \
- "movaps (%0, %6), %%xmm4 \n" \
+ "movups (%0, %2), %%xmm0 \n" \
+ "movups (%0, %3), %%xmm1 \n" \
+ "movups (%0, %4), %%xmm2 \n" \
+ "movups (%0, %5), %%xmm3 \n" \
+ "movups (%0, %6), %%xmm4 \n" \
"mulps %%xmm5, %%xmm0 \n" \
"mulps %%xmm6, %%xmm1 \n" \
"mulps %%xmm5, %%xmm2 \n" \
@@ -99,8 +99,8 @@
"addps %%xmm3, %%xmm0 \n" \
"addps %%xmm4, %%xmm2 \n" \
mono("addps %%xmm2, %%xmm0 \n") \
- "movaps %%xmm0, (%0, %2) \n" \
- stereo("movaps %%xmm2, (%0, %3) \n") \
+ "movups %%xmm0, (%0, %2) \n" \
+ stereo("movups %%xmm2, (%0, %3) \n") \
"add $16, %0 \n" \
"jl 1b \n" \
: "+&r"(i) \
@@ -120,24 +120,26 @@
"mov %5, %2 \n" \
"1: \n" \
"mov -%c7(%6, %2, %c8), %3 \n" \
- "movaps (%3, %0), %%xmm0 \n" \
+ "movups (%3, %0), %%xmm0 \n" \
stereo("movaps %%xmm0, %%xmm1 \n") \
"mulps %%xmm4, %%xmm0 \n" \
stereo("mulps %%xmm5, %%xmm1 \n") \
"2: \n" \
"mov (%6, %2, %c8), %1 \n" \
- "movaps (%1, %0), %%xmm2 \n" \
+ "movups (%1, %0), %%xmm2 \n" \
stereo("movaps %%xmm2, %%xmm3 \n") \
- "mulps (%4, %2, 8), %%xmm2 \n" \
- stereo("mulps 16(%4, %2, 8), %%xmm3 \n") \
+ "movups (%4, %2, 8), %%xmm4 \n" \
+ "mulps %%xmm4, %%xmm2 \n" \
+ stereo("movups 16(%4, %2, 8), %%xmm4 \n") \
+ stereo("mulps %%xmm4, %%xmm3 \n") \
"addps %%xmm2, %%xmm0 \n" \
stereo("addps %%xmm3, %%xmm1 \n") \
"add $4, %2 \n" \
"jl 2b \n" \
"mov %5, %2 \n" \
stereo("mov (%6, %2, %c8), %1 \n") \
- "movaps %%xmm0, (%3, %0) \n" \
- stereo("movaps %%xmm1, (%1, %0) \n") \
+ "movups %%xmm0, (%3, %0) \n" \
+ stereo("movups %%xmm1, (%1, %0) \n") \
"add $16, %0 \n" \
"jl 1b \n" \
: "+&r"(i), "=&r"(j), "=&r"(k), "=&r"(m) \
@@ -166,7 +168,7 @@
matrix_cmp[3][0] == matrix_cmp[4][0]) {
MIX5(IF1, IF0);
} else {
- DECLARE_ALIGNED(16, float, matrix_simd)[AC3_MAX_CHANNELS][2][4];
+ float matrix_simd[AC3_MAX_CHANNELS][2][4];
float *samp[AC3_MAX_CHANNELS];
for (j = 0; j < in_ch; j++)
@@ -180,8 +182,8 @@
"movss 4(%2, %0), %%xmm5 \n"
"shufps $0, %%xmm4, %%xmm4 \n"
"shufps $0, %%xmm5, %%xmm5 \n"
- "movaps %%xmm4, (%1, %0, 4) \n"
- "movaps %%xmm5, 16(%1, %0, 4) \n"
+ "movups %%xmm4, (%1, %0, 4) \n"
+ "movups %%xmm5, 16(%1, %0, 4) \n"
"jg 1b \n"
: "+&r"(j)
: "r"(matrix_simd), "r"(matrix)
From: Joerg Sonnenberger <joerg@britannica.bec.de>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/48680
Date: Mon, 16 Jun 2014 21:17:02 +0200
On Mon, Jun 16, 2014 at 05:40:00PM +0000, Onno van der Linden wrote:
> Fixed (2) by changing the ffmpeg and ffmpeg2 Makefile slightly
> for i386 to give gcc 4.[01].* no-asm and the rest of gcc 4
> the alignment options.
Actually, if the on-stack variable *are* correctly declared as needing
16 Bytes alignment, the stack should be realigned automatically. This is
not the case for plain float for example.
Joerg
From: "John D. Baker" <jdbaker@mylinuxisp.com>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/48680 (gcc48 chokes on ffmpeg2 inline assembly (i386-6.99.38))
Date: Thu, 31 Jul 2014 11:38:18 -0500 (CDT)
With ffmpeg2-2.3 from pkgsrc-HEAD and NetBSD/i386-6.99.49 this problem
persists.
Will try patches suggested earlier (or adapting them to updated version
as necessary).
--
|/"\ John D. Baker, KN5UKS NetBSD Darwin/MacOS X
|\ / jdbaker[snail]mylinuxisp[flyspeck]com OpenBSD FreeBSD
| X No HTML/proprietary data in email. BSD just sits there and works!
|/ \ GPGkeyID: D703 4A7E 479F 63F8 D3F4 BD99 9572 8F23 E4AD 1645
From: "John D. Baker" <jdbaker@mylinuxisp.com>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/48680 (gcc48 chokes on ffmpeg2 inline assembly (i386-6.99.38))
Date: Thu, 31 Jul 2014 16:08:19 -0500 (CDT)
On Thu, 31 Jul 2014, John D. Baker wrote:
> Will try patches suggested earlier (or adapting them to updated version
> as necessary).
The ffmpeg2/Makefile patch had to be applied manually. The patch to
${WRKSRC}/libavcodec/x86/ac3dsp_init.c applied with an offset of -1 line
to the file supplied in ffmpeg2-2.3.
As patched, the source compiled successfully. A cursory test scaling
an MPEG-4 video file indicated that the 'ffmpeg2' executable operates.
The resulting video played correctly with 'mplayer'.
The ffmpeg/Makefile patch had to be applied manually. The patch to
${WRKSRC}/libavcodec/x86/ac3dsp_init.c applied cleanly to the file
supplied in ffmpeg-1.2.7.
As patched, the source compiled successfully. A cursory test scaling
an MPEG-4 video file indicated that the 'ffmpeg' executable operates.
The resulting video played correctly with 'mplayer'.
--
|/"\ John D. Baker, KN5UKS NetBSD Darwin/MacOS X
|\ / jdbaker[snail]mylinuxisp[flyspeck]com OpenBSD FreeBSD
| X No HTML/proprietary data in email. BSD just sits there and works!
|/ \ GPGkeyID: D703 4A7E 479F 63F8 D3F4 BD99 9572 8F23 E4AD 1645
From: "Manuel Bouyer" <bouyer@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/48680 CVS commit: pkgsrc/multimedia
Date: Wed, 3 Dec 2014 15:06:11 +0000
Module Name: pkgsrc
Committed By: bouyer
Date: Wed Dec 3 15:06:11 UTC 2014
Modified Files:
pkgsrc/multimedia/ffmpeg2: Makefile distinfo
pkgsrc/multimedia/ffplay2: Makefile
Added Files:
pkgsrc/multimedia/ffmpeg2/patches: patch-libavcodec_x86_ac3dsp_init.c
Log Message:
Add patch from PR pkg/48680, fixing build on netbsd-7/i386 and newer.
Add -mstackrealign -mpreferred-stack-boundary=4 to CFLAGS on i386 for all
gcc 4.x versions, this appears to still be needed with gcc 4.8.4.
Bump PKGREVISION for ffmpeg2 and ffplay2 (which uses ffmpeg2 patches)
To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 pkgsrc/multimedia/ffmpeg2/Makefile
cvs rdiff -u -r1.23 -r1.24 pkgsrc/multimedia/ffmpeg2/distinfo
cvs rdiff -u -r0 -r1.1 \
pkgsrc/multimedia/ffmpeg2/patches/patch-libavcodec_x86_ac3dsp_init.c
cvs rdiff -u -r1.4 -r1.5 pkgsrc/multimedia/ffplay2/Makefile
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: "Manuel Bouyer" <bouyer@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/48680 CVS commit: pkgsrc/multimedia
Date: Wed, 3 Dec 2014 16:44:14 +0000
Module Name: pkgsrc
Committed By: bouyer
Date: Wed Dec 3 16:44:14 UTC 2014
Modified Files:
pkgsrc/multimedia/ffmpeg1: Makefile distinfo
pkgsrc/multimedia/ffplay1: Makefile
Added Files:
pkgsrc/multimedia/ffmpeg1/patches: patch-libavcodec_x86_ac3dsp_init.c
Log Message:
Add patch from PR pkg/48680, fixing build on netbsd-7/i386 and newer.
Add -mstackrealign -mpreferred-stack-boundary=4 to CFLAGS on i386 for all
gcc 4.x versions, this appears to still be needed with gcc 4.8.4.
Bump PKGREVISION for ffmpeg1 and ffplay1 (which uses ffmpeg1 patches)
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 pkgsrc/multimedia/ffmpeg1/Makefile
cvs rdiff -u -r1.4 -r1.5 pkgsrc/multimedia/ffmpeg1/distinfo
cvs rdiff -u -r0 -r1.1 \
pkgsrc/multimedia/ffmpeg1/patches/patch-libavcodec_x86_ac3dsp_init.c
cvs rdiff -u -r1.1 -r1.2 pkgsrc/multimedia/ffplay1/Makefile
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->feedback
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Fri, 05 Dec 2014 04:14:59 +0000
State-Changed-Why:
Does that work?
From: "John D. Baker" <jdbaker@mylinuxisp.com>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/48680 (gcc48 chokes on ffmpeg2 inline assembly (i386-6.99.38))
Date: Thu, 4 Dec 2014 23:44:13 -0600 (CST)
On Fri, 5 Dec 2014, dholland@NetBSD.org wrote:
> State-Changed-From-To: open->feedback
> State-Changed-By: dholland@NetBSD.org
> State-Changed-When: Fri, 05 Dec 2014 04:14:59 +0000
> State-Changed-Why:
> Does that work?
Yes, it does.
Partially related, ffmpeg010 also needs the stack-realignment options
enabled for i386:
+Index: multimedia/ffmpeg010/Makefile
+===================================================================
+RCS file: /cvsroot/pkgsrc/multimedia/ffmpeg010/Makefile,v
+retrieving revision 1.19
+diff -u -p -r1.19 Makefile
+--- multimedia/ffmpeg010/Makefile 11 Aug 2014 23:09:45 -0000 1.19
++++ multimedia/ffmpeg010/Makefile 16 Aug 2014 03:35:49 -0000
+@@ -30,17 +30,15 @@ CONF_FILES+= ${PREFIX}/share/examples/ff
+ .include "../../mk/compiler.mk"
+
+ # disable asm on i386 for non-gcc and gcc < 4.2
+-# no alignment options needed for gcc >= 4.6 on i386
+
+ .if ${MACHINE_ARCH} == "i386"
+-.if !empty(MACHINE_PLATFORM:MDarwin-*-i386)
+-CONFIGURE_ARGS+= --disable-asm
+-.elif !empty(CC_VERSION:Mgcc-4.[2345]*)
+-CFLAGS+=-mstackrealign -mpreferred-stack-boundary=4
+-.elif !empty(CC_VERSION:Mgcc-[123]*) \
+- || !empty(CC_VERSION:Mgcc-4.[01]*) \
++.if !empty(MACHINE_PLATFORM:MDarwin-*-i386) \
++ || !empty(CC_VERSION:Mgcc-[123]*) \
++ || !empty(CC_VERSION:Mgcc-4.[01].*) \
+ || empty(CC_VERSION:Mgcc*)
+ CONFIGURE_ARGS+= --disable-asm
++.elif !empty(CC_VERSION:Mgcc-4.*)
++CFLAGS+=-mstackrealign -mpreferred-stack-boundary=4
+ .endif
+ .endif
+
--
|/"\ John D. Baker, KN5UKS NetBSD Darwin/MacOS X
|\ / jdbaker[snail]mylinuxisp[flyspeck]com OpenBSD FreeBSD
| X No HTML/proprietary data in email. BSD just sits there and works!
|/ \ GPGkeyID: D703 4A7E 479F 63F8 D3F4 BD99 9572 8F23 E4AD 1645
State-Changed-From-To: feedback->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sat, 06 Dec 2014 18:50:48 +0000
State-Changed-Why:
Confirmed fixed, thanks.
bouyer@ committed the last ffmpeg010 bit yesterday but forgot to reference
the PR, so the commit message didn't come here.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.