NetBSD Problem Report #49802

From www@NetBSD.org  Tue Mar 31 01:14:11 2015
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id C1C49A5858
	for <gnats-bugs@gnats.NetBSD.org>; Tue, 31 Mar 2015 01:14:11 +0000 (UTC)
Message-Id: <20150331011410.4E56CA6553@mollari.NetBSD.org>
Date: Tue, 31 Mar 2015 01:14:10 +0000 (UTC)
From: bnjf+netbsd@bnjf.id.au
Reply-To: bnjf+netbsd@bnjf.id.au
To: gnats-bugs@NetBSD.org
Subject: archivers/pigz won't build on Solaris
X-Send-Pr-Version: www-1.0

>Number:         49802
>Category:       pkg
>Synopsis:       archivers/pigz won't build on Solaris
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    solaris-pkg-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Mar 31 01:15:00 +0000 2015
>Last-Modified:  Wed Apr 08 03:25:00 +0000 2015
>Originator:     Brad Forschinger
>Release:        2014Q4
>Organization:
>Environment:
SunOS x 5.10 Generic_Virtual sun4u sparc SUNW,SPARC-Enterprise
cc: Sun C 5.12 SunOS_sparc Patch 148917-08 2014/09/10
>Description:

cc -O3 -Wall -Wextra -I/usr/include  -c -o yarn.o yarn.c
"/usr/include/sys/feature_tests.h", line 337: #error: "Compiler or options invalid for pre-UNIX 03 X/Open applications  and pre-2001 POSIX applications"

>How-To-Repeat:

>Fix:

--- yarn.c.orig Tue Mar 31 12:10:39 2015
+++ yarn.c      Tue Mar 31 12:11:25 2015
@@ -22,8 +22,10 @@
  */

 /* for thread portability */
+#ifndef __sun
 #define _XOPEN_SOURCE 700
 #define _POSIX_C_SOURCE 200809L
+#endif
 #define _THREAD_SAFE

 /* use large file functions if available */

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->solaris-pkg-people
Responsible-Changed-By: wiz@NetBSD.org
Responsible-Changed-When: Tue, 31 Mar 2015 04:10:25 +0000
Responsible-Changed-Why:
Solaris pkgsrc problem.


From: Richard PALO <richard@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/49802: archivers/pigz won't build on Solaris
Date: Tue, 31 Mar 2015 08:07:16 +0200

 Le 31/03/15 03:15, bnjf+netbsd@bnjf.id.au a écrit :
 >> Number:         49802
 >> Category:       pkg
 >> Synopsis:       archivers/pigz won't build on Solaris
 >> Confidential:   no
 >> Severity:       non-critical
 >> Priority:       low
 >> Responsible:    pkg-manager
 >> State:          open
 >> Class:          sw-bug
 >> Submitter-Id:   net
 >> Arrival-Date:   Tue Mar 31 01:15:00 +0000 2015
 >> Originator:     Brad Forschinger
 >> Release:        2014Q4
 >> Organization:
 >> Environment:
 > SunOS x 5.10 Generic_Virtual sun4u sparc SUNW,SPARC-Enterprise
 > cc: Sun C 5.12 SunOS_sparc Patch 148917-08 2014/09/10
 >> Description:
 > 
 > cc -O3 -Wall -Wextra -I/usr/include  -c -o yarn.o yarn.c
 > "/usr/include/sys/feature_tests.h", line 337: #error: "Compiler or options invalid for pre-UNIX 03 X/Open applications  and pre-2001 POSIX applications"
 > 
 >> How-To-Repeat:
 > 
 >> Fix:
 > 
 > --- yarn.c.orig Tue Mar 31 12:10:39 2015
 > +++ yarn.c      Tue Mar 31 12:11:25 2015
 > @@ -22,8 +22,10 @@
 >   */
 >  
 >  /* for thread portability */
 > +#ifndef __sun
 >  #define _XOPEN_SOURCE 700
 >  #define _POSIX_C_SOURCE 200809L
 > +#endif
 >  #define _THREAD_SAFE
 >  
 >  /* use large file functions if available */
 > 
 > 
 This compiles (for me) just fine with gcc on Illumos,
 perhaps because of
 > commit 2d08521bd15501c8370ba2153b9cca4f094979d0
 > Author: Garrett D'Amore <garrett@damore.org>
 > Date:   Sun May 18 20:08:38 2014 -0700
 > 
 >     2964 need POSIX 2008 locale object support
 >     Reviewed by: Robert Mustacchi <rm@joyent.com>
 >     Reviewed by: Gordon Ross <gordon.ross@nexenta.com>
 >     Approved by: Dan McDonald <danmcd@omniti.com>

 which added _XPG7 support in feature_tests.h via
 a _POSIX_C_SOURCE check for 200809L.

 Perhaps you should ensure keeping at least XPG6 if your platform
 doesn't support XPG7 yet. 

 -- 
 Richard PALO

From: Brad Forschinger <bnjf@bnjf.id.au>
To: gnats-bugs@netbsd.org
Cc: solaris-pkg-people@netbsd.org, gnats-admin@netbsd.org, 
	pkgsrc-bugs@netbsd.org, bnjf+netbsd@bnjf.id.au
Subject: Re: pkg/49802: archivers/pigz won't build on Solaris
Date: Wed, 8 Apr 2015 13:22:41 +1000

 Yeah, changing yarn.c's:

 #define _XOPEN_SOURCE 700

 to

 #define _XOPEN_SOURCE 600

 gets a successful build on Solaris 10.

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