NetBSD Problem Report #48670

From www@NetBSD.org  Thu Mar 20 22:00:31 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 AF2D3A40D8
	for <gnats-bugs@gnats.NetBSD.org>; Thu, 20 Mar 2014 22:00:31 +0000 (UTC)
Message-Id: <20140320220030.44691A580B@mollari.NetBSD.org>
Date: Thu, 20 Mar 2014 22:00:30 +0000 (UTC)
From: jdbaker@mylinuxisp.com
Reply-To: jdbaker@mylinuxisp.com
To: gnats-bugs@NetBSD.org
Subject: lang/gcc46 build fails on netbsd-5/i386
X-Send-Pr-Version: www-1.0

>Number:         48670
>Category:       pkg
>Synopsis:       lang/gcc46 build fails on netbsd-5/i386
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    ryoon
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Mar 20 22:05:00 +0000 2014
>Closed-Date:    Sun Mar 30 16:04:55 +0000 2014
>Last-Modified:  Sun Mar 30 16:04:55 +0000 2014
>Originator:     John D. Baker
>Release:        NetBSD/i386-5.2_STABLE, pkgsrc-HEAD (pre-pkgsrc-2014Q1)
>Organization:
>Environment:
NetBSD verthandi.technoskunk.fur 5.2_STABLE NetBSD 5.2_STABLE (VERTHANDI) #13: Wed Dec 18 05:44:53 CST 2013  sysop@verthandi.technoskunk.fur:/d0/build/netbsd-5/obj/i386/sys/arch/i386/compile/VERTHANDI i386

>Description:
After updating to pkgsrc-HEAD at the start of the freeze before the
branch of pkgsrc-2014Q1, building "lang/gcc46" (needed for www/firefox
and sysutils/memtestplus) fails on a netbsd-5/i386 system as follows:

[...]
/usr/pkg/bin/bash ./libtool --tag CC   --mode=link /d0/build/pkgsrc/lang/gcc46/work/obj/./gcc/xgcc -B/d0/build/pkgsrc/lang/gcc46/work/obj/./gcc/ -B/usr/pkg/gcc46/i386-unknown-netbsdelf5.2./bin/ -B/usr/pkg/gcc46/i386-unknown-netbsdelf5.2./lib/ -isystem /usr/pkg/gcc46/i386-unknown-netbsdelf5.2./include -isystem /usr/pkg/gcc46/i386-unknown-netbsdelf5.2./sys-include    -Wall -Werror -Wc,-pthread -g -O2 -I/d0/build/pkgsrc/lang/gcc46/work/.buildlink/include -I/usr/pkg/include -I/usr/include   -Wl,-O1   -o libgomp.la -version-info 1:0:0 -Wl,--version-script,/d0/build/pkgsrc/lang/gcc46/work/gcc-4.6.4/libgomp/libgomp.map  -rpath /usr/pkg/gcc46/lib alloc.lo barrier.lo critical.lo env.lo error.lo iter.lo iter_ull.lo loop.lo loop_ull.lo ordered.lo parallel.lo sections.lo single.lo task.lo team.lo work.lo lock.lo mutex.lo proc.lo sem.lo bar.lo ptrlock.lo time.lo fortran.lo affinity.lo  
libtool: link: /d0/build/pkgsrc/lang/gcc46/work/obj/./gcc/xgcc -B/d0/build/pkgsrc/lang/gcc46/work/obj/./gcc/ -B/usr/pkg/gcc46/i386-unknown-netbsdelf5.2./bin/ -B/usr/pkg/gcc46/i386-unknown-netbsdelf5.2./lib/ -isystem /usr/pkg/gcc46/i386-unknown-netbsdelf5.2./include -isystem /usr/pkg/gcc46/i386-unknown-netbsdelf5.2./sys-include    -shared  .libs/alloc.o .libs/barrier.o .libs/critical.o .libs/env.o .libs/error.o .libs/iter.o .libs/iter_ull.o .libs/loop.o .libs/loop_ull.o .libs/ordered.o .libs/parallel.o .libs/sections.o .libs/single.o .libs/task.o .libs/team.o .libs/work.o .libs/lock.o .libs/mutex.o .libs/proc.o .libs/sem.o .libs/bar.o .libs/ptrlock.o .libs/time.o .libs/fortran.o .libs/affinity.o    -pthread -Wl,-O1 -Wl,--version-script -Wl,/d0/build/pkgsrc/lang/gcc46/work/gcc-4.6.4/libgomp/libgomp.map   -Wl,-soname -Wl,libgomp.so.1 -o .libs/libgomp.so.1.0
.libs/task.o: In function `GOMP_task':
/d0/build/pkgsrc/lang/gcc46/work/gcc-4.6.4/libgomp/task.c:183: undefined reference to `__stack_chk_fail_local'
.libs/team.o: In function `gomp_team_start':
/d0/build/pkgsrc/lang/gcc46/work/gcc-4.6.4/libgomp/team.c:451: undefined reference to `__stack_chk_fail_local'
/usr/bin/ld: .libs/libgomp.so.1.0: hidden symbol `__stack_chk_fail_local' isn't defined
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: ld returned 1 exit status
Makefile:446: recipe for target 'libgomp.la' failed
gmake[5]: *** [libgomp.la] Error 1
gmake[5]: Leaving directory '/d0/build/pkgsrc/lang/gcc46/work/obj/i386-unknown-netbsdelf5.2./libgomp'
Makefile:716: recipe for target 'all-recursive' failed
gmake[4]: *** [all-recursive] Error 1
gmake[4]: Leaving directory '/d0/build/pkgsrc/lang/gcc46/work/obj/i386-unknown-netbsdelf5.2./libgomp'
Makefile:349: recipe for target 'all' failed
gmake[3]: *** [all] Error 2
gmake[3]: Leaving directory '/d0/build/pkgsrc/lang/gcc46/work/obj/i386-unknown-netbsdelf5.2./libgomp'
Makefile:19172: recipe for target 'all-stage1-target-libgomp' failed
gmake[2]: *** [all-stage1-target-libgomp] Error 2
gmake[2]: Leaving directory '/d0/build/pkgsrc/lang/gcc46/work/obj'
Makefile:19971: recipe for target 'stage1-bubble' failed
gmake[1]: *** [stage1-bubble] Error 2
gmake[1]: Leaving directory '/d0/build/pkgsrc/lang/gcc46/work/obj'
Makefile:892: recipe for target 'all' failed
gmake: *** [all] Error 2
*** Error code 2

Stop.
make: stopped in /x/pkgsrc/lang/gcc46
WARNING: *** Please consider adding c++ to USE_LANGUAGES in the package Makefile.
*** Error code 1

Stop.
make: stopped in /x/pkgsrc/lang/gcc46

>How-To-Repeat:
With pkgsrc-HEAD, attempt to build "lang/gcc46" on a netbsd-5/i386
system (other arches?).
>Fix:

>Release-Note:

>Audit-Trail:
From: christos@zoulas.com (Christos Zoulas)
To: gnats-bugs@NetBSD.org, pkg-manager@netbsd.org, gnats-admin@netbsd.org, 
	pkgsrc-bugs@netbsd.org
Cc: 
Subject: Re: pkg/48670: lang/gcc46 build fails on netbsd-5/i386
Date: Thu, 20 Mar 2014 20:19:23 -0400

 On Mar 20, 10:05pm, jdbaker@mylinuxisp.com (jdbaker@mylinuxisp.com) wrote:
 -- Subject: pkg/48670: lang/gcc46 build fails on netbsd-5/i386

 | >Number:         48670
 | >Category:       pkg
 | >Synopsis:       lang/gcc46 build fails on netbsd-5/i386
 | >Confidential:   no
 | >Severity:       serious
 | >Priority:       high
 | >Responsible:    pkg-manager
 | >State:          open
 | >Class:          sw-bug
 | >Submitter-Id:   net
 | >Arrival-Date:   Thu Mar 20 22:05:00 +0000 2014
 | >Originator:     John D. Baker
 | >Release:        NetBSD/i386-5.2_STABLE, pkgsrc-HEAD (pre-pkgsrc-2014Q1)
 | >Organization:
 | >Environment:
 | NetBSD verthandi.technoskunk.fur 5.2_STABLE NetBSD 5.2_STABLE (VERTHANDI) #13: Wed Dec 18 05:44:53 CST 2013  sysop@verthandi.technoskunk.fur:/d0/build/netbsd-5/obj/i386/sys/arch/i386/compile/VERTHANDI i386
 | 
 | >Description:
 | After updating to pkgsrc-HEAD at the start of the freeze before the
 | branch of pkgsrc-2014Q1, building "lang/gcc46" (needed for www/firefox
 | and sysutils/memtestplus) fails on a netbsd-5/i386 system as follows:

 Are you using ssp?

 christos

From: "John D. Baker" <jdbaker@mylinuxisp.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/48670: lang/gcc46 build fails on netbsd-5/i386
Date: Fri, 21 Mar 2014 04:58:53 -0500 (CDT)

 On Fri, 21 Mar 2014, Christos Zoulas wrote:

 > | branch of pkgsrc-2014Q1, building "lang/gcc46" (needed for www/firefox
 > | and sysutils/memtestplus) fails on a netbsd-5/i386 system as follows:
 >
 > Are you using ssp?

 I'm not sure.  This appears to be controlled by "USE_SSP".  I do not
 define or set this in my "mk.conf" file.  The manual asserts the default
 value is "no".  The variable (or even the very string) does not appear
 anywhere in "/usr/pkgsrc/mk/*".

 In my netbsd-5 source tree, "share/mk/bsd.sys.mk" (and therefore also
 "/usr/share/mk/bsd.sys.mk") contains "USE_SSP?=yes" which would appear
 to contradict the "mk.conf(5)" manual.

 IIUC this means my release builds use SSP for kernel/userland (except
 INSTALL_FLOPPY kernel).  Unless the pkgsrc framework includes "bsd.sys.mk",
 they do as they please, it seems.


 I should note that gcc46 built fine from pkgsrc-2013Q4 branch on my
 netbsd-5/i386 hosts.  Its present failure would seem to indicate a
 change in the package or infrastructure in the interrim.

 -- 
 |/"\ 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: christos@zoulas.com (Christos Zoulas)
To: gnats-bugs@NetBSD.org, pkg-manager@netbsd.org, gnats-admin@netbsd.org, 
	pkgsrc-bugs@netbsd.org, jdbaker@mylinuxisp.com
Cc: 
Subject: Re: pkg/48670: lang/gcc46 build fails on netbsd-5/i386
Date: Fri, 21 Mar 2014 09:06:25 -0400

 On Mar 21, 10:00am, jdbaker@mylinuxisp.com ("John D. Baker") wrote:
 -- Subject: Re: pkg/48670: lang/gcc46 build fails on netbsd-5/i386

 |  I'm not sure.  This appears to be controlled by "USE_SSP".  I do not
 |  define or set this in my "mk.conf" file.  The manual asserts the default
 |  value is "no".  The variable (or even the very string) does not appear
 |  anywhere in "/usr/pkgsrc/mk/*".

 Put USE_SSP=no in /etc/mk.conf and try rebuilding the library that has
 the missing symbol.

 christos

From: "John D. Baker" <jdbaker@mylinuxisp.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/48670: lang/gcc46 build fails on netbsd-5/i386
Date: Fri, 21 Mar 2014 10:20:59 -0500 (CDT)

 On Fri, 21 Mar 2014, Christos Zoulas wrote:

 > On Mar 21, 10:00am, jdbaker@mylinuxisp.com ("John D. Baker") wrote:
 > -- Subject: Re: pkg/48670: lang/gcc46 build fails on netbsd-5/i386
 >
 > |  I'm not sure.  This appears to be controlled by "USE_SSP".  I do not
 > |  define or set this in my "mk.conf" file.  The manual asserts the default
 > |  value is "no".  The variable (or even the very string) does not appear
 > |  anywhere in "/usr/pkgsrc/mk/*".

 My earlier examinations lacked sufficient context.  I'm fairly confident
 that USE_SSP being unset is equivalent to "no" (as USE_FORT is also
 unset and was guarding the conditional assignment of USE_SSP in
 bsd.sys.mk).  Thus, my kernel and userland are not using SSP
 (INSTALL_FLOPPY just overrides any global "yes").

 > Put USE_SSP=no in /etc/mk.conf and try rebuilding the library that has
 > the missing symbol.

 To confine the scope to pkgsrc and lang/gcc46, I put:

 .ifdef BSD_PKG_MK

 # [other pkgsrc-only stuff]

 .if "${PKGPATH}" == "lang/gcc46"
    USE_SSP=no
 .endif

 .endif

 and tried rebuilding again (via pkg_rolling-replace).  The result was the
 same.

 -- 
 |/"\ 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: christos@zoulas.com (Christos Zoulas)
To: gnats-bugs@NetBSD.org, pkg-manager@netbsd.org, gnats-admin@netbsd.org, 
	pkgsrc-bugs@netbsd.org, jdbaker@mylinuxisp.com
Cc: 
Subject: Re: pkg/48670: lang/gcc46 build fails on netbsd-5/i386
Date: Fri, 21 Mar 2014 12:04:39 -0400

 On Mar 21,  3:25pm, jdbaker@mylinuxisp.com ("John D. Baker") wrote:
 -- Subject: Re: pkg/48670: lang/gcc46 build fails on netbsd-5/i386

 | The following reply was made to PR pkg/48670; it has been noted by GNATS.
 | 
 | From: "John D. Baker" <jdbaker@mylinuxisp.com>
 | To: gnats-bugs@NetBSD.org
 | Cc: 
 | Subject: Re: pkg/48670: lang/gcc46 build fails on netbsd-5/i386
 | Date: Fri, 21 Mar 2014 10:20:59 -0500 (CDT)
 | 
 |  On Fri, 21 Mar 2014, Christos Zoulas wrote:
 |  
 |  > On Mar 21, 10:00am, jdbaker@mylinuxisp.com ("John D. Baker") wrote:
 |  > -- Subject: Re: pkg/48670: lang/gcc46 build fails on netbsd-5/i386
 |  >
 |  > |  I'm not sure.  This appears to be controlled by "USE_SSP".  I do not
 |  > |  define or set this in my "mk.conf" file.  The manual asserts the default
 |  > |  value is "no".  The variable (or even the very string) does not appear
 |  > |  anywhere in "/usr/pkgsrc/mk/*".
 |  
 |  My earlier examinations lacked sufficient context.  I'm fairly confident
 |  that USE_SSP being unset is equivalent to "no" (as USE_FORT is also
 |  unset and was guarding the conditional assignment of USE_SSP in
 |  bsd.sys.mk).  Thus, my kernel and userland are not using SSP
 |  (INSTALL_FLOPPY just overrides any global "yes").
 |  
 |  > Put USE_SSP=no in /etc/mk.conf and try rebuilding the library that has
 |  > the missing symbol.
 |  
 |  To confine the scope to pkgsrc and lang/gcc46, I put:
 |  
 |  .ifdef BSD_PKG_MK
 |  
 |  # [other pkgsrc-only stuff]
 |  
 |  .if "${PKGPATH}" == "lang/gcc46"
 |     USE_SSP=no
 |  .endif
 |  
 |  .endif
 |  
 |  and tried rebuilding again (via pkg_rolling-replace).  The result was the
 |  same.

 Sure, but has the library in question been rebuilt and does it still have
 the missing symbol?

 christos

From: "John D. Baker" <jdbaker@mylinuxisp.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/48670: lang/gcc46 build fails on netbsd-5/i386
Date: Fri, 21 Mar 2014 11:48:56 -0500 (CDT)

 On Fri, 21 Mar 2014, Christos Zoulas wrote:

 > Sure, but has the library in question been rebuilt and does it still have
 > the missing symbol?

 As I'm using pkg_rolling-replace, it does 'make clean' first for each
 package it builds for replacement so each attempt starts over from the
 beginning.

 Thus, lang/gcc46 was being rebuilt from scratch following the addition of
 "USE_SSP=no" to "mk.conf".

 The build failed in exactly the same way as originally reported.

 -- 
 |/"\ 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: Makoto Fujiwara <makoto@ki.nu>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/48670: lang/gcc46 build fails on netbsd-5/i386
Date: Sat, 22 Mar 2014 23:52:23 +0900

 With NetBSD/i386 5.2, I am having exactly the same situation
 (namely the problem reproduced).

 And adding following lines in /etc/mk.conf changes a little
 bit, but still having similar error.

 .ifdef BSD_PKG_MK
 . if "${PKGPATH}" == "lang/gcc46"
 CFLAGS+=        -fno-stack-protector
 . endif
 .endif

 Just FYI,
 ---
 mef@NetBSD.org
 Makoto Fujiwara, 

 ../libiberty/pic/libiberty.a(argv.o): In function `buildargv':
 argv.c:(.text+0x392): undefined reference to `__stack_chk_fail_local'
 ../libiberty/pic/libiberty.a(simple-object.o): In function `simple_object_start_read':
 simple-object.c:(.text+0x319): undefined reference to `__stack_chk_fail_local'
 ../libiberty/pic/libiberty.a(simple-object-coff.o): In function `simple_object_coff_match':
 simple-object-coff.c:(.text+0x40b): undefined reference to `__stack_chk_fail_local'
 ../libiberty/pic/libiberty.a(simple-object-coff.o): In function `simple_object_coff_find_sections':
 simple-object-coff.c:(.text+0x7d6): undefined reference to `__stack_chk_fail_local'
 ../libiberty/pic/libiberty.a(simple-object-coff.o): In function `simple_object_coff_write_to_file':
 simple-object-coff.c:(.text+0xf23): undefined reference to `__stack_chk_fail_local'
 ../libiberty/pic/libiberty.a(simple-object-elf.o):simple-object-elf.c:(.text+0xaf6): more undefined references to `__stack_chk_fail_local' follow
 /usr/bin/ld: .libs/liblto_plugin.so.0.0: hidden symbol `__stack_chk_fail_local' isn't defined
 /usr/bin/ld: final link failed: Nonrepresentable section on output
 collect2: ld returned 1 exit status
 gmake[4]: *** [liblto_plugin.la] Error 1
 gmake[4]: Leaving directory `/export/WRKOBJDIR/lang/gcc46/work/obj/lto-plugin'
 gmake[3]: *** [all] Error 2
 gmake[3]: Leaving directory `/export/WRKOBJDIR/lang/gcc46/work/obj/lto-plugin'
 gmake[2]: *** [all-stage2-lto-plugin] Error 2
 gmake[2]: Leaving directory `/export/WRKOBJDIR/lang/gcc46/work/obj'
 gmake[1]: *** [stage2-bubble] Error 2
 gmake[1]: Leaving directory `/export/WRKOBJDIR/lang/gcc46/work/obj'
 gmake: *** [all] Error 2
 *** Error code 2

Responsible-Changed-From-To: pkg-manager->ryoon
Responsible-Changed-By: ryoon@NetBSD.org
Responsible-Changed-When: Sat, 29 Mar 2014 10:36:46 +0000
Responsible-Changed-Why:
I have a patch.


From: "Ryo ONODERA" <ryoon@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/48670 CVS commit: pkgsrc/lang/gcc46
Date: Sat, 29 Mar 2014 20:50:03 +0000

 Module Name:	pkgsrc
 Committed By:	ryoon
 Date:		Sat Mar 29 20:50:03 UTC 2014

 Modified Files:
 	pkgsrc/lang/gcc46: distinfo
 Added Files:
 	pkgsrc/lang/gcc46/patches: patch-gcc_config_i386_i386.c

 Log Message:
 Fix PR pkg/48670, fix build under NetBSD/i386 5.2


 To generate a diff of this commit:
 cvs rdiff -u -r1.14 -r1.15 pkgsrc/lang/gcc46/distinfo
 cvs rdiff -u -r0 -r1.1 pkgsrc/lang/gcc46/patches/patch-gcc_config_i386_i386.c

 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: ryoon@NetBSD.org
State-Changed-When: Sun, 30 Mar 2014 00:47:39 +0000
State-Changed-Why:
Please cvs update and try again.


From: "John D. Baker" <jdbaker@mylinuxisp.com>
To: gnats-bugs@NetBSD.org
Cc: ryoon@NetBSD.org
Subject: Re: pkg/48670 (lang/gcc46 build fails on netbsd-5/i386)
Date: Sun, 30 Mar 2014 08:36:53 -0500 (CDT)

 On Sun, 30 Mar 2014, ryoon@NetBSD.org wrote:

 > State-Changed-Why:
 > Please cvs update and try again.

 It builds now.  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

State-Changed-From-To: feedback->closed
State-Changed-By: ryoon@NetBSD.org
State-Changed-When: Sun, 30 Mar 2014 16:04:55 +0000
State-Changed-Why:
confirmed fixed, thank you.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(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-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.