It seems I found another bug. Could you check? Follow program works under binary of distribution of gnat-3.15p Compile it just "gnatmake aws_test.adb"
Created attachment 16889 [details] bug test
Strange bug, this one fails even when using fsu threads (which was not the case with the previous bug). I'm starting to wonder if I shouldn't spend some time on porting the ACES and ACATS test-suites so we can find all bugs at once. Maxim, if you have the time, could you please emerge the masked gnat-5.0 and see if it causes the same bug? I'm currently on a PPC and have not yet ported the bootstrap compiler so I only have access to 3.15p (on an external x86 gentoo) at the moment.
I have tested gnat-5.0_pre20030822. It works fine.
I have a lot of schoolwork to do at the moment. I will try to take a serious look at this on tuesday (20030909). Otherwise I will have to put it off to the weekend.
Just my two cents here: I was playing with 5.0 alpha and I must say that I mostly like what I see. Few bugs seem to be fixed + overal behavior is sometimes more "pleasant". For example recently I was debugging some of my code that was dealing with few inheritances of Controlled and gnat-3.15p was generating really bogus sequence of Finalization calls. Switching to 5.0 alpha made this much more apprehendable. Of course the problem was on my side (and of course inside Adjust calls :)) but at least it was possible to trace it.. So, any wispers on when 5.0 may be released or at least some its beta? ;) alpha is stil an alp[ha, - I don't think marking it stable is a good idea :(. George
I disabled all optimizations and now it seems to run on my system. This is a bit odd because I was previously using the optimizations recommended by ACT. Please test and report back. As for gnat 5.02w. I installed it in school and the new error reporting system is more informative than the old one. There is no release date set as GNAT is required to be extremely reliable. They will release it when they pass all of their requirements. But it should be getting close. I find it strange that the CVS is already at 5.02w even though they never released 4.0 or 5.0. Anyway, please test and report back. I would like to move this to stable now so we can start moving the rest of the Ada ebuilds to stable.
I've investigated the problem closely. The cause in function Bit_Eq in s-bitops.adb. It seems the problem in "-fPIC" option. I looked in s-bitops.ali in ACT distribution. There are "-gnatg -gnatp -gnatn -fPIC" compilation options. But -fPIC is used only for building *.so libraries. Object files for static library are built without -fPIC. When I compile s-bitops.adb with "gnatgcc -O2 -gnatpgn -c s-bitops.adb" all works fine. When I run gnat-3.15p by ACT with "-shared" it fails. gnatmake aws_test.adb -bargs shared I think you should fix ebuild so it build static library without -fPIC option. Will you?
Thanks for the debugging, I am very grateful that you went that far to help me track the bug down. I have so much schoolwork at the moment that I'm only able to spend 1-2 hours (top) each day on this =(. When I have time I hope to be able to port a couple of test-suites to run with GNAT so that it will be easier to validate new ebuilds. I will of course look into building the shared and static libraries separately with different options. Right after I have ported GNAT to PPC (which I hope to have accomplished tonight).
Please check if bug #29257 (gnat-3.15p-r3) resolves this bug.
Both gnat-3.15p-r3 and "gnat-3.15p-r2 from CVS" resolve this bug. But I think "-O0" isn't the best solution. I would prefer "-O2 -gnatpgn" and no "-fPIC" option for static libs.
Ok, I have made your suggested changes to gnat-3.15p-r3 and ran it through acats4gnat. Please reemerge it if you want it compiled with your suggested flags.
It passes the tests I've run, and since noone else reported anything I'm closing this.
Recently I upgrated to glibc-2.3.4 and encountered some problems with gnat from ACT binary 3.15p distribution. So I decided to install gnat-3.15p from ebuild. Then AWS regression tests failed and I checked test from this bug. It fails. I looked in Makefile and found TARGET_LIBGCC2_CFLAGS variable. They use it for building gnatlib-shared only. I changed ebuild to use it. Now it works fine. New ebuild is attached.
Created attachment 46470 [details] gnat-3.15p-r4.ebuild New ebuild - gnat-3.15p-r4.ebuild
Thanks for your help Maxim. I have added this to CVS.