pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
pkg/37200: devel/glib2 fails on Solaris 5.9 due to compiler flags in sunpro.mk
>Number: 37200
>Category: pkg
>Synopsis: devel/glib2 fails on Solaris 5.9 due to compiler flags in
>sunpro.mk
>Confidential: no
>Severity: critical
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Wed Oct 24 21:35:00 +0000 2007
>Originator: Ulrich Habel
>Release: SunOS 5.9
>Organization:
>Environment:
SunOS sun-install 5.9 Generic_122300-12 sun4u sparc SUNW,Sun-Fire-V240
>Description:
When you try to build devel/glib2 on Solaris 5.9 using the SUNPro Compiler it
fails in the configure phase when a test binary is compiled.
checking for Mac OS X Carbon support... checking for style of include used by
make... GNU
checking for sparc-sun-solaris2-gcc... gcc
checking for C compiler default output file name... configure: error: C
compiler cannot create executables
See `config.log' for more details.
*** Error code 77
config.log shows the following problem:
configure:3105: gcc -V >&5
cc: Sun C 5.8 Patch 121015-05 2007/08/01
usage: cc [ options] files. Use 'cc -flags' for details
configure:3108: $? = 1
configure:3131: checking for C compiler default output file name
configure:3158: gcc -O -I/usr/pkg/include -I/usr/include -DPREFIX="\"/usr/pkg\""
-DPKGLOCALEDIR="\"lib\"" -DPKG_SYSCONFDIR="\"/usr/pkg/etc\"" -I/usr/pkg/include
-I/usr/include -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -L/usr/lib -Wl,-R/usr/lib conf
test.c >&5
cc: -xc99=lib is not available on SunOS 5.9
configure:3161: $? = 1
configure: failed program was:
Further investigation showed that the flag "-xc99" for the sunpro compiler is
not available on SunOS 5.9 (as stated above), however "-xc99=no_lib" would be a
supported option to exclude libraries. The other choice would be "all" which is
the default if this flag has been set.
>How-To-Repeat:
build devel/glib2 on SunOS 5.9 with SunPro compiler
>Fix:
The problem came into pkgsrc when someone set -xc99 generally in
mk/compiler/sunpro.mk:
# XXX: What if a package needs both -- a c89 and a c99 compiler?
.if !empty(USE_LANGUAGES:Mc99)
_WRAP_EXTRA_ARGS.CC+= -xc99
.endif
a correct patch would be to exclude SunOS 5.9 from this setting. This is the
patch for it:
--- sunpro.mk.orig Wed Oct 24 17:29:32 2007
+++ sunpro.mk Wed Oct 24 18:06:02 2007
@@ -57,6 +57,9 @@
# XXX: What if a package needs both -- a c89 and a c99 compiler?
.if !empty(USE_LANGUAGES:Mc99)
_WRAP_EXTRA_ARGS.CC+= -xc99
+. if ${OS_VERSION} == "5.9"
+_WRAP_EXTRA_ARGS.CC+= -xc99=no_lib
+. endif
.endif
# The Solaris linker uses "-R" for rpath directives.
Home |
Main Index |
Thread Index |
Old Index