NetBSD Problem Report #47213

From Wolfgang.Stukenbrock@nagler-company.com  Mon Nov 19 09:33:45 2012
Return-Path: <Wolfgang.Stukenbrock@nagler-company.com>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	by www.NetBSD.org (Postfix) with ESMTP id BC98063E8A7
	for <gnats-bugs@gnats.NetBSD.org>; Mon, 19 Nov 2012 09:33:44 +0000 (UTC)
Message-Id: <20121119093333.2952C97110@s011.nagler-company.com>
Date: Mon, 19 Nov 2012 10:33:33 +0100 (CET)
From: Wolfgang.Stukenbrock@nagler-company.com
Reply-To: Wolfgang.Stukenbrock@nagler-company.com
To: gnats-bugs@gnats.NetBSD.org
Subject: gcc45, gcc46 and gcc47 from pkgsrc-2012Q3 on NetBSD installs bad include files
X-Send-Pr-Version: 3.95

>Number:         47213
>Category:       pkg
>Synopsis:       gcc45, gcc46 and gcc47 from pkgsrc-2012Q3 on NetBSD installs bad include files
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    maya
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Nov 19 09:35:00 +0000 2012
>Closed-Date:    Thu Dec 29 23:38:12 +0000 2016
>Last-Modified:  Thu Dec 29 23:38:12 +0000 2016
>Originator:     Dr. Wolfgang Stukenbrock
>Release:        NetBSD 5.1.2 - pkgsrc 2012Q3
>Organization:
Dr. Nagler & Company GmbH
>Environment:


System: NetBSD s011 5.1.2 NetBSD 5.1.2 (NSW-S011) #5: Fri Nov 16 14:54:56 CET 2012 wgstuken@s011:/usr/src/sys/arch/amd64/compile/NSW-S011 amd64
Architecture: x86_64
Machine: amd64
>Description:
	If the preprocessor variable _FORTIFY_SOURCE is defined to something larger 0, than the file ssp/stdio.h is included
	from stdio.h. There is a special version inside the gcc-include tree for gcc45, gcc46 and gcc47.
	There the file "ssp.h" will be included. This file is located in the ssp subdirectory too, but the include statement
	does not honor the subdirctory. The system headerfiles /usr/include/ssp/{stdio,string,unistd}.h include
	"ssp/ssp.h" and this works as expected.
>How-To-Repeat:
	install lang/gcc45, lang/gcc46 and/or lang/gcc47 and try to compile something - I'm trying to compile rstudio-server.
	You will end up in messages like:

In file included from /usr/include/stdio.h:498:0,
                 from /usr/include/wchar.h:67,
                 from /home/.pkg/pkg/gcc45/bin/../lib/gcc/../../include/c++/cwchar:47,
                 from /home/.pkg/pkg/gcc45/bin/../lib/gcc/../../include/c++/bits/postypes.h:42,
                 from /home/.pkg/pkg/gcc45/bin/../lib/gcc/../../include/c++/iosfwd:42,
                 from /var/tmp/rstudio-rstudio-9a26dbb/src/cpp/core/include/core/Error.hpp:17,
                 from /var/tmp/rstudio-rstudio-9a26dbb/src/cpp/core/Assert.cpp:15:
/home/.pkg/pkg/gcc45/bin/../lib/gcc/x86_64-unknown-netbsd5.1.2/4.5.3/include/ssp/stdio.h:38:17: fatal error: ssp.h: No such file or directory
compilation terminated.

	Remark: I've placed /usr/pkg in /home/.pkg/pkg for filesystem space reasons on my test system.
	        /usr/pkg is a symlink to /home/.pkg/pkg.
	The output is taken from gcc45. gcc46 and gcc47 produces the "same" messages.
	Any hello world program that include stdio.h compiled with e.g. "/usr/pkg/gcc46/bin/bin -D_FORTIFY_SOURCE=1 t.c"
	will fail too and report:
In file included from /usr/include/stdio.h:498:0,
                 from t.c:1:
/home/.pkg/pkg/gcc46/bin/../lib/gcc/x86_64-unknown-netbsd5.1.2/4.6.3/include/ssp/stdio.h:38:17: fatal error: ssp.h: No such file or directory
compilation terminated.

	My example programm t.c follows:
#include <stdio.h>
int main(int argc, char **argv) { return 0; }
>Fix:
	change the include lines from "#include <ssp.h>" to "#include <ssp/ssp.h>" and it will compile.
	The files ssp/stdio.h, ssp/strings.h and ssp/unistd.h are affected.
	The system compile gcc-4.1.x includes "ssp/ssp.h" in the corresponding files too, so this fix seems
	to be the correct way.
	I'm not shure where to add a patch for this to the gcc sources - the build of gcc looks a little bit special.

	remark: I'm not shure if gcc44 is affected too. It does not compile on 5.1.2 here. I will report this as own bug.

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->sbd
Responsible-Changed-By: hauke@NetBSD.org
Responsible-Changed-When: Sun, 16 Dec 2012 19:31:06 +0000
Responsible-Changed-Why:
Over to maintainer.


From: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/47213: gcc45, gcc46 and gcc47 from pkgsrc-2012Q3 on NetBSD
 installs bad include files
Date: Sun, 23 Nov 2014 01:40:31 +0000

 Not sent to gnats:
    ------

 From: Patrick Welche <prlw1@cam.ac.uk>
 To: pkgsrc-bugs@netbsd.org
 Subject: Re: pkg/47213
 Date: Sat, 15 Feb 2014 12:48:45 +0000

 The same problem exists with gcc48.

Responsible-Changed-From-To: sbd->pkg-manager
Responsible-Changed-By: dholland@NetBSD.org
Responsible-Changed-When: Sun, 26 Jun 2016 04:36:24 +0000
Responsible-Changed-Why:
sbd resigned and shouldn't own PRs


Responsible-Changed-From-To: pkg-manager->maya
Responsible-Changed-By: maya@NetBSD.org
Responsible-Changed-When: Tue, 06 Sep 2016 09:20:08 +0000
Responsible-Changed-Why:
I'm already disabling libssp on all gcc versions (that I can build).


From: "Maya Rashish" <maya@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/47213 CVS commit: pkgsrc/lang
Date: Tue, 6 Sep 2016 12:00:33 +0000

 Module Name:	pkgsrc
 Committed By:	maya
 Date:		Tue Sep  6 12:00:33 UTC 2016

 Modified Files:
 	pkgsrc/lang/gcc47: Makefile distinfo
 	pkgsrc/lang/gcc47-libs: Makefile
 Added Files:
 	pkgsrc/lang/gcc47/patches: patch-gcc_config_netbsd.h

 Log Message:
 gcc47: don't use PCH for libstdc++ on gcc5, it causes hangs during configure.
 limited to gcc5 because others do not seem to run into the same issues, to
 avoid a regression for them.

 disable libssp on netbsd - it conflicts with native libssp
 (related: PR pkg/47213)

 Use a more sane specfile for netbsd, linking against libc when building
 shared.

 bump gcc47 PKGREVISION
 bump gcc47-libs PKGREVISION further than gcc47


 To generate a diff of this commit:
 cvs rdiff -u -r1.37 -r1.38 pkgsrc/lang/gcc47/Makefile
 cvs rdiff -u -r1.26 -r1.27 pkgsrc/lang/gcc47/distinfo
 cvs rdiff -u -r1.23 -r1.24 pkgsrc/lang/gcc47-libs/Makefile
 cvs rdiff -u -r0 -r1.1 pkgsrc/lang/gcc47/patches/patch-gcc_config_netbsd.h

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "Maya Rashish" <maya@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/47213 CVS commit: pkgsrc/lang/gcc46
Date: Tue, 6 Sep 2016 13:57:02 +0000

 Module Name:	pkgsrc
 Committed By:	maya
 Date:		Tue Sep  6 13:57:02 UTC 2016

 Modified Files:
 	pkgsrc/lang/gcc46: Makefile distinfo
 Added Files:
 	pkgsrc/lang/gcc46/patches: patch-gcc_config_netbsd.h
 	    patch-include_libiberty.h patch-libiberty___doprnt.c
 	    patch-libiberty_asprintf.c patch-libiberty_concat.c
 	    patch-libiberty_snprintf.c patch-libiberty_vasprintf.c
 	    patch-libiberty_vsnprintf.c

 Log Message:
 gcc46: use a more reasonable specfile for netbsd

 disable libssp on netbsd - it conflicts with native libssp (PR pkg/47213)

 build fix by using stdarg instead of VA_*, cherry picked from
 https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=206881
 fixes PR pkg/50042

 bump PKGREVISION


 To generate a diff of this commit:
 cvs rdiff -u -r1.31 -r1.32 pkgsrc/lang/gcc46/Makefile
 cvs rdiff -u -r1.20 -r1.21 pkgsrc/lang/gcc46/distinfo
 cvs rdiff -u -r0 -r1.1 pkgsrc/lang/gcc46/patches/patch-gcc_config_netbsd.h \
     pkgsrc/lang/gcc46/patches/patch-include_libiberty.h \
     pkgsrc/lang/gcc46/patches/patch-libiberty___doprnt.c \
     pkgsrc/lang/gcc46/patches/patch-libiberty_asprintf.c \
     pkgsrc/lang/gcc46/patches/patch-libiberty_concat.c \
     pkgsrc/lang/gcc46/patches/patch-libiberty_snprintf.c \
     pkgsrc/lang/gcc46/patches/patch-libiberty_vasprintf.c \
     pkgsrc/lang/gcc46/patches/patch-libiberty_vsnprintf.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->closed
State-Changed-By: maya@NetBSD.org
State-Changed-When: Thu, 29 Dec 2016 23:38:12 +0000
State-Changed-Why:
I've removed GCC 4.5, 4.6, 4.7 (we had too many GCC versions, and GCC 4.8 ought to be enough for errbody), and the newer versions are all fixed, hopefully


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