From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,fb3e2c68966df2b7 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-11-19 01:00:13 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!fr.usenet-edu.net!usenet-edu.net!oleane.net!oleane!nnrp.oleane.net!not-for-mail From: Thierry Lelegard Newsgroups: comp.lang.ada Subject: Re: gnat3.14p on solaris 9 crashes Date: Tue, 19 Nov 2002 09:56:40 +0100 Organization: CANAL+ TECHNOLOGIES Message-ID: <3DD9FCC8.5DCD50DC@canal-plus.fr> References: NNTP-Posting-Host: host227.canal-plus.fr Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: s1.read.news.oleane.net 1037696201 705 194.2.208.227 (19 Nov 2002 08:56:41 GMT) X-Complaints-To: abuse@oleane.net NNTP-Posting-Date: Tue, 19 Nov 2002 08:56:41 +0000 (UTC) X-Mailer: Mozilla 4.78 [fr]C-CCK-MCD C+ (WinNT; U) X-Accept-Language: fr,en,zh-CN,zh-TW Xref: archiver1.google.com comp.lang.ada:31091 Date: 2002-11-19T09:56:40+01:00 List-Id: > 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