NetBSD Problem Report #47274

From  Sun Dec  2 07:04:41 2012
Return-Path: <>
Received: from ( [])
	by (Postfix) with ESMTP id 73A2463DFC7
	for <>; Sun,  2 Dec 2012 07:04:41 +0000 (UTC)
Message-Id: <>
Date: Sun,  2 Dec 2012 07:04:39 +0000 (UTC)
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
SunOS devzoneX 5.11 oi_151a7 i86pc i386 i86pc Solaris

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

problem 1: install skey and try to rebuild

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

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

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



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


NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD:,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.