comp.lang.ada
 help / color / mirror / Atom feed
* GNAT 3.10p and GCC 2.7.2.3
@ 1998-02-07  0:00 Robert B. Love 
  1998-02-07  0:00 ` Jean-Francois Vilarem
  1998-02-08  0:00 ` Michael Appleby
  0 siblings, 2 replies; 6+ messages in thread
From: Robert B. Love  @ 1998-02-07  0:00 UTC (permalink / raw)



I've just upgraded my Linux to RedHat 5 and seem to have lost my
ability to compile.  I believe that my gcc got upgraded to 2.7.2.3.
What gcc was gnat-3.10p built with?  Is there a compatibility problem
with it and the newer gcc?

All assistance appreciated.


----------------------------------------------------------------
 Bob Love                                   MIME & NeXT Mail OK
 rlove@neosoft.com                            PGP key available
----------------------------------------------------------------





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

* Re: GNAT 3.10p and GCC 2.7.2.3
  1998-02-07  0:00 GNAT 3.10p and GCC 2.7.2.3 Robert B. Love 
@ 1998-02-07  0:00 ` Jean-Francois Vilarem
  1998-02-10  0:00   ` Robert B. Love 
  1998-02-08  0:00 ` Michael Appleby
  1 sibling, 1 reply; 6+ messages in thread
From: Jean-Francois Vilarem @ 1998-02-07  0:00 UTC (permalink / raw)



rlove@antispam.neosoft.com (Robert B. Love ) writes:

> I've just upgraded my Linux to RedHat 5 and seem to have lost my
> ability to compile.  I believe that my gcc got upgraded to 2.7.2.3.
> What gcc was gnat-3.10p built with?  Is there a compatibility problem
> with it and the newer gcc?
Binaries from gnat-3.10p.....tar.gz are built using gcc-2.7.2.1 and libc.so.5
This installation overwrite /usr/bin/gcc and does not work.

I have found a dirty trick :  use the package gnat-3.10 from debian/hamm/devel
This package is compiled with glibc2.0, gcc-2.7.2.3 and does not divert gcc.

1. get the package debian/hamm/binary-i386/devel/gnat_3.10p-2.deb
2. get the debian binary dpkg-deb or compile it from  source :
      debian/bo/source/base/dpkg_1.4.0.8.tar.gz 
		2.1 cd /tmp ; tar xvfz dpkg_1.4.0.8.tar.gz
		2.2 cd dpkg-1.4.0.8 ; ./configure
		2.3 cd lib ; make
		2.4 cd ../dpkg-deb ; make
		2.5 Use dpkg-deb in step 4
3. Using my redhat-5.0, gcc-lib is  /usr/lib/gcc-lib/i386-redhat-linux/2.7.2.3
control this path with gcc -v
then link 
ln -s /usr/lib/gcc-lib/i386-redhat-linux  /usr/lib/gcc-lib/i486-linux

4. logged as root :
dpkg-deb -x gnat_3.10p-2.deb   /

which extracts  binaries  from gnat_3.10p-2.deb in /   (dpkg-deb --help)

5. ldconfig






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

* Re: GNAT 3.10p and GCC 2.7.2.3
  1998-02-07  0:00 GNAT 3.10p and GCC 2.7.2.3 Robert B. Love 
  1998-02-07  0:00 ` Jean-Francois Vilarem
@ 1998-02-08  0:00 ` Michael Appleby
  1998-02-08  0:00   ` bklungle
  1998-02-09  0:00   ` Robert Dewar
  1 sibling, 2 replies; 6+ messages in thread
From: Michael Appleby @ 1998-02-08  0:00 UTC (permalink / raw)



Robert B. Love wrote:
> 
> I've just upgraded my Linux to RedHat 5 and seem to have lost my
> ability to compile.  I believe that my gcc got upgraded to 2.7.2.3.
> What gcc was gnat-3.10p built with?  Is there a compatibility problem
> with it and the newer gcc?
> 
> All assistance appreciated.
> 
> ----------------------------------------------------------------
>  Bob Love                                   MIME & NeXT Mail OK
>  rlove@neosoft.com                            PGP key available
> ----------------------------------------------------------------

Let me add to this thought, ...

Overloading of basic arithmetic operators (+,-,>,<,mod,rem ...) which
worked in GNAT Ada 3.07 and 3.09 doesn't work in 3.10.  The compiler
complained that it couldn't resolve ambiguous references for these
operators between our file and 'System' even though the low level math
operations were fully resolved within the boundaries of the file being
compiled.  Unfortunately, we have to overload the operators because of
the peculiarities of the target machine (custom-built, embedded
application).  It's also a shame because v3.10's development environment
looks really slick.

Otherwise, well done GNAT.

-=Michael Appleby=-




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

* Re: GNAT 3.10p and GCC 2.7.2.3
  1998-02-08  0:00 ` Michael Appleby
@ 1998-02-08  0:00   ` bklungle
  1998-02-09  0:00   ` Robert Dewar
  1 sibling, 0 replies; 6+ messages in thread
From: bklungle @ 1998-02-08  0:00 UTC (permalink / raw)



Mike, 

Maybe I misunderstood your reference to standard math function overloads
not working in gnat-3.10. The following was hacked quickly on 3.10 on NT.
Compiled and executed fine. Note the overload of "+" in Mtest from M. From
your comment, it sounds more like the data types of the new defining
functions were somehow mapping directly to the System defined ones, perhaps
from using a subtype declaration instead of a type. Just a guess on my
part.
Anyway, as I said, I may have misunderstood your statement.

cheers...bob

> Let me add to this thought, ...
> 
> Overloading of basic arithmetic operators (+,-,>,<,mod,rem ...) which
> worked in GNAT Ada 3.07 and 3.09 doesn't work in 3.10.  The compiler
> complained that it couldn't resolve ambiguous references for these
> operators between our file and 'System' even though the low level math
> operations were fully resolved within the boundaries of the file being
> compiled.  Unfortunately, we have to overload the operators because of
> the peculiarities of the target machine (custom-built, embedded
> application).  It's also a shame because v3.10's development environment
> looks really slick.
> 
> Otherwise, well done GNAT.
> 
> -=Michael Appleby=-
> 
package M is
  type int is new integer;
  type flt is new long_float;
  
  function "+"(a, b : int) return int;
  
  function "+"(a, b : flt) return flt;
end M;

package body M is
  function "+"(a, b : int) return int is
  begin
    return int(integer(a) + integer(b));
  end "+";
  
  function "+"(a, b : flt) return flt is
  begin
    return flt(long_float(a) + long_float(b));
  end "+";
end M;

with M;
with Text_IO;

procedure Mtest is
  function "+"(a, b : M.int) return M.int renames M."+";
  a, b, c : M.int;
begin
  a := 3;
  b := 4;
  c := a + b;
  Text_IO.put_line(
                    "The value of" & 
                    integer'image(integer(a)) & 
                    " +" & 
                    integer'image(integer(b)) & 
                    " =" & 
                    integer'image(integer(c))
                  );
end Mtest;





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

* Re: GNAT 3.10p and GCC 2.7.2.3
  1998-02-08  0:00 ` Michael Appleby
  1998-02-08  0:00   ` bklungle
@ 1998-02-09  0:00   ` Robert Dewar
  1 sibling, 0 replies; 6+ messages in thread
From: Robert Dewar @ 1998-02-09  0:00 UTC (permalink / raw)



<<Let me add to this thought, ...

Overloading of basic arithmetic operators (+,-,>,<,mod,rem ...) which
worked in GNAT Ada 3.07 and 3.09 doesn't work in 3.10.  The compiler
complained that it couldn't resolve ambiguous references for these
operators between our file and 'System' even though the low level math
operations were fully resolved within the boundaries of the file being
compiled.  Unfortunately, we have to overload the operators because of
the peculiarities of the target machine (custom-built, embedded
application).  It's also a shame because v3.10's development environment
looks really slick.

Otherwise, well done GNAT.
>>


If you think you have found a bug, then you should send it to 
report@gnat.com. Note however that the fact that something works
in 3.07 and 3.09 and does not work in 3.10 does not necessarily
mean that it is 3.10 that was broken. A number of bugs were
fixed in 3.10 in this area, and the result is that some illegal
programs that were incorrectly accepted by 3.09 are now correctly
rejected by 3.10.

We don't know that your example is a case in point, but we also
don't know that it isn't, given that you did not tell us what
your example was.

Certainly overloading of basic operators generally works fine (we have
probably hundreds of such examples in our regression suite). It is 
always possible that you have found a specific case where there is
a bug, but, especially when you send in the report to report@gnat.com,
it is essential to provide the exact source and not just a vague
over-generalized statement!

Robert Dewar
Ada Core Technologies





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

* Re: GNAT 3.10p and GCC 2.7.2.3
  1998-02-07  0:00 ` Jean-Francois Vilarem
@ 1998-02-10  0:00   ` Robert B. Love 
  0 siblings, 0 replies; 6+ messages in thread
From: Robert B. Love  @ 1998-02-10  0:00 UTC (permalink / raw)



In <87ra5f1pm6.fsf@darkstar.maison> Jean-Francois Vilarem wrote:
> rlove@antispam.neosoft.com (Robert B. Love ) writes:
> 
> > I've just upgraded my Linux to RedHat 5 and seem to have lost my
> > ability to compile.  I believe that my gcc got upgraded to 2.7.2.3.
> > What gcc was gnat-3.10p built with?  Is there a compatibility problem
> > with it and the newer gcc?
> Binaries from gnat-3.10p.....tar.gz are built using gcc-2.7.2.1 and 
libc.so.5
> This installation overwrite /usr/bin/gcc and does not work.
> 
> I have found a dirty trick :  use the package gnat-3.10 from 
debian/hamm/devel
> This package is compiled with glibc2.0, gcc-2.7.2.3 and does not divert 
gcc.
 
[ procedure deleted ]

I followed it and sure enough I can now compile.  However, the
program core dumps when I try to execute it. 

Will ACT build GNAT 3.10p with gcc 2.7.2.3?  If I get the source,
how difficult is it to do yourself?

----------------------------------------------------------------
 Bob Love                                   MIME & NeXT Mail OK
 rlove@neosoft.com                            PGP key available
----------------------------------------------------------------





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

end of thread, other threads:[~1998-02-10  0:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-02-07  0:00 GNAT 3.10p and GCC 2.7.2.3 Robert B. Love 
1998-02-07  0:00 ` Jean-Francois Vilarem
1998-02-10  0:00   ` Robert B. Love 
1998-02-08  0:00 ` Michael Appleby
1998-02-08  0:00   ` bklungle
1998-02-09  0:00   ` Robert Dewar

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