GCC Bugzilla – Bug 15960
missing function 'finite' on HP-UX 11.11
Last modified: 2004-11-23 04:39:40 UTC
troogle> gfortran -v Reading specs from /OPT/32/gcc-2004-06-09/lib/gcc/hppa2.0w-hp-hpux11.11/3.5. 0/specs Configured with: ../configure --enable-languages=c,f95 --prefix=/opt32/gcc-2004-06-09 --with-gmp=/opt32/gmp --with-gnu-as --with-as=/opt32/binutils/bin/as --enable-threads --disable-shared --disable-nls Thread model: posix gcc version 3.5.0 20040611 (experimental) This is a typical error message from the linker; a known problem on other OSs too. /usr/ccs/bin/ld: Unsatisfied symbols: finite (first referenced in /OPT/32/gcc-2004-06-09/lib/libgfortran.a(write.o) ) (code) collect2: ld returned 1 exit status
Confirmed, the problem again is that finite is C99 :(. I really think we should just require C99 library support from the system libraries for gfortran and forget about the systems which do not have C99 support.
good luck on that one...lot's of fortran users are on "off the mainstream" hardware which usually means unix variants that may not be up-to-date. --bud
finite is implemented as the macro "isfinite" on hpux 11. I believe it's available as finite on hpux 10. Looking at the results of the gfortran testsuite on hppa2.0w-hp-hpux11.11, I see that hpux 11 is also missing hypotf, roundf, frexpf and scalbnf. From math.h, the following are not available under hpux 11.11 (_PA_RISC): # ifndef _PA_RISC extern float exp2f(float); extern float exp10f(float); extern float expm1f(float); extern float log1pf(float); extern float fmaf(float, float, float); extern float acoshf(float); extern float asinhf(float); extern float atanhf(float); extern float frexpf(float, int *); extern float ldexpf(float, int); extern float modff(float, float *); extern float logbf(float); extern float scalbnf(float, int); extern float scalblnf(float, long); extern int ilogbf(float); extern float hypotf(float, float); extern float erff(float); extern float erfcf(float); extern float gammaf(float); extern float lgammaf(float); extern float lgammaf_r(float, int *); extern float tgammaf(float); extern float ceilf(float); extern float floorf(float); extern float nearbyintf(float); extern float rintf(float); extern float roundf(float); extern long lrintf(float); extern long lroundf(float); # if defined(__STDC_EXT__) || defined(_INCLUDE_LONGLONG) extern long long llrintf(float); extern long long llroundf(float); # endif extern float truncf(float); extern float nanf(const char *); extern float remainderf(float, float); extern float remquof(float, float, int *); extern float fdimf(float, float); extern float fmaxf(float, float); extern float fminf(float, float); # endif /* !PA_RISC */ Basically, the problem is hpux 11 for hppa predates C99. I don't expect full C99 support until the next release. I expect the situation is worse for hpux 10. A similar problem applies to libstdc++: FAIL: 26_numerics/complex/13450.cc (test for excess errors) Excess errors: ld: Unsatisfied symbol "cabsf" in file /var/tmp//cc2Zbv4O.o ld: Unsatisfied symbol "cabsl" in file /var/tmp//cc2Zbv4O.o ld: Unsatisfied symbol "cargf" in file /var/tmp//cc2Zbv4O.o ld: Unsatisfied symbol "cargl" in file /var/tmp//cc2Zbv4O.o ld: Unsatisfied symbol "cexpf" in file /var/tmp//cc2Zbv4O.o ld: Unsatisfied symbol "cexpl" in file /var/tmp//cc2Zbv4O.o ld: Unsatisfied symbol "cabs" in file /var/tmp//cc2Zbv4O.o ld: Unsatisfied symbol "carg" in file /var/tmp//cc2Zbv4O.o ld: Unsatisfied symbol "cexp" in file /var/tmp//cc2Zbv4O.o
Patch here: <http://gcc.gnu.org/ml/gcc-patches/2004-08/msg00962.html>.
Subject: Bug 15960 CVSROOT: /cvs/gcc Module name: gcc Changes by: danglin@gcc.gnu.org 2004-11-23 02:02:39 Modified files: libgfortran : ChangeLog config.h.in configure configure.ac libgfortran.h libgfortran/intrinsics: c99_functions.c libgfortran/io : write.c Log message: PR libfortran/15960 * configure.ac: Check for finite in libm. * libgfortran.h: Define isfinite macro if not defined. * intrinsics/c99_functions.c: Use defined(fpclassify) instead of HAVE_FPCLASSIFY. * io/write.c (write_float): Use isfinite instead of finite. * configure, config.h.in: Rebuilt. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/ChangeLog.diff?cvsroot=gcc&r1=1.113&r2=1.114 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/config.h.in.diff?cvsroot=gcc&r1=1.12&r2=1.13 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/configure.diff?cvsroot=gcc&r1=1.20&r2=1.21 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/configure.ac.diff?cvsroot=gcc&r1=1.15&r2=1.16 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/libgfortran.h.diff?cvsroot=gcc&r1=1.14&r2=1.15 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/intrinsics/c99_functions.c.diff?cvsroot=gcc&r1=1.5&r2=1.6 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/io/write.c.diff?cvsroot=gcc&r1=1.18&r2=1.19
Fixed.