comp.lang.ada
 help / color / mirror / Atom feed
* Re: Segmentation Fault using Ada IO under Linux
  1999-06-15  0:00 Segmentation Fault using Ada IO under Linux Billy Osborne
@ 1999-06-15  0:00 ` jerry
  1999-06-16  0:00   ` William H. Osborne, Jr.
  1999-06-18  0:00 ` William H. Osborne, Jr.
  1 sibling, 1 reply; 4+ messages in thread
From: jerry @ 1999-06-15  0:00 UTC (permalink / raw)


Billy Osborne <bosborne@merc.mercer.edu> wrote:

: RedHat 6.0 Linux running on Intel PCs (Everything from Pentium Pro 200
: to Pentium III 500)
: Gnat 3.11p i686 for Linux PC running on gcc 2.8.1 included with gnat
: package.

RedHat 6.0 uses glibc, are you sure you installed the right GNAT version ?

-- 
-- Jerry van Dijk | Leiden, Holland
-- Team Ada       | jdijk@acm.org
-- see http://stad.dsl.nl/~jvandyk




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

* Segmentation Fault using Ada IO under Linux
@ 1999-06-15  0:00 Billy Osborne
  1999-06-15  0:00 ` jerry
  1999-06-18  0:00 ` William H. Osborne, Jr.
  0 siblings, 2 replies; 4+ messages in thread
From: Billy Osborne @ 1999-06-15  0:00 UTC (permalink / raw)


Having trouble with Ada programs using calls to textio and other
standard io functions.  Program compiles and links with no errors, but
running the program causes a segmentation fault and a core dump.  A
simple program without any io calls works just fine.  GDB returns the
following error message "Program received signal SIGSEGV, Segmentation
fault. 0x4006bf7d in _IO_setvbuf (fp=0x8070710, buf=0x0, mode=2, size=0)
at iosetvbuf.c:92. iosetvbuf.c:92: No such file or directory.

System details:
RedHat 6.0 Linux running on Intel PCs (Everything from Pentium Pro 200
to Pentium III 500)
Gnat 3.11p i686 for Linux PC running on gcc 2.8.1 included with gnat
package.
gdb 4.17.gnat.3.11p
compiled using gnatmake -f -v filename.adb -cargs -g (also tried with -a
argument added).

Any ideas what we are missing here?
Thanks.
Billy Osborne
Mercer Engineering Research Center






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

* Re: Segmentation Fault using Ada IO under Linux
  1999-06-15  0:00 ` jerry
@ 1999-06-16  0:00   ` William H. Osborne, Jr.
  0 siblings, 0 replies; 4+ messages in thread
From: William H. Osborne, Jr. @ 1999-06-16  0:00 UTC (permalink / raw)


From the gnat ftp site, I have tried both the
gnat-3.11p-i686-pc-linux-gnulibc1-bin package and the
gnat-3.11p-i686-pc-linux-gnu-bin package.  As expected, the gnulibc1 version
returned the error messages associated with going from glibc 1.x to glibc
2.0.  The package for glibc 2.0 returned the error detailed in the original
message.  I also tried the same installation (glibc 2) under RedHat 5.2 and
it worked fine.  There seems to be a difference in the way RedHat 5.x (glibc
2.0) and RedHat 6.0 (glibc 2.1) handle system io.  I just haven't found it
yet.  Thanks for the suggestion.

<jerry@jvdsys.stuyts.nl> wrote in message news:FDDxy2.C5@stuyts.nl...
> Billy Osborne <bosborne@merc.mercer.edu> wrote:
>
> : RedHat 6.0 Linux running on Intel PCs (Everything from Pentium Pro 200
> : to Pentium III 500)
> : Gnat 3.11p i686 for Linux PC running on gcc 2.8.1 included with gnat
> : package.
>
> RedHat 6.0 uses glibc, are you sure you installed the right GNAT version ?
>
> --
> -- Jerry van Dijk | Leiden, Holland
> -- Team Ada       | jdijk@acm.org
> -- see http://stad.dsl.nl/~jvandyk






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

* Re: Segmentation Fault using Ada IO under Linux
  1999-06-15  0:00 Segmentation Fault using Ada IO under Linux Billy Osborne
  1999-06-15  0:00 ` jerry
@ 1999-06-18  0:00 ` William H. Osborne, Jr.
  1 sibling, 0 replies; 4+ messages in thread
From: William H. Osborne, Jr. @ 1999-06-18  0:00 UTC (permalink / raw)


Here's the fix until gnat is updated for glibc2.1.  The Linux-Ada team
created a stand-alone package that loads all of the required libraries
without interfering with the existing glibc files or the current c compiler
(egcs or whatever you are using).  The README on the web site below explains
in more detail.  The files you need are gnat-3.11p-1-13.i386.rpm and
gnat-3.11p-devel-1-13.i386.rpm.  Thanks to Aidan Skinner for the solution
and all others who had a suggestion.

----- Original Message -----
From: Aidan Skinner <aidan@skinner.demon.co.uk>
To: <bosborne@merc.mercer.edu>
Sent: Thursday, June 17, 1999 6:33 AM
Subject: Re: Segmentation Fault using Ada IO under Linux


> In comp.lang.ada, you wrote:
>
> >fault. 0x4006bf7d in _IO_setvbuf (fp=0x8070710, buf=0x0, mode=2, size=0)
> >at iosetvbuf.c:92. iosetvbuf.c:92: No such file or directory.
>
> This is almost certainly related to the libc version you're using.
>
> >RedHat 6.0 Linux running on Intel PCs (Everything from Pentium Pro 200
>
> Yep. RH6 moved to glibc 2.1.1, which broke the previous
> versions. <mumbles something about goddamn c-programmers and casting
> them out>
>
> Try the GNAT RPMs from the Ada/GNU-Linux website:
>
> http://www.cl.cam.ac.uk/~mgk25/linux-ada/
>
> they work fine for me. There's also a bunch of other neat stuff there
> (ncurses, gtk, X11 bindings etc.)
>
> - Aidan
> --
> http://www.skinner.demon.co.uk/aidan/
> Horses for courses, tac-nukes to be sure.






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

end of thread, other threads:[~1999-06-18  0:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-06-15  0:00 Segmentation Fault using Ada IO under Linux Billy Osborne
1999-06-15  0:00 ` jerry
1999-06-16  0:00   ` William H. Osborne, Jr.
1999-06-18  0:00 ` William H. Osborne, Jr.

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