comp.lang.ada
 help / color / mirror / Atom feed
* GCC 3.3.3 Update
@ 2004-05-27 21:00 Lars J. Nilsson
  2004-05-28  4:17 ` Tapio Kelloniemi
  0 siblings, 1 reply; 5+ messages in thread
From: Lars J. Nilsson @ 2004-05-27 21:00 UTC (permalink / raw)


Hello, I'm a Linux and Ada newbie. I recently had to update my vanilla
RedHat9 (GCC 3.2.2.5) and attempted an install of GCC 3.3.3. Everything
went smoothly. No errors. But now I get:

>>>>>>>>>>>>>>>>
[larsan@silver tmp]$ gnatmake execute.adb
gcc -c execute.adb
fatal error, run-time library not installed correctly
cannot locate file system.ads
compilation abandoned
gnatmake: "execute.adb" compilation error
[larsan@silver tmp]$ 
>>>>>>>>>>>>>>>>

GNAT was properly installed before my upgrade and working. The system.ads
file is located at:

    /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/adainclude/system.ads

Which may explain it as it is still the old location (?).

Any help to get my GNAT installation up and running again would be helpful.



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

* Re: GCC 3.3.3 Update
  2004-05-27 21:00 GCC 3.3.3 Update Lars J. Nilsson
@ 2004-05-28  4:17 ` Tapio Kelloniemi
  2004-05-28 13:46   ` Lars J. Nilsson
  2004-05-29 11:52   ` Lars J. Nilsson
  0 siblings, 2 replies; 5+ messages in thread
From: Tapio Kelloniemi @ 2004-05-28  4:17 UTC (permalink / raw)


"Lars J. Nilsson" <fungrim@hotmail.com> wrote:
>Hello, I'm a Linux and Ada newbie. I recently had to update my vanilla
>RedHat9 (GCC 3.2.2.5) and attempted an install of GCC 3.3.3. Everything
>went smoothly. No errors. But now I get:
>
>>>>>>>>>>>>>>>>>
>[larsan@silver tmp]$ gnatmake execute.adb
>gcc -c execute.adb
>fatal error, run-time library not installed correctly
>cannot locate file system.ads

Did you install from RPMs, from prebuilt binaries or from sources? I
assume you compiled GCC yourself. Did you used something like the
following commands:

cd gcc-3.3.3/gcc/ada &&
touch treeprs.ads [es]info.h nmake.ad[bs] &&
# These make sure that everything is compiled OK.

cd ../.. &&
mkdir ../gcc-build &&
cd ../gcc-build &&
../gcc-3.3.3/configure --prefix=/usr --enable-shared \
  --enable-languages=c,c++,objc,f77,ada,java --enable-threads=posix \
  --enable-__cxa_atexit --enable-clocale=gnu &&
make bootstrap &&
# The following line compiles the Ada runtime library and tools.  I
# really think that you haven't done this
make -C gcc gnatlib_and_tools &&
# Install everything:
make install


>GNAT was properly installed before my upgrade and working. The system.ads
>file is located at:
>
>    /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/adainclude/system.ads

And because your gcc is 3.3.3, gnat doesn't look up it there. And it
may even be that your old Ada library would not work anyway with the
new GCC.  If it is the case that you haven't accidentally compiled the
gnat library (the command is not very well documented as far as I
see), you must recompile GCC with the previously mentioned
commands. Another question is how to do it now when your GNAT is
broken and it can't compile anything (gnat depends on itself as you
probably know). Probably you should reinstall your old GCC and then
update it (perhaps straight to 3.4.0 or to latest CVS which may have
additional bug fixes), GCC 3.4 has many GNAT advancements (gnats of
3.2.2 and 3.3.3 are almost identical).

If you can't install the RPM, you must install GNAT from the official
binaries (version 3.14p, gnat does not compile itself with 3.15p) and
follow the instructions in the Beyond Linux From Scratch book
(http://www.linuxfromscratch.org).

This procedure however is not straight-forward. Anyway, consider
removing your GCC RPMs before issuing make install so you don't have
multiple versions of files and in the worst case in separate directory
hierarchies in which case your PATH defines which GCC you'll use.

-- 
Tapio



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

* Re: GCC 3.3.3 Update
  2004-05-28  4:17 ` Tapio Kelloniemi
@ 2004-05-28 13:46   ` Lars J. Nilsson
  2004-05-28 16:37     ` Adrian Knoth
  2004-05-29 11:52   ` Lars J. Nilsson
  1 sibling, 1 reply; 5+ messages in thread
From: Lars J. Nilsson @ 2004-05-28 13:46 UTC (permalink / raw)


On Fri, 28 May 2004 04:17:52 +0000, Tapio Kelloniemi wrote:

I compiled sources.

> # The following line compiles the Ada runtime library and tools.  I #
> really think that you haven't done this 
> make -C gcc gnatlib_and_tools &&

That's correct, I hadn't. I've never seen it documented either. I'll try
again...

Out of curiousity:

   1) What is enabled with "--enable-__cxa_atexit"? 
   2) Why do I need to boostrap gcc?



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

* Re: GCC 3.3.3 Update
  2004-05-28 13:46   ` Lars J. Nilsson
@ 2004-05-28 16:37     ` Adrian Knoth
  0 siblings, 0 replies; 5+ messages in thread
From: Adrian Knoth @ 2004-05-28 16:37 UTC (permalink / raw)


Lars J. Nilsson <fungrim@hotmail.com> wrote:

> I compiled sources.

Why? You've introduced yourself as a Linux- and Ada-newbie.

>> # The following line compiles the Ada runtime library and tools.  I #
>> really think that you haven't done this 
>> make -C gcc gnatlib_and_tools &&
> That's correct, I hadn't. I've never seen it documented either.

It's clearly mentioned on the website. Ok, nowadays it's no longer
necessary to specify it, because libada (gnatlib_and_tools) would
be built by default.

>    1) What is enabled with "--enable-__cxa_atexit"? 

   --enable-__cxa_atexit
          Define if you want to use __cxa_atexit, rather than atexit, to
          register C++ destructors for local statics and global objects.
          This is essential for fully standards-compliant handling of
          destructors, but requires __cxa_atexit in libc. This option is
          currently only available on systems with GNU libc. When
          enabled, this will cause -fuse-cxa-exit to be passed by
          default.

>    2) Why do I need to boostrap gcc?

You're making a compiler in a multi-stage-way. Every stage can do
more than a lower one. The last stage contains your full-featured
compiler.

Perhaps you might be interested in binary-Ada-packages or the
Debian unstable-distribution. A lot of other nice packages are
available for it making first steps with Ada much easier.

-- 
mail: adi@thur.de  	http://adi.thur.de	PGP: v2-key via keyserver

So alt wie wir aussehen werden wir nie...



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

* Re: GCC 3.3.3 Update
  2004-05-28  4:17 ` Tapio Kelloniemi
  2004-05-28 13:46   ` Lars J. Nilsson
@ 2004-05-29 11:52   ` Lars J. Nilsson
  1 sibling, 0 replies; 5+ messages in thread
From: Lars J. Nilsson @ 2004-05-29 11:52 UTC (permalink / raw)


Thank you, that worked nicely. 




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

end of thread, other threads:[~2004-05-29 11:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-27 21:00 GCC 3.3.3 Update Lars J. Nilsson
2004-05-28  4:17 ` Tapio Kelloniemi
2004-05-28 13:46   ` Lars J. Nilsson
2004-05-28 16:37     ` Adrian Knoth
2004-05-29 11:52   ` Lars J. Nilsson

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