php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #19807 math.c: In function `_php_math_zvaltobase' [...] `HUGE_VAL' undeclared
Submitted: 2002-10-07 18:56 UTC Modified: 2002-10-15 10:04 UTC
From: public at wernig dot net Assigned: edink (profile)
Status: Closed Package: Compile Failure
PHP Version: 4.2.3 OS: Solaris 8 Sparc
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: public at wernig dot net
New email:
PHP Version: OS:

 

 [2002-10-07 18:56 UTC] public at wernig dot net
Hi
I' trying to compile php 4.2.3 with apache 1.3.27 on Sparc Solaris 8 (gcc3.0.3).

Configured with
./configure  --without-x --with-apache=../apache_1.3.27 --enable-force-cgi-redirect --enable-discard-path --enable-safe-mode --enable-magic-quotes --disable-rpath --with-zlib --enable-calendar --with-cyrus --with-db3=/usr/local/BerkeleyDB.3.2 --enable-ftp --with-mysql --enable-sockets --enable-memory-limit --enable-shared=yes --enable-mailparse --enable-track-vars --prefix=/usr/local/apache/php

configure runs without errors. 

make then yields
[...]
math.c: In function `_php_math_zvaltobase':
math.c:774: `HUGE_VAL' undeclared (first use in this function)
math.c:774: (Each undeclared identifier is reported only once
math.c:774: for each function it appears in.)
make[3]: *** [math.lo] Error 1
[...]

Strangely, when I compile php 4.2.2 on the same machine against apache 1.3.27, the error does not occur, i.e. everything works just fine.

(btw.: the only math.h on the system is in /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0.3/include/math.h
and does definitely not define HUGE_VAL)

The only thing I can think of right now is to get a newer math.h, i.e. update gcc (which I would sure hate :-[
Does anybody have any other suggestion?

kind regards
/markus


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-10-07 19:00 UTC] nicos@php.net
can someone on a Sparc try this on PHP4.3.0 ?
 [2002-10-07 20:12 UTC] public at wernig dot net
Well, upgrading to gcc3.2 didn't help. HUGE_VAL ist still not defined in math.h. Isn't this a ix86 feature?
 [2002-10-07 21:19 UTC] sniper@php.net
Did some creative searches with google and came across this:

http://archives.postgresql.org/pgsql-admin/2001-04/msg00155.php

I think you just have done something wrong or haven't installed some necessary package..

 [2002-10-07 21:20 UTC] sniper@php.net
btw. Some man pages for solaris 8 also mention HUGE_VAL..so it's NOT x86 specific.

 [2002-10-08 01:14 UTC] public at wernig dot net
OK, so it's not x86 (the manpages on my system have no reference whatsoever to anything called HUGE_VAL, though)
But why do dozens of other packages (including php 4.22) compile corrrectly? Is it just bad luck then ...?
(btw. I had googled up the same page, but couldn't find out if and how the problem was solved there)
 [2002-10-12 10:31 UTC] sniper@php.net
Marking as critical and assigning to Edin who put that code in math.c as fix for other bug:

http://bugs.php.net/bug.php?id=14807

 [2002-10-15 10:04 UTC] sterling@php.net
Should be fixed in CVS, if not, please open up a new Bug report.
 [2003-04-30 08:00 UTC] pmurphy at ionixpharma dot com
Solaris 8 requires #include <values.h> to get most of the system-dependent maths values, and even then it doesn't have HUGE_VAL, despite this being referenced in the math(3HEAD) man page.

By changing the reference to use MAXFLOAT instead and adding the #include above math.h, the code compiles - whether it achieves the same end is an interesting question...
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue May 06 19:01:28 2025 UTC