comp.lang.ada
 help / color / mirror / Atom feed
* GNAT-shing my teeth
@ 1998-09-22  0:00 alan walkington
  1998-09-23  0:00 ` David C. Hoos, Sr.
  1998-09-24  0:00 ` Aidan Skinner
  0 siblings, 2 replies; 4+ messages in thread
From: alan walkington @ 1998-09-22  0:00 UTC (permalink / raw)


So it's my fault .. I blew away my perfectly good and working linux
partition,
and now I can't get a combination of gcc and gnat to work together!

I've got RedHat 5.1 on a pentium box with gcc-2.7.2.3-5 (rpm'd) and
the gzipped gnat-3.10p-i386-linux-bin distribution .

Everything unzipped and xtracted just fine. Ran the doconfig and
the doinstall files.  No errors noted. Then.....

when I try to compile ANY of the gnat examples I get:

examples]# make hello
gnatmake hello -cargs -O2
gnatbind -x hello.ali
gnatlink hello.ali
ld: cannot open crtbegin.o: No such file or directory
gnatmake: *** link failed.
make: *** [hello] Error 2

and I cant figure out WHERE crtbegin.o is supposed to be!

Any help atall atall would be greatly appreciated.

Alan Walkington
walky@netmagic.net








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

* Re: GNAT-shing my teeth
  1998-09-22  0:00 GNAT-shing my teeth alan walkington
@ 1998-09-23  0:00 ` David C. Hoos, Sr.
  1998-09-24  0:00   ` alan walkington
  1998-09-24  0:00 ` Aidan Skinner
  1 sibling, 1 reply; 4+ messages in thread
From: David C. Hoos, Sr. @ 1998-09-23  0:00 UTC (permalink / raw)



alan walkington wrote in message <6ua1a2$kno$1@usenet40.supernews.com>...
>So it's my fault .. I blew away my perfectly good and working linux
>partition,
>and now I can't get a combination of gcc and gnat to work together!
>
>I've got RedHat 5.1 on a pentium box with gcc-2.7.2.3-5 (rpm'd) and
>the gzipped gnat-3.10p-i386-linux-bin distribution .
>
>Everything unzipped and xtracted just fine. Ran the doconfig and
>the doinstall files.  No errors noted. Then.....
>
>when I try to compile ANY of the gnat examples I get:
>
>examples]# make hello
>gnatmake hello -cargs -O2
>gnatbind -x hello.ali
>gnatlink hello.ali
>ld: cannot open crtbegin.o: No such file or directory
>gnatmake: *** link failed.
>make: *** [hello] Error 2
>
>and I cant figure out WHERE crtbegin.o is supposed to be!
>
>Any help atall atall would be greatly appreciated.
>
I hav long since lost count of how many times I have posted this information
to this group, and to the gnat-chat mail list (where gnat-specific questions
are better answered).  There are many messages regarding this subject in the
gnat-chat archives, accessible through the www.gnat.com home page.

This message is from the gnat-chat archives -- specifically
http://www.gnat.com/chat/2781.html

Re: Problems with running gnat on Redhat 5.0 Linux
David C. Hoos, Sr. (david.c.hoos.sr@ada95.com)
Mon, 15 Jun 1998 17:56:14 -0500

Messages sorted by: [ date ][ thread ][ subject ][ author ]
Next message: Christoph Grein: "Re: Size_In_Storage_Element Discrepency
Between Allocation and Deallocation"
Previous message: Nasser Abbasi: "Re: Problems with running gnat on Redhat
5.0 Linux"
Maybe in reply to: Rick Morneau: "Problems with running gnat on Redhat 5.0
Linux"
-----Original Message-----
From: Rick Morneau <ram@eskimo.com>
To: chat@thames.gnat.com <chat@thames.gnat.com>
Date: Monday, June 15, 1998 2:39 PM
Subject: Problems with running gnat on Redhat 5.0 Linux


>I just installed the binary version of gnat 3.10p on a Redhat 5.0 Linux PC
>without any apparent problems. However, when I tried to use "gnatmake" with
a
>simple "Hello world" program, I got the error message:
>
>ld: cannot open crtbegin.o: No such file or directory


I have posted this message several times on gnat chat -- so here it is
again:


For what it's worth, Here's how I have gnat-3.10p running on RedHat 5.0.
I did it originally with the 2.0.31 kernel, the upgraded to the 2.0.32
kernel.


The fundamental problem is that RedHat 5.0 increases the size of sigset_t
from 32 bits to 1024 bits.


To correct this problem, the file s-osinte.ads needs to be altered -- e.g.
as follows:


591c591,593
< type sigset_t is new unsigned_long;



---
>    SIGSET_NWORDS : constant := 1024 / (unsigned_long'Size);
>
>    type sigset_t is array (1 .. SIGSET_NWORDS) of unsigned_long;

Then, the adalib(s) need to be compiled -- either the native linux threads
runtime or the Florida State University (fsu) runtime, or both.

To do this I executed the following script in each adalib directory:

#!/bin/tcsh -f
foreach f (../adainclude/*.ad[bs])
  gcc -c -O2 -gnatpga -I- $f
end

To be sure, this script re-compiles some stuff not rendered obsolete by
the change to s-osinte.ads, but it was quicker just to recompile
everything than to figure out what needed to be recompiled.

Next, the libgnat.a archive needs to be rebuilt with something like:

ar ru libgnat.a *.o, in each of the adalibs.

In my case, the size of the libgnat.a file for the native rts changed as
follows:
-rw-r--r--   1 root     root      1747090 Feb 14 12:21 ../adalib/libgnat.a
-rw-r--r--   1 4168     1100      1740584 Aug 24  1997
../adalib/libgnat.a.orig

I don't remember for sure, but I don't think I manually manipulated any of
the symbolic links related to the libraries, but at any rate, here's what my
/usr/lib/gcc-lib/i386-linux/2.7.2.1 directory looks like (sorry but these
long lines may wrap in you mail client):

total 2743
lrwxrwxrwx   1 root     root           50 Feb 12 05:24 2.7.2.1 ->
/usr/lib/gcc-lib/i386-redhat-linux/2.7.2.3/2.7.2.1
lrwxrwxrwx   1 root     root           55 Feb 12 05:24 SYSCALLS.c.X ->
/usr/lib/gcc-lib/i386-redhat-linux/2.7.2.3/SYSCALLS.c.X
lrwxrwxrwx   1 root     root           58 Feb 20 04:22 adainclude ->
/usr/lib/gcc-lib/i386-linux/2.7.2.1/rts-native/adainclude/
lrwxrwxrwx   1 root     root           54 Feb 20 04:22 adalib ->
/usr/lib/gcc-lib/i386-linux/2.7.2.1/rts-native/adalib/
lrwxrwxrwx   1 root     root           46 Feb 12 05:24 cc1 ->
/usr/lib/gcc-lib/i386-redhat-linux/2.7.2.3/cc1
lrwxrwxrwx   1 root     root           50 Feb 12 05:24 cc1plus ->
/usr/lib/gcc-lib/i386-redhat-linux/2.7.2.3/cc1plus
lrwxrwxrwx   1 root     root           46 Feb 12 05:24 cpp ->
/usr/lib/gcc-lib/i386-redhat-linux/2.7.2.3/cpp
lrwxrwxrwx   1 root     root           53 Feb 12 05:24 crtbegin.o ->
/usr/lib/gcc-lib/i386-redhat-linux/2.7.2.3/crtbegin.o
lrwxrwxrwx   1 root     root           54 Feb 12 05:24 crtbeginS.o ->
/usr/lib/gcc-lib/i386-redhat-linux/2.7.2.3/crtbeginS.o
lrwxrwxrwx   1 root     root           51 Feb 12 05:24 crtend.o ->
/usr/lib/gcc-lib/i386-redhat-linux/2.7.2.3/crtend.o
lrwxrwxrwx   1 root     root           52 Feb 12 05:24 crtendS.o ->
/usr/lib/gcc-lib/i386-redhat-linux/2.7.2.3/crtendS.o
-rwxr-xr-x   1 4168     1100      2271408 Sep 12  1997 gnat1
lrwxrwxrwx   1 root     root           50 Feb 12 05:24 include ->
/usr/lib/gcc-lib/i386-redhat-linux/2.7.2.3/include
-rw-r--r--   1 root     root       206902 Feb 14 10:10 libgcc.a
-rw-r--r--   1 root     root       238346 Feb 14 10:10 libgthreads.a
-rw-r--r--   1 root     root        74242 Feb 14 10:10 libmalloc.a
drwxr-xr-x   4 4168     1100         1024 Aug 24  1997 rts-fsu
drwxr-xr-x   4 4168     1100         1024 Aug 24  1997 rts-native
lrwxrwxrwx   1 root     root           48 Feb 12 05:24 specs ->
/usr/lib/gcc-lib/i386-redhat-linux/2.7.2.3/specs

As a further sanity check, executing "gcc -v" should result in a message
like:

Reading specs from: /usr/lib/gcc-lib/i386-linux/2.7.2.1/specs

The 2.7.2.1 directory points to 2.7.2.3 because gcc 2.7.2.3 was installed
first (as part of the Linux installation), then gnat was installed on top of
that -- and gnat is 2.7.2.1-based.

I hope I've covered all of the bases here, as this installation is working
fine for me.

I should acknowledge that others of this group helped me when I ran into the
problem a few weeks ago, identifying the cause of the problem and providing
the broad outline of what to do.

Good luck to all who have this problem.

David C. Hoos, Sr.


Next message: Christoph Grein: "Re: Size_In_Storage_Element Discrepency
Between Allocation and Deallocation"
Previous message: Nasser Abbasi: "Re: Problems with running gnat on Redhat
5.0 Linux"
Maybe in reply to: Rick Morneau: "Problems with running gnat on Redhat 5.0
Linux"

If these instructions do not work for you, please reply to me by e-mail, and
I'll try to help further.







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

* Re: GNAT-shing my teeth
  1998-09-23  0:00 ` David C. Hoos, Sr.
@ 1998-09-24  0:00   ` alan walkington
  0 siblings, 0 replies; 4+ messages in thread
From: alan walkington @ 1998-09-24  0:00 UTC (permalink / raw)


David:
  Thanks for the info.
  It turns out that with 5.1 and gc.2.7.2.3-11 the problem was not the
  size of sigset_t....  That problem seems to have been solved.  In reading
the REST of the posting, however, I realized I had not created the link
between 2.7.2.1 and 2.7.2.3.
After I did that, everything worked just fine.

Thanks again for your timely response.
Alan Walkington
walky@netmagic.net

David C. Hoos, Sr. wrote in message ...
>
>alan walkington wrote in message <6ua1a2$kno$1@usenet40.supernews.com>...
>>I've got RedHat 5.1 on a pentium box with gcc-2.7.2.3-5 (rpm'd) and
>>the gzipped gnat-3.10p-i386-linux-bin distribution .
>>when I try to compile ANY of the gnat examples I get:
>>
>>examples]# make hello
>>gnatmake hello -cargs -O2
>>gnatbind -x hello.ali
>>gnatlink hello.ali
>>ld: cannot open crtbegin.o: No such file or directory
>>gnatmake: *** link failed.
>>make: *** [hello] Error 2
---

>I hav long since lost count of how many times I have posted this
information
>to this group
---
---
>
>For what it's worth, Here's how I have gnat-3.10p running on RedHat 5.0.
>I did it originally with the 2.0.31 kernel, the upgraded to the 2.0.32
>kernel.
>
>
>The fundamental problem is that RedHat 5.0 increases the size of sigset_t
>from 32 bits to 1024 bits.
>
>







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

* Re: GNAT-shing my teeth
  1998-09-22  0:00 GNAT-shing my teeth alan walkington
  1998-09-23  0:00 ` David C. Hoos, Sr.
@ 1998-09-24  0:00 ` Aidan Skinner
  1 sibling, 0 replies; 4+ messages in thread
From: Aidan Skinner @ 1998-09-24  0:00 UTC (permalink / raw)


On Tue, 22 Sep 1998 22:44:44 -0700, alan walkington <walky@netmagic.net> wrote:

>I've got RedHat 5.1 on a pentium box with gcc-2.7.2.3-5 (rpm'd) and
>the gzipped gnat-3.10p-i386-linux-bin distribution .

There's problems with using the gzip file and RH5.x. I think that there's
an RPM for gnat-3.10p somewhere, it was announced on this newsgroup not
that long ago (but appears to have expired from my spool) so a dejanews
search should be relatively painless.

- Aidan
-- 
HMFC - Scottish Cup Winners 1998
http://www.skinner.demon.co.uk/aidan
http://www.gla.ac.uk/Clubs/WebSoc/~974075s/
"I don't patronise bunny rabbits"




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

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

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-09-22  0:00 GNAT-shing my teeth alan walkington
1998-09-23  0:00 ` David C. Hoos, Sr.
1998-09-24  0:00   ` alan walkington
1998-09-24  0:00 ` Aidan Skinner

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