public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Recent libstdc++-v3 cmath.cc doesn't compile on alphaev6-unknown-linux-gnu
@ 2000-06-08 13:14 Toon Moene
  2000-06-08 16:50 ` Steven King
  0 siblings, 1 reply; 7+ messages in thread
From: Toon Moene @ 2000-06-08 13:14 UTC (permalink / raw)
  To: gcc

L.S.,

As follows:

/home/toon/compilers/snapshots/obj/gcc/g++
-B/home/toon/compilers/snapshots/obj/gcc/
-B/usr/snp/alphaev6-unknown-linux-gnu/bin/ -DHAVE_CONFIG_H -I.
-I../../../../egcs/libstdc++-v3/src -I.. -nostdinc++
-I../../../../egcs/libstdc++-v3 -I../../../../egcs/libstdc++-v3/libio
-I../../../../egcs/libstdc++-v3/config/cpu/alpha
-I../../../../egcs/libstdc++-v3/config/gnu-linux -I/usr/snp/include -g
-O2 -fvtable-thunks -D_GNU_SOURCE -fno-implicit-templates -Wall
-Wno-format -W -Wwrite-strings -Winline -Werror
-fdiagnostics-show-location=once -g -c  -fPIC -DPIC
../../../../egcs/libstdc++-v3/src/cmath.cc -o .libs/cmath.lo
In file included from ../../../../egcs/libstdc++-v3/src/cmath.cc:35:
../../../../egcs/libstdc++-v3/bits/std_cmath.h: In function `long double
std::acos (long double)':
../../../../egcs/libstdc++-v3/bits/std_cmath.h:516: implicit declaration
of function `int std::acosl
(...)'
../../../../egcs/libstdc++-v3/bits/std_cmath.h: In function `long double
std::asin (long double)':
../../../../egcs/libstdc++-v3/bits/std_cmath.h:524: implicit declaration
of function `int std::asinl
(...)'
../../../../egcs/libstdc++-v3/bits/std_cmath.h: In function `long double
std::atan (long double)':
../../../../egcs/libstdc++-v3/bits/std_cmath.h:532: implicit declaration
of function `int std::atanl
(...)'
../../../../egcs/libstdc++-v3/bits/std_cmath.h: In function `long double
std::atan2 (long double, long
double)':
../../../../egcs/libstdc++-v3/bits/std_cmath.h:540: implicit declaration
of function `int std::atan2l
(...)'
../../../../egcs/libstdc++-v3/bits/std_cmath.h: In function `long double
std::ceil (long double)':
../../../../egcs/libstdc++-v3/bits/std_cmath.h:548: implicit declaration
of function `int std::ceill
(...)'
../../../../egcs/libstdc++-v3/bits/std_cmath.h: In function `long double
std::cosh (long double)':
../../../../egcs/libstdc++-v3/bits/std_cmath.h:564: implicit declaration
of function `int std::coshl
(...)'
../../../../egcs/libstdc++-v3/bits/std_cmath.h: In function `long double
std::exp (long double)':
../../../../egcs/libstdc++-v3/bits/std_cmath.h:572: implicit declaration
of function `int std::expl
(...)'
../../../../egcs/libstdc++-v3/bits/std_cmath.h: In function `long double
std::floor (long double)':
../../../../egcs/libstdc++-v3/bits/std_cmath.h:588: implicit declaration
of function `int std::floorl
(...)'
../../../../egcs/libstdc++-v3/bits/std_cmath.h: In function `long double
std::frexp (long double, int
*)':
../../../../egcs/libstdc++-v3/bits/std_cmath.h:604: implicit declaration
of function `int std::frexpl
(...)'
../../../../egcs/libstdc++-v3/bits/std_cmath.h: In function `long double
std::ldexp (long double,
int)':
../../../../egcs/libstdc++-v3/bits/std_cmath.h:612: implicit declaration
of function `int std::ldexpl
(...)'
../../../../egcs/libstdc++-v3/bits/std_cmath.h: In function `long double
std::log (long double)':
../../../../egcs/libstdc++-v3/bits/std_cmath.h:620: implicit declaration
of function `int std::logl
(...)'
../../../../egcs/libstdc++-v3/bits/std_cmath.h: In function `long double
std::log10 (long double)':
../../../../egcs/libstdc++-v3/bits/std_cmath.h:628: implicit declaration
of function `int std::log10l
(...)'
../../../../egcs/libstdc++-v3/bits/std_cmath.h: In function `long double
std::modf (long double, long
double *)':
../../../../egcs/libstdc++-v3/bits/std_cmath.h:636: implicit declaration
of function `int std::modfl
(...)'
../../../../egcs/libstdc++-v3/bits/std_cmath.h: In function `long double
std::pow (long double, long
double)':
../../../../egcs/libstdc++-v3/bits/std_cmath.h:644: implicit declaration
of function `int std::powl
(...)'
../../../../egcs/libstdc++-v3/bits/std_cmath.h: In function `long double
std::sinh (long double)':
../../../../egcs/libstdc++-v3/bits/std_cmath.h:662: implicit declaration
of function `int std::sinhl
(...)'
../../../../egcs/libstdc++-v3/bits/std_cmath.h: In function `long double
std::tan (long double)':
../../../../egcs/libstdc++-v3/bits/std_cmath.h:678: implicit declaration
of function `int std::tanl
(...)'
../../../../egcs/libstdc++-v3/bits/std_cmath.h: In function `long double
std::tanh (long double)':
../../../../egcs/libstdc++-v3/bits/std_cmath.h:686: implicit declaration
of function `int std::tanhl
(...)'
make[4]: *** [cmath.lo] Error 1
make[4]: Leaving directory
`/home/toon/compilers/snapshots/obj/alphaev6-unknown-linux-gnu/libstdc++-v3/src'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory
`/home/toon/compilers/snapshots/obj/alphaev6-unknown-linux-gnu/libstdc++-v3'
make[2]: *** [all-recursive-am] Error 2
make[2]: Leaving directory
`/home/toon/compilers/snapshots/obj/alphaev6-unknown-linux-gnu/libstdc++-v3'
make[1]: *** [all-target-libstdc++-v3] Error 2
make[1]: Leaving directory `/home/toon/compilers/snapshots/obj'
make: *** [bootstrap] Error 2

[ When's the switch planned to libstdc++-v3 as the default ?  It worked
  for quite some time ... ]

Cheers,

-- 
Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
GNU Fortran 95: http://g95.sourceforge.net/ (under construction)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Recent libstdc++-v3 cmath.cc doesn't compile on alphaev6-unknown-linux-gnu
  2000-06-08 13:14 Recent libstdc++-v3 cmath.cc doesn't compile on alphaev6-unknown-linux-gnu Toon Moene
@ 2000-06-08 16:50 ` Steven King
  2000-06-09 13:58   ` Toon Moene
  0 siblings, 1 reply; 7+ messages in thread
From: Steven King @ 2000-06-08 16:50 UTC (permalink / raw)
  To: Toon Moene, gcc

Hmmm.  Thats curious.  The long double functions should only be visable if
configure finds them.  What does your libstdc++-v3/config.log show?
-- 
Steven King
sxking@uswest.net

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Recent libstdc++-v3 cmath.cc doesn't compile on alphaev6-unknown-linux-gnu
  2000-06-08 16:50 ` Steven King
@ 2000-06-09 13:58   ` Toon Moene
  2000-06-09 14:16     ` Zack Weinberg
  0 siblings, 1 reply; 7+ messages in thread
From: Toon Moene @ 2000-06-09 13:58 UTC (permalink / raw)
  To: sxking; +Cc: gcc

Steven King wrote:

> Hmmm.  Thats curious.  The long double functions should only be visable if
> configure finds them.  What does your libstdc++-v3/config.log show?

Well, it turns out that the libm on my system:

$ ls /lib/libm*
/lib/libm-2.1.1.so*  /lib/libm.so.6.1@

$ nm /lib/libm.so.6.1 | grep acosl
0000000000019020 t __acosl
000000000001d000 t __cacosl
0000000000019020 W acosl
000000000001d000 W cacosl

contains acosl [et al.], but there's no header file with a prototype for
it:

$ grep acosl `find /usr/include -name '*.h' -print`
<nothing>

Oh, how I wished the Debian crew would finish their testing of potato,
so that I could install a well engineered system here ...

-- 
Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
GNU Fortran 95: http://g95.sourceforge.net/ (under construction)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Recent libstdc++-v3 cmath.cc doesn't compile on alphaev6-unknown-linux-gnu
  2000-06-09 13:58   ` Toon Moene
@ 2000-06-09 14:16     ` Zack Weinberg
  2000-06-10  3:21       ` Toon Moene
  0 siblings, 1 reply; 7+ messages in thread
From: Zack Weinberg @ 2000-06-09 14:16 UTC (permalink / raw)
  To: Toon Moene; +Cc: sxking, gcc

On Fri, Jun 09, 2000 at 10:49:36PM +0200, Toon Moene wrote:
> Steven King wrote:
> 
> > Hmmm.  Thats curious.  The long double functions should only be visable if
> > configure finds them.  What does your libstdc++-v3/config.log show?
> 
> Well, it turns out that the libm on my system:
> 
> $ ls /lib/libm*
> /lib/libm-2.1.1.so*  /lib/libm.so.6.1@
> 
> $ nm /lib/libm.so.6.1 | grep acosl
> 0000000000019020 t __acosl
> 000000000001d000 t __cacosl
> 0000000000019020 W acosl
> 000000000001d000 W cacosl
> 
> contains acosl [et al.], but there's no header file with a prototype for
> it:
> 
> $ grep acosl `find /usr/include -name '*.h' -print`
> <nothing>

If this is glibc 2.1, the acosl prototype is (should be) created by
evil macros in math.h and bits/mathcalls.h.

$ grep acosl `find /usr/include/ -type f -print`
$ cpp /usr/include/math.h |grep acosl
extern long double acosl (long double __x);
extern long double __acosl (long double __x);

This only happens if some conditionals succeed; in particular, I bet
-ansi will suppress it.

zw

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Recent libstdc++-v3 cmath.cc doesn't compile on alphaev6-unknown-linux-gnu
  2000-06-09 14:16     ` Zack Weinberg
@ 2000-06-10  3:21       ` Toon Moene
  2000-06-10  4:40         ` Andreas Jaeger
  2000-06-10  6:55         ` Toon Moene
  0 siblings, 2 replies; 7+ messages in thread
From: Toon Moene @ 2000-06-10  3:21 UTC (permalink / raw)
  To: Zack Weinberg; +Cc: sxking, gcc

Zack Weinberg wrote:

> On Fri, Jun 09, 2000 at 10:49:36PM +0200, Toon Moene wrote:

> > Well, it turns out that the libm on my system:
> >
> > $ ls /lib/libm*
> > /lib/libm-2.1.1.so*  /lib/libm.so.6.1@
> >
> > $ nm /lib/libm.so.6.1 | grep acosl
> > 0000000000019020 t __acosl
> > 000000000001d000 t __cacosl
> > 0000000000019020 W acosl
> > 000000000001d000 W cacosl

> > contains acosl [et al.], but there's no header file with a prototype for
> > it:

> > $ grep acosl `find /usr/include -name '*.h' -print`
> > <nothing>

> If this is glibc 2.1, the acosl prototype is (should be) created by
> evil macros in math.h and bits/mathcalls.h.

> $ cpp /usr/include/math.h |grep acosl
> extern long double acosl (long double __x);
> extern long double __acosl (long double __x);

Not over here:

$ cpp /usr/include/math.h | grep acos
extern   double          acos          (double  __x)    ; extern  
double         __acos          (double  __x)      ;
extern   double          acosh          (double  __x)    ; extern  
double         __acosh          (double  __x)      ;
extern   float          acosf         (float   __x)    ; extern  
float         __acosf         (float   __x)      ;
extern   float          acoshf         (float   __x)    ; extern  
float         __acoshf         (float   __x)      ;

Is there something simple I can do to math.h or bits/mathcalls.h that
would solve this ?

TIA,

-- 
Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
GNU Fortran 95: http://g95.sourceforge.net/ (under construction)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Recent libstdc++-v3 cmath.cc doesn't compile on alphaev6-unknown-linux-gnu
  2000-06-10  3:21       ` Toon Moene
@ 2000-06-10  4:40         ` Andreas Jaeger
  2000-06-10  6:55         ` Toon Moene
  1 sibling, 0 replies; 7+ messages in thread
From: Andreas Jaeger @ 2000-06-10  4:40 UTC (permalink / raw)
  To: Toon Moene; +Cc: Zack Weinberg, sxking, gcc

>>>>> Toon Moene writes:

Toon> Zack Weinberg wrote:
>> On Fri, Jun 09, 2000 at 10:49:36PM +0200, Toon Moene wrote:

>> > Well, it turns out that the libm on my system:
>> >
>> > $ ls /lib/libm*
>> > /lib/libm-2.1.1.so*  /lib/libm.so.6.1@
>> >
>> > $ nm /lib/libm.so.6.1 | grep acosl
>> > 0000000000019020 t __acosl
>> > 000000000001d000 t __cacosl
>> > 0000000000019020 W acosl
>> > 000000000001d000 W cacosl

>> > contains acosl [et al.], but there's no header file with a prototype for
>> > it:

>> > $ grep acosl `find /usr/include -name '*.h' -print`
>> > <nothing>

>> If this is glibc 2.1, the acosl prototype is (should be) created by
>> evil macros in math.h and bits/mathcalls.h.

>> $ cpp /usr/include/math.h |grep acosl
>> extern long double acosl (long double __x);
>> extern long double __acosl (long double __x);

Toon> Not over here:
You're running Linux on an Alpha, aren't you?

The difference between Alpha and e.g. ix86 is the definition of
__NO_LONG_DOUBLE_MATH which is done in <bits/mathdef.h> for Alpha but
not for ix86:

/usr/include/bits/mathdef.h:#ifndef __NO_LONG_DOUBLE_MATH
/usr/include/bits/mathdef.h:# define __NO_LONG_DOUBLE_MATH      1

Toon> $ cpp /usr/include/math.h | grep acos
Toon> extern   double          acos          (double  __x)    ; extern  
Toon> double         __acos          (double  __x)      ;
Toon> extern   double          acosh          (double  __x)    ; extern  
Toon> double         __acosh          (double  __x)      ;
Toon> extern   float          acosf         (float   __x)    ; extern  
Toon> float         __acosf         (float   __x)      ;
Toon> extern   float          acoshf         (float   __x)    ; extern  
Toon> float         __acoshf         (float   __x)      ;

Toon> Is there something simple I can do to math.h or bits/mathcalls.h that
Toon> would solve this ?

Only a guess for a hack: Remove the define of __NO_LONG_DOUBLE_MATH.

Andreas
-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Recent libstdc++-v3 cmath.cc doesn't compile on alphaev6-unknown-linux-gnu
  2000-06-10  3:21       ` Toon Moene
  2000-06-10  4:40         ` Andreas Jaeger
@ 2000-06-10  6:55         ` Toon Moene
  1 sibling, 0 replies; 7+ messages in thread
From: Toon Moene @ 2000-06-10  6:55 UTC (permalink / raw)
  To: Zack Weinberg, sxking, gcc

I wrote:

> Zack Weinberg wrote:

> > If this is glibc 2.1, the acosl prototype is (should be) created by
> > evil macros in math.h and bits/mathcalls.h.
> 
> > $ cpp /usr/include/math.h |grep acosl
> > extern long double acosl (long double __x);
> > extern long double __acosl (long double __x);
> 
> Not over here:
> 
> $ cpp /usr/include/math.h | grep acos
> extern   double          acos          (double  __x)    ; extern
> double         __acos          (double  __x)      ;
> extern   double          acosh          (double  __x)    ; extern
> double         __acosh          (double  __x)      ;
> extern   float          acosf         (float   __x)    ; extern
> float         __acosf         (float   __x)      ;
> extern   float          acoshf         (float   __x)    ; extern
> float         __acoshf         (float   __x)      ;
> 
> Is there something simple I can do to math.h or bits/mathcalls.h that
> would solve this ?

It turns out that on my system the prototypes for long double math
routines are not generated because /usr/include/bits/mathdef.h sets
__NO_LONG_DOUBLE_MATH.  Therefore, I applied the following patch to this
file, as long double math routines _are_ present in my system's (g)libc:

*** /usr/include/bits/mathdef.h.orig    Sat Jun 10 13:34:47 2000
--- /usr/include/bits/mathdef.h Sat Jun 10 13:35:14 2000
*************** typedef double double_t;
*** 74,80 ****
--- 74,82 ----
  #endif        /* ISO C 9X */
  
+ #if 0
  #ifndef __NO_LONG_DOUBLE_MATH
  /* Signal that we do not really have a `long double'.  The disables
the
     declaration of all the `long double' function variants.  */
  # define __NO_LONG_DOUBLE_MATH        1
+ #endif
  #endif

Now everything is well ...

Thanks, Zack and Steven !

-- 
Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
GNU Fortran 95: http://g95.sourceforge.net/ (under construction)

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2000-06-10  6:55 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-06-08 13:14 Recent libstdc++-v3 cmath.cc doesn't compile on alphaev6-unknown-linux-gnu Toon Moene
2000-06-08 16:50 ` Steven King
2000-06-09 13:58   ` Toon Moene
2000-06-09 14:16     ` Zack Weinberg
2000-06-10  3:21       ` Toon Moene
2000-06-10  4:40         ` Andreas Jaeger
2000-06-10  6:55         ` Toon Moene

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).