From: Ludovic Brenta on 18 May 2010 10:36 So, if I understand correctly, your problem boils down to: how do I tell Ubuntu's gnat-gps to call gprbuild instead of gnatmake? IIRC, this is triggered by your project file containing the Languages attribute: for Languages use ("Ada", "CPP"); -- or something similar The presence of this attribute instructs GPS to call gprbuild instead of gnatmake. I think there is also a check box somewhere in the Project Editor of GPS to make a project multi-language. Sorry that I cannot be more specific; I'm completely free of C++ and use Emacs for everything :) If this works, you can uninstall GNAT GPL Edition and have a completely clean install. If this still fails, you can still use GNAT GPL Edition but the problem is setting the $PATH in GPS so that it will call the gprbuild and, in turn, the gcc from GNAT GPL Edition instead of the system- provided ones. -- Ludovic Brenta.
From: Ludovic Brenta on 18 May 2010 10:39 On May 18, 3:40 pm, zeta_no <olivier_hen...(a)hotmail.com> wrote: > On May 18, 3:53 am, Stephen Leake <stephen_le...(a)stephe-leake.org> > wrote: > > > Just out of curiosity; why are you using Ubuntu instead of Debian in the > > first place? > > Last time I tried Debian and Ubuntu around the same period, I found > Ubuntu much more polished that Debian. For everyday use, it is > welcomed. But I like your way of thinking... upgrade to Debian :). > Also, I didn't know that the support for Ada in Debian was better... > Correct me if I'm wrong. It is better because Ubuntu is only a derivative; Debian is the source and that's where all the work goes. Stephe and I are two of the Debian maintainers. The Ubuntu maintainers are not here on this forum. By upgrading to Debian, you eliminate a middle-man. -- Ludovic Brenta.
From: Ludovic Brenta on 18 May 2010 18:38 zeta_no <olivier_henley(a)hotmail.com> writes: > Hi to all, > > With the distribution of GNAT GPL form Adacore Libre comes some code > examples like "ada_cpp" that presents mixed Ada/C++ projetcs. My > problem is the following: In GPS, for the project to build, we need > GPRBUILD which uses GCC and the -gnat05 option. Well, using GPRBUILD, > the ouput of a BUILD ALL tells me that GCC 4.4 installed by Ubuntu was > triggered, not GCC 4.3 coming with the GNAT distro. How do I tell GPS > and GPRBUILD to use the good GCC? The problem is on the Ubuntu side or > GPRBUILD? > > We have to admit that my setup is ugly. I use GPS and GPRBUILD from > Adacore, but GNAT from Ubuntu. That's not all. I don't know why, but > by using GNAT from Ubuntu, the second example from ada_cpp, > animals.gpr, does not compile at all. I get the following error > mesage: > > cannot import abstract subprogram "Number_Of_Teeth" declared at line > 5. > cannot imp... > > If someone could help me with my problem of GNAT versioning to resolve > the good use of GCC, I would really appreciate. Just to confirm, I > did exported /usr/gnat/bin into my PATH env. variable. Out of curiosity I reproduced your problem on Debian with the following packages installed: ii gnat 4.4+1 The GNU Ada compiler ii gnat-4.4 4.4.4-2 The GNU Ada compiler ii gnat-4.4-base 4.4.4-2 The GNU Compiler Collection (gnat base packa ii gprbuild 1.3.0-1 a multi-language extensible build tool ii gprbuild-doc 1.3.0-1 a multi-language extensible build tool What I did: $ cp -a /usr/share/doc/gprbuild-doc/examples/ada_cpp . $ cd ada_cpp $ make gprconfig --batch --config Ada,,sjlj --config C++ -o default.cgpr Creating configuration file: default.cgpr gprbuild animals.gpr gcc-4.4 -c -g -gnat05 -gnatwA main.adb animals.ads:33:24: cannot import abstract subprogram "Number_Of_Teeth" declared at line 5 animals.ads:36:24: cannot import abstract subprogram "Set_Owner" declared at line 10 gprbuild: *** compilation phase failed make: *** [all] Error 4 As you can see, this has nothing to to with GPS, gnatmake or gprbuild and everything to do with gnat-4.4. The version of gprbuild that Stephe packaged for Debian is identical to that in GNAT GPL 2009, which has new functionality to help interfacing Ada with C++. gnat-4.4 lacks some of these features; it can iterface with C++ but in more limited ways. One interesting feature that is new in GNAT GPL 2009 is the ability to generate an Ada spec file from C++ header files (i.e. g++ -fdump-ada-spec file.h). If you want to use these latest features, you should use a clean installation of GNAT GPL 2009; make sure you set your $PATH correctly to see the GNAT GPL compiler and NOT the Ubuntu compiler. -- Ludovic Brenta.
From: Stephen Leake on 19 May 2010 05:09 zeta_no <olivier_henley(a)hotmail.com> writes: > On May 18, 3:53 am, Stephen Leake <stephen_le...(a)stephe-leake.org> > wrote: > >> Just out of curiosity; why are you using Ubuntu instead of Debian in the >> first place? > > Last time I tried Debian and Ubuntu around the same period, I found > Ubuntu much more polished that Debian. Yes, Debian doesn't look like Windows when you first install it. But more things work, especially when you start upgrading. I have both Windows and Debian at home; Windows for games and such, Debian for serious work. > For everyday use, it is welcomed. But I like your way of thinking... > upgrade to Debian :). Also, I didn't know that the support for Ada in > Debian was better... Correct me if I'm wrong. > >> What version of GNAT GPL are you using? Since it has the older compiler, >> it is quite likely that there is a newer version. > > From the Ubuntu install, my version is Gnat 4.4 That's the Ubuntu gnat version. You said you also installed GNAT GPL, presumably by downloading from https://libre.adacore.com/libre/download/ What version is that? 2008 or 2009? -- -- Stephe
From: Stephen Leake on 19 May 2010 05:12 Ludovic Brenta <ludovic(a)ludovic-brenta.org> writes: > The Ubuntu maintainers are not here on this forum. That's interesting. Is there anything we can do about that? In the spirit of the recent discussion on debian-project, we should try to encourage cooperation between Debian and Ubuntu Ada people. -- -- Stephe
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 4 5 Prev: A proposal for Debian policy for Ada Next: Hard and soft real time with Ada |