NetBSD Problem Report #49600

From www@NetBSD.org  Sat Jan 24 01:33:34 2015
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 312A6A582D
	for <gnats-bugs@gnats.NetBSD.org>; Sat, 24 Jan 2015 01:33:34 +0000 (UTC)
Message-Id: <20150124013332.F04E3A65B8@mollari.NetBSD.org>
Date: Sat, 24 Jan 2015 01:33:32 +0000 (UTC)
From: jdbaker@mylinuxisp.com
Reply-To: jdbaker@consolidated.net
To: gnats-bugs@NetBSD.org
Subject: macppc (powerpc) gcc 4.8.4 internal compiler error on multimedia/libvpx
X-Send-Pr-Version: www-1.0

>Number:         49600
>Notify-List:    jdbaker@consolidated.net
>Category:       pkg
>Synopsis:       macppc (powerpc) gcc 4.8.4 internal compiler error on multimedia/libvpx
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    ryoon
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jan 24 01:35:00 +0000 2015
>Closed-Date:    Tue Oct 13 04:05:56 +0000 2020
>Last-Modified:  Tue Oct 13 04:05:56 +0000 2020
>Originator:     John D. Baker
>Release:        NetBSD/macppc-7.99.4, pkgsrc-2014Q4
>Organization:
>Environment:
NetBSD sawtooth.technoskunk.fur 7.99.4 NetBSD 7.99.4 (GENERIC_LOWRES) #3: Thu Jan 22 15:23:27 CST 2015  sysop@verthandi.technoskunk.fur:/d0/build/current/obj/macppc/sys/arch/macppc/compile/GENERIC_LOWRES macppc

$ gcc --version
gcc (nb1 20141012) 4.8.4

>Description:
Building "multimedia/libvpx" on macppc (all powerpc?) incurs an
internal compiler error as follows:

[...]
    [CC] vp9/encoder/vp9_variance_c.c.o
libtool: compile:  gcc -O2 -maltivec -O3 -fPIC -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -Wdeclaration-after-statement -Wdisabled-optimization -Wpointer-arith -Wtype-limits -Wcast-qual -Wvla -Wimplicit-function-declaration -Wuninitialized -Wunused-variable -Wunused-but-set-variable -Wno-unused-function -I. -I/d0/build/pkgsrc/multimedia/libvpx/work/libvpx-1.3.0 -c vp9/encoder/vp9_variance_c.c  -fPIC -DPIC -o vp9/encoder/.libs/vp9_variance_c.c.o
rs6000_secondary_reload_inner:17027, type = load
(parallel [
        (set (reg:V16QI 78 1)
            (mem:V16QI (and:SI (reg/v/f:SI 65 lr [orig:1251 second_pred ] [1251])
                    (const_int -16 [0xfffffffffffffff0])) [0 MEM[(const __uint8_t *)second_pred_17(D) & 4294967280B]+0 S16 A128]))
        (clobber (reg:SI 31 31))
    ])
vp9/encoder/vp9_variance_c.c: In function 'vp9_sub_pixel_avg_variance8x16_c':
vp9/encoder/vp9_variance_c.c:1004:1: internal compiler error: in rs6000_secondary_reload_fail, at config/rs6000/rs6000.c:16818
 }
 ^
no stack trace because unwind library not available
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://www.NetBSD.org/support/send-pr.html> for instructions.
Makefile:128: recipe for target 'vp9/encoder/vp9_variance_c.c.o' failed
gmake[1]: *** [vp9/encoder/vp9_variance_c.c.o] Error 1
Makefile:17: recipe for target '.DEFAULT' failed
gmake: *** [.DEFAULT] Error 2
*** Error code 2

Stop.
make[1]: stopped in /x/pkgsrc/multimedia/libvpx


Submitted as category "pkg" in case some compiler option changes can
work around the problem.
>How-To-Repeat:
Attempt to build "multimedia/libvpx" on a macppc-current (any powerpc
port?) system.
>Fix:

>Release-Note:

>Audit-Trail:
From: "John D. Baker" <jdbaker@mylinuxisp.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/49600: macppc (powerpc) gcc 4.8.4 internal compiler error
 on multimedia/libvpx
Date: Fri, 23 Jan 2015 21:45:46 -0600 (CST)

 Removing the "-O3" optimization flag avoids the internal compiler error.
 The following patch accomplishes this:

 +Index: multimedia/libvpx/hacks.mk
 +===================================================================
 +RCS file: /cvsroot/pkgsrc/multimedia/libvpx/hacks.mk,v
 +retrieving revision 1.4
 +diff -u -p -r1.4 hacks.mk
 +--- multimedia/libvpx/hacks.mk	26 May 2014 18:10:22 -0000	1.4
 ++++ multimedia/libvpx/hacks.mk	24 Jan 2015 03:44:37 -0000
 +@@ -10,3 +10,17 @@ PKG_HACKS+=		sparc-gcc-lock-up
 + BUILDLINK_TRANSFORM+=	rm:-O[0-9]*
 + .  endif
 + .endif
 ++ 
 ++### GCC 4.8.4 internal compiler error in "vp9/encoder/vp9_variance_c.c".
 ++### See PR pkg/49600 for more details.
 ++.if ${OPSYS} == "NetBSD" && ${MACHINE_ARCH} == "powerpc"
 ++.  include "../../mk/compiler.mk"
 ++.  if !empty(CC_VERSION:Mgcc-4.[89].*)
 ++PKG_HACKS+=		powerpc-internal-compiler-error
 ++SUBST_CLASSES+=		libs
 ++SUBST_STAGE.libs=	post-configure
 ++SUBST_MESSAGE.libs=	Work around internal compiler error
 ++SUBST_FILES.libs=	libs-ppc32-linux-gcc.mk
 ++SUBST_SED.libs=		-e '/CFLAGS/s,-O3 ,,g'
 ++.  endif
 ++.endif

 I would prefer modifying the flags for only those sources that present
 a problem, but I don't see how at the moment.

 -- 
 |/"\ 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

Responsible-Changed-From-To: pkg-manager->ryoon
Responsible-Changed-By: hauke@NetBSD.org
Responsible-Changed-When: Sat, 24 Jan 2015 21:55:19 +0000
Responsible-Changed-Why:
Over to maintainer.


From: "John D. Baker" <jdbaker@mylinuxisp.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/49600: macppc (powerpc) gcc 4.8.4 internal compiler error
 on multimedia/libvpx
Date: Wed, 16 Sep 2015 05:20:26 -0500 (CDT)

 As of netbsd/macppc-7.99.21 this problem still occurs, although it shows
 up while compiling a different source file:

     [CC] vp9/encoder/vp9_temporal_filter.c.o
 libtool: compile:  gcc -O2 -maltivec -DNDEBUG -O3 -fPIC -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -Wdeclaration-after-statement -Wdisabled-optimization -Wpointer-arith -Wtype-limits -Wcast-qual -Wvla -Wimplicit-function-declaration -Wuninitialized -Wunused-variable -Wunused-but-set-variable -Wno-unused-function -I. -I/d0/build/pkgsrc/multimedia/libvpx/work/libvpx-1.4.0 -Wextra -c vp9/encoder/vp9_temporal_filter.c  -fPIC -DPIC -o vp9/encoder/.libs/vp9_temporal_filter.c.o
 rs6000_secondary_reload_inner:17198, type = load
 (parallel [
         (set (reg:V8HI 82 5)
             (mem:V8HI (and:SI (reg:SI 65 lr [orig:1018 D.10771 ] [1018])
                     (const_int -16 [0xfffffffffffffff0])) [17 MEM[(__uint16_t *)_890 & 4294967280B]+0 S16 A128]))
         (clobber (reg:SI 21 21))
     ])
 vp9/encoder/vp9_temporal_filter.c: In function 'vp9_temporal_filter_apply_c':
 vp9/encoder/vp9_temporal_filter.c:162:1: internal compiler error: in rs6000_secondary_reload_fail, at config/rs6000/rs6000.c:16989
  }
  ^
 no stack trace because unwind library not available
 Please submit a full bug report,
 with preprocessed source if appropriate.
 See <http://www.NetBSD.org/support/send-pr.html> for instructions.
 Makefile:148: recipe for target 'vp9/encoder/vp9_temporal_filter.c.o' failed


 Also, I thought -current updated GCC to 4.8.5?  My macppc and sparc systems
 running 7.99.21 report GCC 4.8.4.

 -- 
 |/"\ 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/49600: macppc (powerpc) gcc 4.8.4 internal compiler error
 on multimedia/libvpx
Date: Wed, 16 Sep 2015 07:17:36 -0500 (CDT)

 I should have mentioned that this is with pkgsrc-HEAD during the freeze
 before pkgsrc-2015Q3.

 The workaround posted before still applies in my case.

 I would guess that my usual update builds did not repopulate the
 destination directory or release sets.  The host cross-gcc is 4.8.5.
 Doing a non-update release build of macppc now.

 Will try rebuilding libvpx without my workaround when I have a native
 GCC 4.8.5.

 -- 
 |/"\ 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/49600: macppc (powerpc) gcc 4.8.4 internal compiler error
 on multimedia/libvpx
Date: Wed, 16 Sep 2015 15:42:33 -0500 (CDT)

 On Wed, 16 Sep 2015, John D. Baker wrote:

 > I would guess that my usual update builds did not repopulate the
 > destination directory or release sets.  The host cross-gcc is 4.8.5.
 > Doing a non-update release build of macppc now.
 >  
 > Will try rebuilding libvpx without my workaround when I have a native
 > GCC 4.8.5.

 Seems I did have gcc 4.8.5, but the string emitted by "--version" was
 stale due to being an update build.  Following non-update build the
 internal version symbol and "--version" output agree on 4.8.5.

 So, the problem persists with gcc 4.8.5 and the workaround is still
 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/49600: macppc (powerpc) gcc 4.8.4 internal compiler error
 on multimedia/libvpx
Date: Thu, 17 Dec 2015 01:31:31 -0600 (CST)

 As of 17 December 2015, libvpx v1.5.0 compiles without the hack
 posted earlier in this PR.

 There still seems to be some problem as later attempting to build
 "multimedia/ffmpeg010" fails claiming insufficient libvpx version.

 This complaint stems from "ffmpeg010"'s ./configure test program
 failing to link against libvpx, complaining that there are a number
 of undefined references:

 check_lib2 vpx/vpx_decoder.h vpx/vp8dx.h vpx_codec_dec_init_ver -lvpx
 check_func_headers vpx/vpx_decoder.h vpx/vp8dx.h vpx_codec_dec_init_ver -lvpx
 check_ld cc -lvpx
 check_cc
 BEGIN /d0/build/pkgsrc/multimedia/ffmpeg010/work/ffmpeg-0.10.16/tmp/ffconf.7UWGrOAV.c
     1   #include <vpx/vpx_decoder.h>
     2   #include <vpx/vp8dx.h>
     3   long check_vpx_codec_dec_init_ver(void) { return (long) vpx_codec_dec_init_ver; }
     4   int main(void) { return 0; }
 END /d0/build/pkgsrc/multimedia/ffmpeg010/work/ffmpeg-0.10.16/tmp/ffconf.7UWGrOAV.c
 gcc -I/usr/pkg/include -I/usr/include -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DPIC -O2 -I/usr/pkg/include -I/usr/include -std=c99 -fPIC -pthread -c -o /d0/build/pkgsrc/multimedia/ffmpeg010/work/ffmpeg-0.10.16/tmp/ffconf.Pjzpp8Un.o /d0/build/pkgsrc/multimedia/ffmpeg010/work/ffmpeg-0.10.16/tmp/ffconf.7UWGrOAV.c
 gcc -Wl,-R/usr/pkg/lib/ffmpeg010 -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -L/usr/lib -Wl,-R/usr/lib -Wl,--as-needed -Wl,-z,noexecstack -o /d0/build/pkgsrc/multimedia/ffmpeg010/work/ffmpeg-0.10.16/tmp/ffconf.869bZJIc /d0/build/pkgsrc/multimedia/ffmpeg010/work/ffmpeg-0.10.16/tmp/ffconf.Pjzpp8Un.o -lvpx -lvorbisenc -lvorbis -logg -ltheoraenc -ltheoradec -logg -lopencore-amrwb -lopencore-amrnb -lmp3lame -lfaac -lm -pthread -lbz2 -lz
 /d0/build/pkgsrc/multimedia/ffmpeg010/work/.buildlink/lib/libvpx.so: undefined reference to `round'
 /d0/build/pkgsrc/multimedia/ffmpeg010/work/.buildlink/lib/libvpx.so: undefined reference to `log'
 /d0/build/pkgsrc/multimedia/ffmpeg010/work/.buildlink/lib/libvpx.so: undefined reference to `sqrt'
 /d0/build/pkgsrc/multimedia/ffmpeg010/work/.buildlink/lib/libvpx.so: undefined reference to `log10'
 /d0/build/pkgsrc/multimedia/ffmpeg010/work/.buildlink/lib/libvpx.so: undefined reference to `pow'
 ERROR: libvpx decoder version must be >=0.9.1


 I'll reinstate the hack, rebuild libvpx, and try again.

 -- 
 |/"\ 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/49600: macppc (powerpc) gcc 4.8.4 internal compiler error
 on multimedia/libvpx
Date: Thu, 17 Dec 2015 09:22:07 -0600 (CST)

 As of pkgsrc-HEAD prior to the pkgsrc-2015Q4 branch (libvpx 1.5.0) on
 NetBSD/macppc-7.99.24 with GCC 4.8.5, the internal compiler error
 no-longer occurs.

 The contents of the WRKSRC directory has changed making the
 previously-posted hack irrelevant.

 While libvpx compiles and links without any special treatment, it appears
 to be broken.  Configuring other packages which depend on it--particularly
 ffmpeg010--fails with undefined references as noted previously.

 As that's a subject for a different PR, this one may be closed.

 -- 
 |/"\ 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/49600: macppc (powerpc) gcc 4.8.4 internal compiler error
 on multimedia/libvpx
Date: Fri, 18 Dec 2015 09:36:09 -0600 (CST)

 On Thu, 17 Dec 2015, John D. Baker wrote:

 > As that's a subject for a different PR, this one may be closed.

 With the removal of PowerPC support from libvpx 1.5.0, it's not clear
 whether the problem has disappeared or is just masked by my primitive
 hacks to get it to compile and link reasonably.

 If I can transplant the PowerPC support from libvpx 1.4.0 to 1.5.0,
 it may yet reappear, so don't close this PR.

 Thanks.

 -- 
 |/"\ 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/49600: macppc (powerpc) gcc 4.8.4 internal compiler error
 on multimedia/libvpx
Date: Tue, 17 May 2016 23:16:03 -0500 (CDT)

 On Fri, 18 Dec 2015, John D. Baker wrote:

 > If I can transplant the PowerPC support from libvpx 1.4.0 to 1.5.0,
 > it may yet reappear, so don't close this PR.

 I've done this (see PR pkg/50814).  The problem remains for GCC 4.x.

 GCC 5.3.0 (as of 7.99.29 or so) does not exhibit this problem.

 See also PR toolchain/50570.

 -- 
 |/"\ 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: open->closed
State-Changed-By: maya@NetBSD.org
State-Changed-When: Tue, 13 Oct 2020 04:05:56 +0000
State-Changed-Why:
This PR deals with an already-irrelevant internal compiler error, as it is reported to be fixed in newer GCC. Closing it -- I think if we stick to the relevant issues it will be more attractive to fix them.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.