comp.lang.ada
 help / color / mirror / Atom feed
From: Thierry Lelegard <thierry.lelegard@canal-plus.fr>
Subject: Re: gnat3.14p on solaris 9 crashes
Date: Tue, 19 Nov 2002 09:56:40 +0100
Date: 2002-11-19T09:56:40+01:00	[thread overview]
Message-ID: <3DD9FCC8.5DCD50DC@canal-plus.fr> (raw)
In-Reply-To: pan.2002.11.18.23.23.47.499691.11234@nowhere.org

>         Has anyone had a successful port of gnat onto solaris 9? I can
> get basic ada programs to run but when I try to use tasks there is a
> crash in ada_init. I've tried recompiling gnat on solaris 9 but that
> didn't work either. Everything works fine on solaris 7, and 8. For
> example the following simple program crashes on solaris 9. I don't
> even have to start the task to get a seg fault. Also, if I replace
> the libthread.so with libthread.so from solaris 8, it doesn't crash
> but it just hangs. Maybe gnat is assuming something it shouldn't
> about the solaris threading model?

Yes, this is a known problem at ACT (we had the same problem with
GNAT Pro and, as a paying customer, we reported it to ACT).

Apparently, GNAT uses some undocumented feature of libthread.so
that no longer works on Solaris 9. BTW, Sun completely redesigned
libthread.so in Solaris 9 (they call it the "T2 library").

One solution (at least with GNAT 3.15) is to use the pthread library
instead of the native thread library. Look at the gnat lib directory:

$ ls -l /opt/gnu/gnat/lib/gcc-lib/sparc-sun-solaris2.8/2.8.1/   
total 15256
lrwxrwxrwx   1 root     root          21 Oct 28 14:52 adainclude -> rts-native/adainclude
lrwxrwxrwx   1 root     root          17 Oct 28 14:52 adalib -> rts-native/adalib
....
drwxr-xr-x   4 root     root         512 May 27 22:58 rts-fsu
drwxr-xr-x   4 root     root         512 May 27 22:58 rts-native
drwxr-xr-x   4 root     root         512 May 27 22:58 rts-pthread
....
$ 

Modify the symbolic links adainclude and adalib so that they point
to rts-pthread instead of rts-native. It works with GNAT 3.15a1.

If you recompiled GNAT, you may want to fix the libthread problem
yourself. It seems that the problem is around the "self" function,
when the runtime gets the id of the current thread. Good luck.

-Thierry Lelegard



      reply	other threads:[~2002-11-19  8:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-19  4:16 gnat3.14p on solaris 9 crashes Pete
2002-11-19  8:56 ` Thierry Lelegard [this message]
replies disabled

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