NetBSD Problem Report #53098
From www@NetBSD.org Wed Mar 14 09:26:02 2018
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id 49FFB7A1D0
for <gnats-bugs@gnats.NetBSD.org>; Wed, 14 Mar 2018 09:26:02 +0000 (UTC)
Message-Id: <20180314092601.47A9D7A230@mollari.NetBSD.org>
Date: Wed, 14 Mar 2018 09:26:01 +0000 (UTC)
From: joern.clausen@uni-bielefeld.de
Reply-To: joern.clausen@uni-bielefeld.de
To: gnats-bugs@NetBSD.org
Subject: textproc/libxml2 does not compile on Solaris 11
X-Send-Pr-Version: www-1.0
>Number: 53098
>Category: pkg
>Synopsis: textproc/libxml2 does not compile on Solaris 11
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: solaris-pkg-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Mar 14 09:30:00 +0000 2018
>Closed-Date: Wed Mar 14 10:49:33 +0000 2018
>Last-Modified: Wed Mar 14 10:50:00 +0000 2018
>Originator: Joern Clausen
>Release:
>Organization:
University of Bielefeld
>Environment:
>Description:
Compilation of textproc/libxml2 on Solaris 11.3 with GCC 4.9.4 fails with
CC xpath.lo
xpath.c:489:1: error: initializer element is not constant
double xmlXPathPINF = INFINITY;
^
xpath.c:490:1: error: initializer element is not constant
double xmlXPathNINF = -INFINITY;
>How-To-Repeat:
>Fix:
There is a definition for INFINITY in /usr/include/iso/math_c99.h, but it is guarded by
#if defined(_STDC_C99) || _XOPEN_SOURCE - 0 >= 600 || defined(__C99FEATURES__)
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: pkg-manager->solaris-pkg-people
Responsible-Changed-By: bsiegert@NetBSD.org
Responsible-Changed-When: Wed, 14 Mar 2018 09:40:41 +0000
Responsible-Changed-Why:
And another one for the Solaris folks
From: coypu@sdf.org
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/53098: textproc/libxml2 does not compile on Solaris 11
Date: Wed, 14 Mar 2018 09:59:31 +0000
fwiw, c11 says:
4 The macro
INFINITY
expands to a constant expression of type float representing positive or unsigned
infinity, if available; else to a positive constant of type float that overflows at
translation time.229)
so it's reasonable to assume it is a constant.
What is your definition of INFINITY? it should be in <math.h> (or in
something included by it)
From: coypu@sdf.org
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/53098: textproc/libxml2 does not compile on Solaris 11
Date: Wed, 14 Mar 2018 10:03:43 +0000
Oops, didn't rea the whole bug.
Does this work?
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/textproc/libxml2/Makefile,v
retrieving revision 1.146
diff -u -r1.146 Makefile
--- Makefile 10 Sep 2017 20:49:20 -0000 1.146
+++ Makefile 14 Mar 2018 10:03:21 -0000
@@ -17,6 +17,8 @@
PKGCONFIG_OVERRIDE= libxml-2.0.pc.in
+USE_LANGUAGES+= c99
+
.include "options.mk"
# allow thread-awareness, but make sure the library is not
From: Joern Clausen <joern.clausen@uni-bielefeld.de>
To: gnats-bugs@NetBSD.org, solaris-pkg-people@NetBSD.org,
gnats-admin@NetBSD.org, pkgsrc-bugs@NetBSD.org
Cc:
Subject: Re: pkg/53098: textproc/libxml2 does not compile on Solaris 11
Date: Wed, 14 Mar 2018 11:34:27 +0100
> Does this work?
>
> Index: Makefile
> ===================================================================
> RCS file: /cvsroot/pkgsrc/textproc/libxml2/Makefile,v
> retrieving revision 1.146
> diff -u -r1.146 Makefile
> --- Makefile 10 Sep 2017 20:49:20 -0000 1.146
> +++ Makefile 14 Mar 2018 10:03:21 -0000
> @@ -17,6 +17,8 @@
>
> PKGCONFIG_OVERRIDE= libxml-2.0.pc.in
>
> +USE_LANGUAGES+= c99
> +
> .include "options.mk"
>
> # allow thread-awareness, but make sure the library is not
Yes, with this change libxml2 compiles again. If this does not break
things on other platforms, please submit.
Thanks for the quick fix!
--
Jörn Clausen
Plattformen & Serverdienste
BITS - Bielefelder IT-Servicezentrum
State-Changed-From-To: open->closed
State-Changed-By: maya@NetBSD.org
State-Changed-When: Wed, 14 Mar 2018 10:49:33 +0000
State-Changed-Why:
Committed, thanks for the report! :-)
From: "Maya Rashish" <maya@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/53098 CVS commit: pkgsrc/textproc/libxml2
Date: Wed, 14 Mar 2018 10:49:00 +0000
Module Name: pkgsrc
Committed By: maya
Date: Wed Mar 14 10:49:00 UTC 2018
Modified Files:
pkgsrc/textproc/libxml2: Makefile
Log Message:
libxml2: fix compilation on Solaris 11.3
We use INFINITY which is available on C99 and later, so be explicit
that we compile C99 code.
Also tested as compiling fine on netbsd-current.
Fixes PR pkg/53098
To generate a diff of this commit:
cvs rdiff -u -r1.146 -r1.147 pkgsrc/textproc/libxml2/Makefile
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.