Every testcase in gfortran.fortran-torture/execute fails to link with: Undefined first referenced symbol in file expf /opt/build/eric/gcc/sparc-sun-solaris2.8/./libgfortran/.libs/libgfortran.so cosf /opt/build/eric/gcc/sparc-sun-solaris2.8/./libgfortran/.libs/libgfortran.so atan2f /opt/build/eric/gcc/sparc-sun-solaris2.8/./libgfortran/.libs/libgfortran.so isinf /opt/build/eric/gcc/sparc-sun-solaris2.8/./libgfortran/.libs/libgfortran.so sqrtf /opt/build/eric/gcc/sparc-sun-solaris2.8/./libgfortran/.libs/libgfortran.so coshf /opt/build/eric/gcc/sparc-sun-solaris2.8/./libgfortran/.libs/libgfortran.so nextafterf /opt/build/eric/gcc/sparc-sun-solaris2.8/./libgfortran/.libs/libgfortran.so sinf /opt/build/eric/gcc/sparc-sun-solaris2.8/./libgfortran/.libs/libgfortran.so scalbnf /opt/build/eric/gcc/sparc-sun-solaris2.8/./libgfortran/.libs/libgfortran.so atanf /opt/build/eric/gcc/sparc-sun-solaris2.8/./libgfortran/.libs/libgfortran.so log10f /opt/build/eric/gcc/sparc-sun-solaris2.8/./libgfortran/.libs/libgfortran.so logf /opt/build/eric/gcc/sparc-sun-solaris2.8/./libgfortran/.libs/libgfortran.so sinhf /opt/build/eric/gcc/sparc-sun-solaris2.8/./libgfortran/.libs/libgfortran.so acosf /opt/build/eric/gcc/sparc-sun-solaris2.8/./libgfortran/.libs/libgfortran.so frexpf /opt/build/eric/gcc/sparc-sun-solaris2.8/./libgfortran/.libs/libgfortran.so copysignf /opt/build/eric/gcc/sparc-sun-solaris2.8/./libgfortran/.libs/libgfortran.so ceilf /opt/build/eric/gcc/sparc-sun-solaris2.8/./libgfortran/.libs/libgfortran.so tanhf /opt/build/eric/gcc/sparc-sun-solaris2.8/./libgfortran/.libs/libgfortran.so tanf /opt/build/eric/gcc/sparc-sun-solaris2.8/./libgfortran/.libs/libgfortran.so asinf /opt/build/eric/gcc/sparc-sun-solaris2.8/./libgfortran/.libs/libgfortran.so hypotf /opt/build/eric/gcc/sparc-sun-solaris2.8/./libgfortran/.libs/libgfortran.so ld: fatal: Symbol referencing errors. No output written to /opt/build/eric/gcc/gcc/testsuite/adjustr.x I guess something along the lines of libstdc++-v3/linkage.m4 would be needed.
IIRC Solaris 10 has the math functions but I could be wrong.
Subject: Re: New: Fortran compiler unable to produce executables "ebotcazou at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> writes: > Every testcase in gfortran.fortran-torture/execute fails to link with: > > Undefined first referenced > symbol in file > expf > /opt/build/eric/gcc/sparc-sun-solaris2.8/./libgfortran/.libs/libgfortran.so [...] I already mentioned this in http://gcc.gnu.org/ml/fortran/2004-05/msg00259.html but failed to provide a proper bug report due to many other problems with libgfortran on all of my platforms. > I guess something along the lines of libstdc++-v3/linkage.m4 would be needed. Certainly: libgfortran cannot unconditionally assume the presence of a ISO C99 C library, or else it would be useless with all but recent versions of glibc. Rainer
Rainer, gfortran works on FreeBSD, which does not use glibc. In fact, if you are using a glibc that permits gfortran to run, then you may be using code that may infringe on SunPro's copyright in fdlibm. On the other hand, you have a point that gfortran should not unconditionally assume a C99 compiler. Indeed, Bud Davis recently committed c99-functions.c to provide a compatibility shim. If you have any patches, please send then to fortran@
Subject: Re: Fortran compiler unable to produce executables as libfortran depends on C99 math functions "sgk at troutmask dot apl dot washington dot edu" <gcc-bugzilla@gcc.gnu.org> writes: > gfortran works on FreeBSD, which does not use glibc. In fact, if ... and it probably would on other platforms which include a full ISO C99 libc. Unfortunately, of the platforms I regularly work on (Solaris 2, Tru64 UNIX, IRIX), only Solaris 10 and IRIX 6.5.18+ have an ISO C99 libc, and even that one isn't fully usable with GCC due to the use of vendor-compiler specific builtins in the system headers. I wasn't fully aware about the situation with the various BSDs; thanks for setting me straight. > On the other hand, you have a point that gfortran should not > unconditionally assume a C99 compiler. Indeed, Bud Davis > recently committed c99-functions.c to provide a compatibility > shim. If you have any patches, please send then to fortran@ Not at the moment: time for gcc work is far too limited right now, and I stopped including gfortran when it either wouldn't even build on my platforms for various reasons (mostly mentioned in PRs) or all test cases failed with link failures. Rainer
Subject: Bug 16137 CVSROOT: /cvs/gcc Module name: gcc Changes by: sayle@gcc.gnu.org 2004-08-03 13:28:26 Modified files: libgfortran : ChangeLog configure.ac config.h.in configure libgfortran/intrinsics: c99_functions.c Log message: PR libgfortran/16137 * configure.ac: Add tests for acosf, asinf, atan2f, atanf, ceilf, copysignf, cosf, coshf, expf, floorf, frexpf, hypotf, logf, log10f, scalbnf, sinf, sinhf, sqrtf, tanf and tanhf in libm. * config.h.in: Regenerate. * configure: Regenerate. * instrinsics/c99_functions.c (acosf, asinf, atan2f, atanf, ceilf, copysignf, cosf, coshf, expf, floorf, frexpf, hypotf, logf, log10f, nextafterf, scalbnf, sinf, sinhf, sqrtf, tanf, tanhf): New stub implementations for targets that don't support C99 float functions. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/ChangeLog.diff?cvsroot=gcc&r1=1.52&r2=1.53 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/configure.ac.diff?cvsroot=gcc&r1=1.6&r2=1.7 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/config.h.in.diff?cvsroot=gcc&r1=1.4&r2=1.5 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/configure.diff?cvsroot=gcc&r1=1.10&r2=1.11 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/intrinsics/c99_functions.c.diff?cvsroot=gcc&r1=1.2&r2=1.3
This should be fixed, Can you try again?
Eric, any news on this?
Fixed if not please reopen the bug.
> Eric, any news on this? Sorry for the delay. I confirm that the gfortran.fortran-torture/execute testsuite is in much better shape now (8 failures) on sparc-sun-solaris2.8.
I missed one remaining failure: FAIL: gfortran.fortran-torture/execute/power.f90 compilation, -O0 gax% gcc/gfortran -Bgcc power.f90 -L sparc-sun-solaris2.8/libgfortran/.libs Undefined first referenced symbol in file powf /var/tmp//cc4jBQPc.o ld: fatal: Symbol referencing errors. No output written to a.out collect2: ld returned 1 exit status
Subject: Bug 16137 CVSROOT: /cvs/gcc Module name: gcc Changes by: tobi@gcc.gnu.org 2004-09-26 14:52:04 Modified files: libgfortran : ChangeLog config.h.in configure.ac configure libgfortran/intrinsics: c99_functions.c Log message: PR libfortran/16137 * config.h.in (HAVE_POWF): Undefine. * configure.ac: Check for 'powf' in library. * configure: Regenerate. * intrinsics/c99_functions.c (powf): New function. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/ChangeLog.diff?cvsroot=gcc&r1=1.93&r2=1.94 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/config.h.in.diff?cvsroot=gcc&r1=1.8&r2=1.9 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/configure.ac.diff?cvsroot=gcc&r1=1.10&r2=1.11 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/configure.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.4&r2=1.5
I'm fairly confident that this is fixed now. Correct me if I'm wrong, Eric. :-)