NetBSD Problem Report #44764

From Wolfgang.Stukenbrock@nagler-company.com  Thu Mar 24 12:42:44 2011
Return-Path: <Wolfgang.Stukenbrock@nagler-company.com>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id D3C7463BEA4
	for <gnats-bugs@gnats.NetBSD.org>; Thu, 24 Mar 2011 12:42:44 +0000 (UTC)
Message-Id: <20110324124237.06FEE1E80CE@test-s0.nagler-company.com>
Date: Thu, 24 Mar 2011 13:42:36 +0100 (CET)
From: Wolfgang.Stukenbrock@nagler-company.com
Reply-To: Wolfgang.Stukenbrock@nagler-company.com
To: gnats-bugs@gnats.NetBSD.org
Subject: poppler failed to compile on Solaris 2.8 from pkgsrc 2010Q4
X-Send-Pr-Version: 3.95

>Number:         44764
>Category:       pkg
>Synopsis:       poppler failed to compile on Solaris 2.8 from pkgsrc 2010Q4
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    reed
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Mar 24 12:45:00 +0000 2011
>Last-Modified:  Sun Mar 27 19:03:30 +0000 2011
>Originator:     Dr. W. Stukenbrock
>Release:        pkgsrc-2010Q4
>Organization:
Dr. Nagler & Company GmbH
>Environment:
Solaris 8
>Description:
	On solaris 2.8 there are no fmin() and fmax() functions in libm.so.
	So TextOutputDev.cc have unresolved externals ..
	On Solaris 2.10 fmin and fmax are defined in math_iso99.h.
	I have no Solaris 2.9 here, so I cannot check if fmin/fmax is
	present there - sorry
>How-To-Repeat:
	Try to compile poppler on Solaris 2.8.
>Fix:
	The following patch will fix the problem.

	Accedently there is no way to figure out the OS version when compiling
	with gcc. Sunstudio compilers have __`name -s`_`uname -r` define (e.g. __SunOS_5_8)
	but gcc has nothing like this.
	So I choose the header-file definition in order to decide if we need
	an own version or not.
	Hope this will match any future Solaris version too ...

--- poppler/TextOutputDev.cc.orig       2011-03-24 11:56:33.736416000 +0100
+++ poppler/TextOutputDev.cc    2011-03-24 13:06:09.153971000 +0100
@@ -63,9 +63,9 @@
 #include "ICSupport.h"
 #endif

-#if defined(__DragonFly__) || defined(__NetBSD__)
+#if defined(__DragonFly__) || defined(__NetBSD__) || (defined(__sun) && defined(__SVR4))
 #include <sys/param.h>
-#if !(defined(__DragonFly__) && __DragonFly_version >= 200204) && !(defined(__NetBSD__) && (__NetBSD_Version__ >= 599002100 || (__NetBSD_Version__ >= 501000000 && __NetBSD_Version__ < 599000000)))
+#if !(defined(__DragonFly__) && __DragonFly_version >= 200204) && !(defined(__NetBSD__) && (__NetBSD_Version__ >= 599002100 || (__NetBSD_Version__ >= 501000000 && __NetBSD_Version__ < 599000000))) && !(defined(__sun) && defined(_ISO_MATH_C99_H))
 static double fmax(double x, double y) { if (isnan(x)) return y; if (isnan(y)) return x; return (x > y ? x : y);}
 static double fmin(double x, double y) { if (isnan(x)) return y; if (isnan(y)) return x; return (x < y ? x : y);}
 #endif

>Release-Note:

>Audit-Trail:
[20110327 shattered] edited Environment: field

Responsible-Changed-From-To: pkg-manager->reed
Responsible-Changed-By: gls@NetBSD.org
Responsible-Changed-When: Thu, 24 Mar 2011 21:12:06 +0000
Responsible-Changed-Why:
Over to maintainer. Forward to solaris-pkg-people if required.
Thanks!


>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-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.