pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
pkg/41601: devel/glib2 fails to compile on Solaris 10
>Number: 41601
>Category: pkg
>Synopsis: devel/glib2 fails to compile on Solaris 10
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Jun 16 12:35:00 +0000 2009
>Originator: Jörn Clausen
>Release:
>Organization:
University of Bielefeld
>Environment:
SunOS spare4200 5.10 Generic_139556-08 i86pc i386 i86pc
>Description:
compilation of devel/glib2 on Solaris 10 fails with
/usr/pkgsrc/20090421/bin/pdksh ../libtool --tag=CC --mode=compile gcc
-DHAVE_CONFIG_H -I. -I.. -I.. -I/usr/pkgsrc/20090421/include
-DG_LOG_DOMAIN=\"GLib\" -DG_DISABLE_CAST_CHECKS -DG_DISABLE_DEPRECATED
-DGLIB_COMPILATION -DPCRE_STATIC -DPREFIX="\"/usr/pkgsrc/20090421\""
-DPKGLOCALEDIR="\"lib\"" -DPKG_SYSCONFDIR="\"/usr/pkgsrc/20090421/etc\""
-I/usr/pkgsrc/20090421/include -I/usr/include
-I/usr/pkgsrc/20090421/gcc34/include -DG_DISABLE_SINGLE_INCLUDES -D_REENTRANT
-D_PTHREADS -O -I/usr/pkgsrc/20090421/include -I/usr/include
-I/usr/pkgsrc/20090421/gcc34/include -Wall -MT giounix.lo -MD -MP -MF
.deps/giounix.Tpo -c -o giounix.lo giounix.c
gcc -DHAVE_CONFIG_H -I. -I..
-I/software/pkgsrc/source/pkgsrc/devel/glib2/work.spare4200/.buildlink/include
-DG_LOG_DOMAIN=\"GLib\" -DG_DISABLE_CAST_CHECKS -DG_DISABLE_DEPRECATED
-DGLIB_COMPILATION -DPCRE_STATIC -DPREFIX=\"/usr/pkgsrc/20090421\"
-DPKGLOCALEDIR=\"lib\" -DPKG_SYSCONFDIR=\"/usr/pkgsrc/20090421/etc\"
-I/software/pkgsrc/source/pkgsrc/devel/glib2/work.spare4200/.buildlink/gcc34/include
-DG_DISABLE_SINGLE_INCLUDES -D_REENTRANT -D_PTHREADS -O -Wall -MT giounix.lo
-MD -MP -MF .deps/giounix.Tpo -c giounix.c -fPIC -DPIC -o .libs/giounix.o
In file included from /usr/include/sys/types.h:18,
from giounix.c:38:
/usr/include/sys/feature_tests.h:332:2: #error "Compiler or options invalid for
pre-UNIX 03 X/Open applications and pre-2001 POSIX applications"
gmake[4]: *** [giounix.lo] Error 1
gmake[4]: Leaving directory
`/software/pkgsrc/source/pkgsrc/devel/glib2/work.spare4200/glib-2.20.3/glib'
gmake[3]: *** [all-recursive] Error 1
gmake[3]: Leaving directory
`/software/pkgsrc/source/pkgsrc/devel/glib2/work.spare4200/glib-2.20.3/glib'
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory
`/software/pkgsrc/source/pkgsrc/devel/glib2/work.spare4200/glib-2.20.3/glib'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory
`/software/pkgsrc/source/pkgsrc/devel/glib2/work.spare4200/glib-2.20.3'
gmake: *** [all] Error 2
*** Error code 2
Stop.
bmake: stopped in /software/pkgsrc/source/pkgsrc/devel/glib2
*** Error code 1
>How-To-Repeat:
>Fix:
This is the critical section in /usr/include/sys/feature_tests.h:
/*
* It is invalid to compile an XPG3, XPG4, XPG4v2, or XPG5 application
* using c99. The same is true for POSIX.1-1990, POSIX.2-1992, POSIX.1b,
* and POSIX.1c applications. Likewise, it is invalid to compile an XPG6
* or a POSIX.1-2001 application with anything other than a c99 or later
* compiler. Therefore, we force an error in both cases.
*/
#if defined(_STDC_C99) && (defined(__XOPEN_OR_POSIX) && !defined(_XPG6))
#error "Compiler or options invalid for pre-UNIX 03 X/Open applications \
and pre-2001 POSIX applications"
#elif !defined(_STDC_C99) && \
(defined(__XOPEN_OR_POSIX) && defined(_XPG6))
#error "Compiler or options invalid; UNIX 03 and POSIX.1-2001 applications \
require the use of c99"
#endif
I have added _XPG6 to CFLAGS:
--- Makefile 2009/06/16 12:11:42 1.1
+++ Makefile 2009/06/16 12:12:43
@@ -82,6 +82,8 @@
CONFIGURE_ENV+= ac_cv_func_mmap_fixed_mapped=yes
.endif
+CFLAGS.SunOS+= -D_XPG6
+
PLIST_VARS+= fam
.if ${OPSYS} != "HPUX" && ${OPSYS} != "OSF1"
and now the package compiles. But I am unsure, if this is The Right Thing.
According to some comments it seems, C99 constructs are deprecated by glib2's
developers and are actively removed.
Home |
Main Index |
Thread Index |
Old Index