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=0.3 required=5.0 tests=BAYES_00,FREEMAIL_FROM, STOX_REPLY_TYPE,STOX_REPLY_TYPE_WITHOUT_QUOTES,XPRIO autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,dc00c5fd4b21beb,start X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news2.google.com!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post01.iad.highwinds-media.com!newsfe19.iad.POSTED!92f42029!not-for-mail From: "Steve D" Newsgroups: comp.lang.ada Subject: Please help... troubleshooting Gnat AVR build MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Windows Mail 6.0.6001.18000 X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6001.18049 Message-ID: X-Complaints-To: abuse@teranews.com NNTP-Posting-Date: Sun, 21 Jun 2009 16:20:01 UTC Organization: TeraNews.com Date: Sun, 21 Jun 2009 09:19:58 -0700 Xref: g2news2.google.com comp.lang.ada:6563 Date: 2009-06-21T09:19:58-07:00 List-Id: I'm trying to build Gnat for AVR following the instructions on the AVR-Ada site using the build scrpt described at: http://avr-ada.wiki.sourceforge.net/BuildScript I'm using XP on a Virtual Box VM so I have tight control over the environment (without messing up my main system). It also allows me to start clean so that when I'm done I should be able to make correct instructions for the next guy. I installed GnatGPL 2009 to do the build. There were a number of errors in the Gnat source code that were identified by the 2009 compiler, and I put togther a patch file that fixes the sources, so the compiler builds. If I understand correctly I am successfully creating a compiler but getting a failure when building the AVR-Ada libs. Looking at the log file for step 13 I have a bunch of lines like: avr-gcc -c -g -Os -gnatn -gnatpg -mmcu=at90can128 -I- -Iadainclude adainclude/s-bitops.adb cp s-bitops.o adalib avr-gcc -c -g -Os -gnatn -gnatpg -mmcu=at90can128 -I- -Iadainclude adainclude/ada.ads cp ada.ali adalib avr-gcc -c -g -Os -gnatn -gnatpg -mmcu=at90can128 -I- -Iadainclude adainclude/interfac.ads ... Which makes me think that the compiler basically works. But in the step 14 log file I have: avr-gcc -c -gnatec=C:\AVR-ADA\build\avr-ada-1.0.2\avr\gnat.adc -gdwarf-2 -gnatwp -gnatwu -gnatn -gnatp -gnatVn -Os -gnatef -fverbose-asm -frename-registers -mmcu=at90can128 -fdata-sections -ffunction-sections --RTS=rts/at90can128 -I- -gnatA C:\AVR-ADA\build\avr-ada-1.0.2\avr\avr_lib\at90can128\avr-mcu.ads avr-gnatmake: "avr-mcu.ali" incompatible ALI file, please recompile I found the source of the error message in the file: make.adb ALI := Scan_ALI (Lib_File, Text, Ignore_ED => False, Err => True); if ALI = No_ALI_Id then -- Record a failure only if not already done if Compilation_OK then Inform (Lib_File, "incompatible ALI file, please recompile"); Record_Failure (Full_Source_File, Source_Unit); end if; else The function Scan_ALI is located in ali.adb. I looked at the .ali file C:\AVR-ADA\build\avr-ada-1.0.2\avr\avr_lib\at90can128\obj\avr-mcu.ali and walked through the source code of Scan_ALI by hand until I get to the line: R rnnnnnnnnnrnrrnrnnrrnnrnnnnnrrnrnnrnnrrnnnrnrrnnvrrrrnvvnnrnnnnnnnnnnr1nnn This line encodes the set of "restrictions" for the compiler. The format of this line is described in lib-writ.ads. The first 23 characters (if I counted correctly, which I did several times) are "All_Boolean_Restrictions" which are defined in restrict.ads. Following the first 23 chars what I should find is a bunch of two part sequences where the first part of the sequence is either the letter 'n' or the letter 'r' followed by some number of digits (a natural number) and the second letter is either the letter 'n' or the letter 'v' followed by some number of digits (a natural number). Breaking that original line down to separate the sequences, you can see that in the 3rd sequence the second character is a r, which is (my best guess) what is causing the error. R rnnnnnnnnnrnrrnrnnrrnnr nn nn nr rn rn nr nnrrnnnrnrrnnvrrrrnvvnnrnnnnnnnnnnr1nnn The gnat compiler (gnat1drv) uses the function Write_ALI in lib-writ.adb to write the .ali file and around line 1025 writes the series of pairs. I cannot see a way that the sequence I'm seeing could be generated by this code. Can anyone please point me in the right direction? I'm stuck. Thanks, Steve