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-Thread: 103376,75aa6654ad701d51,start X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!w5g2000hsg.googlegroups.com!not-for-mail From: george@gentoo.org Newsgroups: comp.lang.ada Subject: gnat-gpl-2007: mlib-tgt problem Date: 24 May 2007 08:05:10 -0700 Organization: http://groups.google.com Message-ID: <1180019110.056715.114290@w5g2000hsg.googlegroups.com> NNTP-Posting-Host: 129.194.8.73 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1180019117 10610 127.0.0.1 (24 May 2007 15:05:17 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 24 May 2007 15:05:17 +0000 (UTC) User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en_US, uk, fr, de, ru; rv:1.7.3) Gecko/20040916,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: w5g2000hsg.googlegroups.com; posting-host=129.194.8.73; posting-account=Rd6r_Q0AAAA6EEVQqsubWwcFg5gPo_o3 Xref: g2news1.google.com comp.lang.ada:15912 Date: 2007-05-24T08:05:10-07:00 List-Id: Hi all. A question to everybody who tried building gnat-gpl-2007 (from source). I am hitting a problem when (seemingly) the lib is built: ../../xgcc -B../../ -c -march=athlon64 -O2 -pipe -fomit-frame-pointer - W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -gnatpg -gnata -I- -I../rts -I. -I/var/tmp/portage/dev-lang/gnat- gpl-4.1.3.2007/work/gcc-4.1.3/gcc/ada mlib-tgt.adb -o mlib-tgt.o mlib-tgt.adb:36:22: warning: file name does not match unit name, should be "mlib-tgt-specific.adb" make[4]: *** [mlib-tgt.o] Error 1 make[4]: Leaving directory `/var/tmp/portage/dev-lang/gnat-gpl-4.1.3.2007/work/build/gcc/ada/ tools' form what I was able to see in the code, the mlib-tgt.adb itself is a "stub" body which is supposed to be replaced by the OS specific version during the compilation. And this works fine with gcc-4.2.0 or other versions of gcc or even gnat-gpl-2006. However this has changed in the latest version of gnat. Now the substituted body mlib-tgt- linux.adb has "package Mlib.Tgt.Specific;" (while previously it had simply "package Mlib.Tgt;") which seems to cause this warning that, in turn, (because of the rtl being compiled with -gnatpg) causes the build to fail. This happens even though mlib-tgt.adb has a pragma turning warnings off. The particular lines look like this: with MLib.Tgt.Specific; pragma Warnings (Off, MLib.Tgt.Specific); -- MLib.Tgt.Specific is with'ed only for elaboration purposes package body MLib.Tgt is with mlib-tgt-specific.ads missing and instead mlib-tgt.ads defining bunch of methods that are only implemented in mlib-tgt-"OS".adb (but some in mlib-tgt.adb proper). I must admit I don't recognize this elaboration scheme, I wasn't aware collating methods like this is legal - shouldn't the methods of the parent be implemented in the parent, not in an arbitrary child?. Is this a gnat specific feature or did I overlook something? Anyway, the main question I have is whether anybody had this problem while trying to build gnat-gpl-2007 and how can I go past it? I tried enhancing pragma Warnings to a full Off or adding it to the mlib-tgt- linux as well or even overwriting mlib-tgt.adb with mlib-tgt-linux.adb (what seemed to have been done in prior versions). All of this fails with various complaints (turning off warnings gets ignored and replacing the body causes complaints about missing implementation of some methods). Thanks for any insight! George