NetBSD Problem Report #47274

From www@NetBSD.org  Sun Dec  2 07:04:41 2012
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	by www.NetBSD.org (Postfix) with ESMTP id 73A2463DFC7
	for <gnats-bugs@gnats.NetBSD.org>; Sun,  2 Dec 2012 07:04:41 +0000 (UTC)
Message-Id: <20121202070439.E143363DFC7@www.NetBSD.org>
Date: Sun,  2 Dec 2012 07:04:39 +0000 (UTC)
From: richard.palo@baou.fr
Reply-To: richard.palo@baou.fr
To: gnats-bugs@NetBSD.org
Subject: problems building gcc on solaris if skey is installed and/or if gcc-go included in options
X-Send-Pr-Version: www-1.0

>Number:         47274
>Category:       pkg
>Synopsis:       problems building gcc on solaris if skey is installed and/or if gcc-go included in options
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    solaris-pkg-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Dec 02 07:05:00 +0000 2012
>Last-Modified:  Sun Dec 02 17:55:09 +0000 2012
>Originator:     Richard PALO
>Release:        pkgsrc trunk
>Organization:
>Environment:
SunOS devzoneX 5.11 oi_151a7 i86pc i386 i86pc Solaris

>Description:
as requested, here is the bug report for the build time problems concerning gcc.

1. as indicated in my post to pkgsrc-users:
Just came across this head-scratching anomaly...

When compiling gcc (here 4.7.2), libiberty/sha1.c bombs out if pkgsrc/security/skey is installed as apparently this packages installs a sha1.h in ${PREFIX}/include which occludes /usr/include/sha1.h (and /usr/include/sys/sha1.h for needed integer types.

Is this a problem with skey, or libiberty which isn't detecting whether
or not (in configure, for example) the sha1.h in the path includes sys/types.h or not.

to complete the gcc build, simply deinstall skey and reinstall later if need be.

Might this (skey's sha1.h ) cause build problems elsewhere (similar to libiberty)? 


2. the second problem is if gcc-go is included in options, the build (at least with ABI=64) fails with:
/bin/bash ./libtool  --tag=CC   --mode=compile /tmp/pkgsrc/lang/gcc47/work/build/./gcc/xgcc -B/tmp/pkgsrc/lang/gcc47/work/build/./gcc/ -B/opt/pkg/gcc47/x86_64-sun-solaris2.11/bin/ -B/opt/pkg/gcc47/x86_64-sun-solaris2.11/lib/ -isystem /opt/pkg/gcc47/x86_64-sun-solaris2.11/include -isystem /opt/pkg/gcc47/x86_64-sun-solaris2.11/sys-include  -m32 -DHAVE_CONFIG_H -I. -I../../../../gcc-4.7.2/libgo  -fno-inline-functions -I ../../../../gcc-4.7.2/libgo/runtime -I../../../../gcc-4.7.2/libgo/../libffi/include -I../libffi/include -pthread  -fexceptions -fplan9-extensions  -Wall -Wextra -Wwrite-strings -Wcast-qual -Werror -minline-all-stringops -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -std=gnu99 -D_XOPEN_SOURCE=600 -D__EXTENSIONS__ -I ../../../../gcc-4.7.2/libgo/../libgcc -I ../../../gcc/include -g -O -I/opt/pkg/include -I/opt/pkg/include/gettext -I/usr/include  -m32 -MT proc.lo -MD -MP -MF .deps/proc.Tpo -c -o proc.lo `test -f 'runtime/proc.c' || echo '../../../../gcc-4.
 7.2/libgo/'`runtime/proc.c
libtool: compile:  /tmp/pkgsrc/lang/gcc47/work/build/./gcc/xgcc -B/tmp/pkgsrc/lang/gcc47/work/build/./gcc/ -B/opt/pkg/gcc47/x86_64-sun-solaris2.11/bin/ -B/opt/pkg/gcc47/x86_64-sun-solaris2.11/lib/ -isystem /opt/pkg/gcc47/x86_64-sun-solaris2.11/include -isystem /opt/pkg/gcc47/x86_64-sun-solaris2.11/sys-include -DHAVE_CONFIG_H -I. -I../../../gcc-4.7.2/libgfortran -iquote../../../gcc-4.7.2/libgfortran/io -I../../../gcc-4.7.2/libgfortran/../gcc -I../../../gcc-4.7.2/libgfortran/../gcc/config -I../../../gcc-4.7.2/libgfortran/../libquadmath -I../.././gcc -I../../../gcc-4.7.2/libgfortran/../libgcc -I../libgcc -std=gnu99 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wextra -Wwrite-strings -fcx-fortran-rules -ffunction-sections -fdata-sections -g -O -I/opt/pkg/include -I/opt/pkg/include/gettext -I/usr/include -MT maxloc0_4_r16.lo -MD -MP -MF .deps/maxloc0_4_r16.Tpo -c ../../../gcc-4.7.2/libgfortran/generated/maxloc0_4_r16.c  -fPIC -DPIC -o .libs/maxloc0_4_r16.o
libtool: compile:  /tmp/pkgsrc/lang/gcc47/work/build/./gcc/xgcc -B/tmp/pkgsrc/lang/gcc47/work/build/./gcc/ -B/opt/pkg/gcc47/x86_64-sun-solaris2.11/bin/ -B/opt/pkg/gcc47/x86_64-sun-solaris2.11/lib/ -isystem /opt/pkg/gcc47/x86_64-sun-solaris2.11/include -isystem /opt/pkg/gcc47/x86_64-sun-solaris2.11/sys-include -m32 -DHAVE_CONFIG_H -I. -I../../../../gcc-4.7.2/libgo -fno-inline-functions -I ../../../../gcc-4.7.2/libgo/runtime -I../../../../gcc-4.7.2/libgo/../libffi/include -I../libffi/include -pthread -fexceptions -fplan9-extensions -Wall -Wextra -Wwrite-strings -Wcast-qual -Werror -minline-all-stringops -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -std=gnu99 -D_XOPEN_SOURCE=600 -D__EXTENSIONS__ -I ../../../../gcc-4.7.2/libgo/../libgcc -I ../../../gcc/include -g -O -I/opt/pkg/include -I/opt/pkg/include/gettext -I/usr/include -m32 -MT proc.lo -MD -MP -MF .deps/proc.Tpo -c ../../../../gcc-4.7.2/libgo/runtime/proc.c  -fPIC -DPIC -o .libs/proc.o
In file included from /usr/include/link.h:31:0,
                 from ../../../../gcc-4.7.2/libgo/runtime/proc.c:13:
/usr/include/libelf.h:42:2: error: #error "large files are not supported by libelf"
>How-To-Repeat:
for 

problem 1: install skey and try to rebuild

problem 2: add gcc-go to PKG_OPTIONS.gcc47
>Fix:
for 
problem 1: deinstall skey before trying to build

problem 2: the following hacks.mk seems to work (at least until the illumos fix hits the streets):

diff -N hacks.mk
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ hacks.mk	30 Nov 2012 07:04:50 -0000
@@ -0,0 +1,14 @@
+.if !defined(GCC47_HACKS_MK)
+GCC47_HACKS_MK=	defined
+
+.include "../../mk/bsd.prefs.mk"
+
+.if ${OPSYS} == "SunOS" 
+.  if !empty(PKG_OPTIONS:Mgcc-go)
+###
+### workaround until https://www.illumos.org/issues/3263
+###
+MAKE_ENV+=              ac_cv_func_dl_iterate_phdr=no
+.  endif
+.endif
+.endif	# GCC47_HACKS_MK

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->solaris-pkg-people
Responsible-Changed-By: wiz@NetBSD.org
Responsible-Changed-When: Sun, 02 Dec 2012 17:55:09 +0000
Responsible-Changed-Why:
Solaris pkgsrc problem.


>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.