Bug 47648 - libgfortran/libgfortran.h:53:29: fatal error: quadmath_weak.h: No such file or directory - FreeBSD ia64
Summary: libgfortran/libgfortran.h:53:29: fatal error: quadmath_weak.h: No such file o...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 4.6.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-08 17:15 UTC by Anton Shterenlikht
Modified: 2015-09-05 10:37 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2014-03-22 00:00:00


Attachments
Possible libgfortran.dg/configure patch (1019 bytes, patch)
2011-02-14 20:56 UTC, Tobias Burnus
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Anton Shterenlikht 2011-02-08 17:15:13 UTC
# uname -a
FreeBSD mech-cluster241.men.bris.ac.uk 9.0-CURRENT FreeBSD 9.0-CURRENT #1 r216732: Mon Dec 27 13:22:47 GMT 2010     root@mech-cluster241.men.bris.ac.uk:/usr/obj/usr/src/sys/TZAV  ia64
# 

Building gcc46 gives:

libtool: compile:  /usr/ports/lang/gcc46/work/build/./gcc/xgcc -B/usr/ports/lang/gcc46/work/build/./
gcc/ -B/usr/local/ia64-portbld-freebsd9.0/bin/ -B/usr/local/ia64-portbld-freebsd9.0/lib/ -isystem /u
sr/local/ia64-portbld-freebsd9.0/include -isystem /usr/local/ia64-portbld-freebsd9.0/sys-include -DH
AVE_CONFIG_H -I. -I../.././../gcc-4.6-20110205/libgfortran -iquote../.././../gcc-4.6-20110205/libgfo
rtran/io -I../.././../gcc-4.6-20110205/libgfortran/../gcc -I../.././../gcc-4.6-20110205/libgfortran/
../gcc/config -I../.././gcc -D_GNU_SOURCE -std=gnu99 -Wall -Wstrict-prototypes -Wmissing-prototypes
-Wold-style-definition -Wextra -Wwrite-strings -fcx-fortran-rules -ffunction-sections -fdata-section
s -g -O2 -pipe -I/usr/local/include -fno-strict-aliasing -MT backtrace.lo -MD -MP -MF .deps/backtrac
e.Tpo -c ../.././../gcc-4.6-20110205/libgfortran/runtime/backtrace.c  -fPIC -DPIC -o .libs/backtrace
.o
In file included from ../.././../gcc-4.6-20110205/libgfortran/runtime/backtrace.c:25:0:
../.././../gcc-4.6-20110205/libgfortran/libgfortran.h:53:29: fatal error: quadmath_weak.h: No such file or directory
compilation terminated.
In file included from ../.././../gcc-4.6-20110205/libgfortran/fmain.c:4:0:
../.././../gcc-4.6-20110205/libgfortran/libgfortran.h:53:29: fatal error: quadmath_weak.h: No such file or directory
compilation terminated.
gmake[3]: *** [fmain.lo] Error 1
gmake[3]: *** Waiting for unfinished jobs....
gmake[3]: *** [backtrace.lo] Error 1
gmake[3]: Leaving directory `/usr/ports/lang/gcc46/work/build/ia64-portbld-freebsd9.0/libgfortran'
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory `/usr/ports/lang/gcc46/work/build/ia64-portbld-freebsd9.0/libgfortran'
gmake[1]: *** [all-target-libgfortran] Error 2
gmake[1]: Leaving directory `/usr/ports/lang/gcc46/work/build'
Comment 1 Tobias Burnus 2011-02-09 07:05:13 UTC
See PR 47649 for configure logs.

The issue is that __float128 is supported, but due to missing functionality (unclear whether FreeBSD's libc or libgcc should provide them) libquadmath does not build - cf. bug 47649 comment 5.

The question is how one solves this. A work around would be disable libquadmath via libgfortran's configure if it is not available. As REAL(16) will be still available, there will be test-suite failures.

I think a proper workaround is to build with --disable-libquadmath-support until the _U_Q* are supported. The question is only whether this is a GCC bug (libgcc) or a FreeBSD bug (libc).
Comment 2 Tobias Burnus 2011-02-13 09:48:57 UTC
Possibly related: PR 47716. (Same symptoms on NetBSD 5.1 - but it fails on x86-64 while for FreeBSD it only fails on ia64 while [cf. PR 47642] x86-64 works.)
Comment 3 Tobias Burnus 2011-02-14 20:56:26 UTC
Created attachment 23341 [details]
Possible libgfortran.dg/configure patch

The attached patch should allow to build libgfortran without --disable-libquadmath-support. It does so by copying the check from libquadmath.

I would be happy if someone could test this test on a machine where it failed before.

(Note: A complimentary patch to support the missing bits on FreeBSD/ia64 would be still useful.)
Comment 4 Tobias Burnus 2011-02-15 21:30:46 UTC
Author: burnus
Date: Tue Feb 15 21:30:43 2011
New Revision: 170200

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=170200
Log:
2011-02-15  Tobias Burnus  <burnus@net-b.de>

        PR fortran/47716
        PR fortran/47648
        * acinclude.m4 (LIBGFOR_CHECK_FLOAT128): Use check from
        libquadmath, which uses more features.
        * configure: Regenerate.


Modified:
    trunk/libgfortran/ChangeLog
    trunk/libgfortran/acinclude.m4
    trunk/libgfortran/configure
Comment 5 Tobias Burnus 2011-02-22 10:57:48 UTC
STATUS:

- libgfortran uses the same check as libquadmath;
  thus, there should be no build issue anymore as
  libquadmath support is disabled for libgfortran.
  (The Fortran FE still can generate calls for REAL(16).)

- The issue that on FreeBSD libquadmath is not supported remains unsolved.
  The problem is that some support (_U_Q*) is missing.
  The support could come either from FreeBSD's libc or from libgcc.
  Cf. bug 47649 comment 5.
Comment 6 Dominique d'Humieres 2014-03-22 19:45:12 UTC
Is it still a problem?
Comment 7 Dominique d'Humieres 2015-09-05 10:37:22 UTC
> Is it still a problem?

No answer since a year and a half. Closing as FIXED. Please open new PR(s) for remaining issue(s).