Information sur le portage de JGNAT sur Mac avec GNAT GPL 2006.

Pascal <[email protected]>
Newsgroups gmane.comp.lang.ada.france
Message-ID <[email protected]>
Bonjour.

Les essais de progression dans le portage de JGNAT n'ont pas donné de  
résultat probant avec le code source GNAT d'origine. Le driver  
d'exception ignore les traites-exceptions du code source. Il est sûr  
que compiler des sources GNAT de 2000 avec le compilateur de 2006  
n'aide pas. Pour sortir de cette impasse, j'ai repris intégralement  
le code source de GNAT 2006 auquel j'ai ajouté les sources  
spécifiques de JGNAT.
(JGNAT est le compilateur Ada basé sur GNAT pour l'environnement  
d'exécution de Java).

Tous les utilitaires compilent correctement.
Ils sont dans le répertoire de "bin" :
gnat1drv, gnatfind, gnatls,  gnatpsta, jarmake,  jvm2ada,  jvmstrip,
gnatbind, gnatlink, gnatmake, gnatxref, jgnat alias pour gnat1drv et  
jvmlist.

Les prochaines étapes sont de construire la bibliothèque d'exécution.
Les exceptions sont maintenant bien rattrapées mais il reste des  
erreurs...
Bien que JGNAT ne soit plus maintenu ;-(, j'ai envoyé un rapport  
d'erreur à ACT.

Voir le code source modifié sur :
http://blady.perso.orange.fr/alpha.html

Voir les instructions dans read-me.txt (en PJ)



N'hésitez pas à m'envoyer vos expérimentations et idées ou remarques.
Elles sont les bienvenues.

À suivre, Pascal.
http://blady.perso.orange.fr

_______________________________________________
Site WWW de l'association Ada-France: http://www.ada-france.org/
[email protected]
http://www.ada-france.org/mailman/listinfo/ada-france
read-me.txt (text/plain, 3.9 KB)
				JGNAT compilation on Mac

1) Introduction

JGNAT is the Ada GNAT-based compiler for the Java Runtime Environment.
It compiles Ada into Java Byte Code.
I get JGNAT source code on:
http://gd.tuwien.ac.at/languages/ada/gnat/jgnat/jgnat-1.1p/split-1.1p
I have done several minor (;-) modifications of style and few more serious
to get compilation ok.
The modified source are available on:
http://blady.perso.orange.fr/alpha.html

2) Installation

You need the JGNAT source code, the GNAT GPL 2006 source code
and the GNAT GPL 2006 compiler:
http://blady.perso.orange.fr/telechargements/jgnat/jgnat-2.0p1-src.tgz
https://libre.adacore.com/dynamic/download/gnat-gpl-2006-src.tgz

Download the files on your desktop, then type the followings with the Terminal:
$ cd ~/Desktop
$ tar xzf jgnat-2.0p1-src.tgz
$ tar xzf gnat-gpl-2006-src.tgz
$ cd jgnat-2.0p1
$ mv -f ../gnat-gpl-2006-src/src/ada .

	a) with make
$ cd src
$ make 2>&1 | tee ../make.log

	b) with GPS
$ mkdir obj1
$ cd obj1
$ mkdir bin
$ cp ../src/jconfig.h config.h
$ gcc -g -I. -I../gcc-include -I../gcc-include/include -c ../src/*.c
$ gcc -g -I. -I../gcc-include -I../gcc-include/include -c ../ada/*.c
$ sed -e "s/Java_VM :.*;/Java_VM : constant Boolean := True;/" ../ada/hostparm.ads > hostparm.ads
$ sed -e "s/(C, save_argv);/(C, save_argv, \"gnat_argv\");/" -e "s/(C, save_argc);/(C, save_argc, \"gnat_argc\");/" ../ada/lib-writ.adb > lib-writ.adb
$ sed -e "s/\"Get_Libraries_From_Registry\");/\"JGNAT_Get_Libraries_From_Registry\");/" ../ada/osint.adb > osint.adb
$ sed -e "s/gcc/jgnat/" ../ada/ali.adb > ali.adb
$ sed -e "s/gcc/jgnat/" -e "s/README.GNATPRO/the JGNAT readme/" ../ada/comperr.adb > comperr.adb
$ sed -e "s/gcc/jgnat/" ../ada/makeusg.adb > makeusg.adb
$ sed -e "s/gcc/jgnat/" ../ada/par-ch10.adb > par-ch10.adb
$ cp ../src/jbackend.adb back_end.adb
$ cp ../src/jgettarg.ads get_targ.ads
$ cp ../src/jdefault.adb sdefault.adb
$ gnatmake -P../jgnat.gpr

3) All utilities compile correctly

They are in "bin" directory:
gnat1drv, gnatfind, gnatls,   gnatpsta, jarmake,  jvm2ada,  jvmstrip,
gnatbind, gnatlink, gnatmake, gnatxref, jgnat alias for gnat1drv and jvmlist.

4) Run-time library installation

The library is build using "make".
Components are in "lib" directory.
At present an error is issued.
When compiling "a-calend.adb", an internal error occurs !
jgnat-2.0p1t/src/../bin/jgnat -O  -gnatgp -gnata -Ijgnat-2.0p1t/src/../lib/jgnat/adainclude jgnat-2.0p1t/src/../lib/jgnat/adainclude/a-calend.adb
+===========================GNAT BUG DETECTED==============================+
| GPL 2006 (20060522-34) (Java VM) Program_Error sinput.adb:404 explicit raise|
| Error detected at a-calend.adb:63:4                                      |
| Please submit a bug report by email to [email protected].               |
| GAP members can alternatively use GNAT Tracker:                          |
| http://www.adacore.com/ section 'send a report'.                         |
| See gnatinfo.txt for full info on procedure for submitting bugs.         |
| Use a subject line meaningful to you and us to track the bug.            |
| Include the entire contents of this bug box in the report.               |
| Include the exact jgnat or gnatmake command that you entered.            |
| Also include sources listed below in gnatchop format                     |
| (concatenated together with no headers between files).                   |
| Use plain ASCII or MIME attachment.                                      |
+==========================================================================+
Please include these source files with error report
Note that list may not be accurate in some cases, 
so please double check that the problem can still 
be reproduced with the set of files listed.
compilation abandoned

Some help is needed to find out why?

Don't hesitate to send me your advice and all welcome remarks.
http://blady.perso.orange.fr/contact.html

Pascal Pignard, February 2007.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.