comp.lang.ada
 help / color / mirror / Atom feed
* gcc 3.2.3 and trancendental functions
@ 2003-05-03 13:06 jim hopper
  2003-05-03 14:07 ` Samuel Tardieu
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: jim hopper @ 2003-05-03 13:06 UTC (permalink / raw)


We have a problem.  we have a couple new linux boxes. one is red hat 8,
the other in 9.0.  when i try to run our radar sim it hangs.   finally
traced it down to a problem with sin/cos etc.  so i created a little
program that just calls cosine with 45"  (tried both degrees version
and radians.  the cos returns NAN.

so i went to gcc.gnu.edu and downloaded source for gcc 3.2.3 (i think)
and built and bootstrapped, same problem!

then i went to cs.nyu.edu and downloaded the linux distribution for
gnat 3.15p there and installed it, and everything works fine. on the
8.0 box.

on the 9.0 box neither compiler seems to work. howoever if i move the
executable done with gnat 3.15p over to the 9.0 box that executes ok, i
just cant execute anything compiled on that box.

Does anyone have any insight into why transendentals fail on gcc 3.2.3
compiler??

thanks jim



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

* Re: gcc 3.2.3 and trancendental functions
  2003-05-03 13:06 gcc 3.2.3 and trancendental functions jim hopper
@ 2003-05-03 14:07 ` Samuel Tardieu
  2003-05-03 14:40 ` Jeffrey Creem
  2003-05-05 18:09 ` Mark Johnson
  2 siblings, 0 replies; 6+ messages in thread
From: Samuel Tardieu @ 2003-05-03 14:07 UTC (permalink / raw)


>>>>> "Jim" == jim hopper <hopperj@macconnect.com> writes:

Jim> Does anyone have any insight into why transendentals fail on gcc
Jim> 3.2.3 compiler??

Did you look at the generated assembly code?

  Sam
-- 
Samuel Tardieu -- sam@rfc1149.net -- http://www.rfc1149.net/sam



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

* Re: gcc 3.2.3 and trancendental functions
  2003-05-03 13:06 gcc 3.2.3 and trancendental functions jim hopper
  2003-05-03 14:07 ` Samuel Tardieu
@ 2003-05-03 14:40 ` Jeffrey Creem
  2003-05-06  1:41   ` jim hopper
  2003-05-05 18:09 ` Mark Johnson
  2 siblings, 1 reply; 6+ messages in thread
From: Jeffrey Creem @ 2003-05-03 14:40 UTC (permalink / raw)





"jim hopper" <hopperj@macconnect.com> wrote in message
news:030520030858096351%hopperj@macconnect.com...
> We have a problem.  we have a couple new linux boxes. one is red hat 8,
> the other in 9.0.  when i try to run our radar sim it hangs.   finally
> traced it down to a problem with sin/cos etc.  so i created a little
> program that just calls cosine with 45"  (tried both degrees version
> and radians.  the cos returns NAN.
>
> so i went to gcc.gnu.edu and downloaded source for gcc 3.2.3 (i think)
> and built and bootstrapped, same problem!
>
> then i went to cs.nyu.edu and downloaded the linux distribution for
> gnat 3.15p there and installed it, and everything works fine. on the
> 8.0 box.
>
> on the 9.0 box neither compiler seems to work. howoever if i move the
> executable done with gnat 3.15p over to the 9.0 box that executes ok, i
> just cant execute anything compiled on that box.
>
> Does anyone have any insight into why transendentals fail on gcc 3.2.3
> compiler??
>
> thanks jim



There are at least two open bug reports in the GCC GNATS database for this.

It has been pointed out on the GCC list a few times that the Ada support in
the GCC mainline is still not ready
for widespread use. Hopefully by 3.3 (soon) things will improve.

Either continue to use 3.15 (or 3.16 if you are a supported customer) or if
you must have features of the newer
GCC, consider poking around the GCC mailing list to see how to do your own
build based on the FSF GCC CVS along with
the public Libre software CVS tree (http://libre.act-europe.fr/GNAT/)





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

* Re: gcc 3.2.3 and trancendental functions
  2003-05-03 13:06 gcc 3.2.3 and trancendental functions jim hopper
  2003-05-03 14:07 ` Samuel Tardieu
  2003-05-03 14:40 ` Jeffrey Creem
@ 2003-05-05 18:09 ` Mark Johnson
  2003-05-06  1:43   ` jim hopper
  2 siblings, 1 reply; 6+ messages in thread
From: Mark Johnson @ 2003-05-05 18:09 UTC (permalink / raw)


jim hopper wrote:
> 
> We have a problem.  we have a couple new linux boxes. one is red hat 8,
> the other in 9.0.  when i try to run our radar sim it hangs.   finally
> traced it down to a problem with sin/cos etc.  so i created a little
> program that just calls cosine with 45"  (tried both degrees version
> and radians.  the cos returns NAN. [attempts snipped]
> 
> Does anyone have any insight into why transendentals fail on gcc 3.2.3
> compiler??

Hmm. I'm running with the new compiler and have not seen any problems
like that. I tried both:
  cos(45.0, 360.0);
and
  cos(pi*45.0/180.0);
with a test program and both yield
  7.07107E-01
as expected.

This is with GNAT 5.00a (an ACT supported GCC 3 version) and Red Hat 7.3
(w/ a custom 2.4.20 kernel). Unless your test program does something
significantly different, I don't understand the problem. Perhaps you can
post the test program?

It may be more dependent on the changes Red Hat put into the RH 9
release. I know glibc has a number of significant changes - perhaps
something there is a problem. You may also want to check Bugzilla at Red
Hat to see if other people are having problems w/ numeric functions.

Another thought - when you built on RH 8 and moved it to RH 9, was the
application built with the static libraries? If not, I suggest you try
that as well.

  --Mark



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

* Re: gcc 3.2.3 and trancendental functions
  2003-05-03 14:40 ` Jeffrey Creem
@ 2003-05-06  1:41   ` jim hopper
  0 siblings, 0 replies; 6+ messages in thread
From: jim hopper @ 2003-05-06  1:41 UTC (permalink / raw)


it turns out that this is a know problem with gcc 3.2, fixed in 3.3. 
which is true.  i got the 3.3 snapshot from like april 21 and built it. 
trancendentals now work fine, but my tasking code hangs when i try to
instantiate a protected type.   its always something ;-)

I have no idea where to go as i can trace into the ada code and see
that its hung in a look trying to create the protected type.  but no
idea of how to fix it.  on a whim, i tried replacing pthreads with
gthreads but no change.  

any ideas would be appreciated.

using gnat 3.15 is not an option as it fails in exactly the same manner.

however when i bring the executable of my radar sim over from the
redhat 8 system the executable runs fine.  so its something thats
linked statically i would think thats hosed otherwise the executable i
brought over would hang as well.

jim


In article <CxQsa.713000$3D1.392790@sccrnsc01>, Jeffrey Creem
<jeff@thecreems.com> wrote:

>> 
> There are at least two open bug reports in the GCC GNATS database for this.
> 
> It has been pointed out on the GCC list a few times that the Ada support in
> the GCC mainline is still not ready
> for widespread use. Hopefully by 3.3 (soon) things will improve.
> 
> Either continue to use 3.15 (or 3.16 if you are a supported customer) or if
> you must have features of the newer
> GCC, consider poking around the GCC mailing list to see how to do your own
> build based on the FSF GCC CVS along with
> the public Libre software CVS tree (http://libre.act-europe.fr/GNAT/)
> 
>



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

* Re: gcc 3.2.3 and trancendental functions
  2003-05-05 18:09 ` Mark Johnson
@ 2003-05-06  1:43   ` jim hopper
  0 siblings, 0 replies; 6+ messages in thread
From: jim hopper @ 2003-05-06  1:43 UTC (permalink / raw)



Mark,

i don't have a support contract, they want to much money for my small
project.  :-( 

your supported 5.0 is i am sure far in advance of the 3.2 version
available with redhat.  i found reference to the problem and a proposed
fix, but the easiest fix would appear to be to just go to 3.3 which i
did and it does fix the problem, but it has other problems.

jim

In article <3EB6A8DD.D67AF5F9@raytheon.com>, Mark Johnson
<mark_h_johnson@raytheon.com> wrote:

> jim hopper wrote:
> > 
> > We have a problem.  we have a couple new linux boxes. one is red hat 8,
> > the other in 9.0.  when i try to run our radar sim it hangs.   finally
> > traced it down to a problem with sin/cos etc.  so i created a little
> > program that just calls cosine with 45"  (tried both degrees version
> > and radians.  the cos returns NAN. [attempts snipped]
> > 
> > Does anyone have any insight into why transendentals fail on gcc 3.2.3
> > compiler??
> 
> Hmm. I'm running with the new compiler and have not seen any problems
> like that. I tried both:
>   cos(45.0, 360.0);
> and
>   cos(pi*45.0/180.0);
> with a test program and both yield
>   7.07107E-01
> as expected.
> 
> This is with GNAT 5.00a (an ACT supported GCC 3 version) and Red Hat 7.3
> (w/ a custom 2.4.20 kernel). Unless your test program does something
> significantly different, I don't understand the problem. Perhaps you can
> post the test program?
> 
> It may be more dependent on the changes Red Hat put into the RH 9
> release. I know glibc has a number of significant changes - perhaps
> something there is a problem. You may also want to check Bugzilla at Red
> Hat to see if other people are having problems w/ numeric functions.
> 
> Another thought - when you built on RH 8 and moved it to RH 9, was the
> application built with the static libraries? If not, I suggest you try
> that as well.
> 
>   --Mark



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

end of thread, other threads:[~2003-05-06  1:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-03 13:06 gcc 3.2.3 and trancendental functions jim hopper
2003-05-03 14:07 ` Samuel Tardieu
2003-05-03 14:40 ` Jeffrey Creem
2003-05-06  1:41   ` jim hopper
2003-05-05 18:09 ` Mark Johnson
2003-05-06  1:43   ` jim hopper

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox