Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 143226 - ada bindings to Qt
Summary: ada bindings to Qt
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement
Assignee: Default Assignee for New Packages
URL: http://freehost07.websamba.com/guibui...
Whiteboard:
Keywords:
Depends on: 151343 191090
Blocks:
  Show dependency tree
 
Reported: 2006-08-08 10:56 UTC by George Shapovalov (RETIRED)
Modified: 2019-01-01 16:10 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
qtada-0.1.1.ebuild (qtada-0.1.1.ebuild,2.83 KB, text/plain)
2007-09-02 20:53 UTC, Maxim Reznik
Details
qtada-0.1.1-gentoo.patch (qtada-0.1.1-gentoo.patch,1.40 KB, patch)
2007-09-02 20:53 UTC, Maxim Reznik
Details | Diff
a somewhat cleaned up ebuild (qtada-0.1.1.ebuild,2.41 KB, text/plain)
2007-09-03 21:53 UTC, George Shapovalov (RETIRED)
Details
qtada-1.0.0.ebuild (qtada-1.0.0.ebuild,924 bytes, text/plain)
2007-12-11 23:09 UTC, George Shapovalov (RETIRED)
Details
qtada-1.1.0_pre20080619.ebuild (qtada-1.1.0_pre20080619.ebuild,3.07 KB, text/plain)
2008-06-25 08:53 UTC, George Shapovalov (RETIRED)
Details
config.log (config.log,53.24 KB, text/plain)
2008-06-25 12:30 UTC, George Shapovalov (RETIRED)
Details
patch for gprbuild (incremental linking of shared libraries) (incremental-shared-library-linking-1.patch,10.88 KB, text/plain)
2008-07-15 10:38 UTC, Vadim Godunko
Details
patch for gprbuild (linker driver selection) (linker_driver-1.patch,996 bytes, text/plain)
2008-07-15 10:39 UTC, Vadim Godunko
Details

Note You need to log in before you can comment on or make changes to this bug.
Description George Shapovalov (RETIRED) gentoo-dev 2006-08-08 10:56:19 UTC
Looks like a relatively modern binding, at least for a qt-3 (unlike some qt-1 bindings found on some stale sites).

Also, on comp.lang.ada there was a discussion just this week and it seems a project has been started on creating bindings (following class hierarchy and allowing class extention) for qt-4. 
Primary contributors seem to be 
Yves Bailly <kafka.fr@laposte.net>  and
Vadim Godunko <vgodunko@rostel.ru> (there was also a thread on russian mailing list mirroring the one on comp.lang.ada).
If this works out that would definitely be a candidate for inclusion. Meanwhile I'll try to look at the above link at some point..

George
Comment 1 George Shapovalov (RETIRED) gentoo-dev 2006-09-14 03:12:38 UTC
Vadim just made an announcement of the first public release of whatever they came up with at this point. I doubt it is complete, or that it even covers much of qt, but apparently there is some code already on this site:
http://qt4ada.sourceforge.net/

George
Comment 2 Maxim Reznik 2007-09-02 20:50:14 UTC
I managed to build qtada-0.1.1 on gentoo Linux. Here is an ebuild and small patch. I've sent this patch to authors. There is also an error in dev/asis-gpl, so I've  opened bug #191090.

Some problems with this ebuild:
Author claims that qtada could be built on gnat-gpl-2007 only, so I doubt to use gnat.eclass. I used it, but reject any gnat profile except gnat-gpl-4.1 in lib_compile/lib_install. Any better solution?

There is "QA Notice:". I dont know what does it mean.
Comment 3 Maxim Reznik 2007-09-02 20:51:53 UTC
(continue)
The biggest problem: I have stuck with install 'amoc' into /usr/bin.

Please help
Comment 4 Maxim Reznik 2007-09-02 20:53:00 UTC
Created attachment 129865 [details]
qtada-0.1.1.ebuild
Comment 5 Maxim Reznik 2007-09-02 20:53:30 UTC
Created attachment 129867 [details, diff]
qtada-0.1.1-gentoo.patch
Comment 6 George Shapovalov (RETIRED) gentoo-dev 2007-09-03 13:25:32 UTC
Thanks Maxim!

I had a shot at it myself, but that was long time ago, when it was half way to even 0.1. I wanted to do a live svn ebuild, but could not get the thing to build even once, quite expectedly, considering that gnat-gpl-2007 was noteven out then. Hopefully this one works. I am going to take a look at it, just a few remarks first:

>Author claims that qtada could be built on gnat-gpl-2007 only, so I doubt to
>use gnat.eclass. I used it, but reject any gnat profile except gnat-gpl-4.1 in
>lib_compile/lib_install. Any better solution?
Well, right now there is only one version of gnat that supports "full" Ada-2005. So, for now this ebuild can simply be done a "regular" way, without inheriting gnat.eclass at all(it would just depend directly on gnat-gpl-4.1.3.2007). However the long term solution would use a virtual, which I was going to create, most likely virtual/ada. This one would track Ada standard versions (so it would have ada-1995 and ada-2005 correspondingly there), different from the virtual/gnat which tracks gcc backend versions. However I have not figured out yet all the details of how this would be supported by gnat.eclass. It is getting quite convoluted I am afraid :(.

>The biggest problem: I have stuck with install 'amoc' into /usr/bin.
Well, until multiple SLOTs are implemented this is not really a problem. Even then, this might be Ok - I understand that this is some kind of code driver or "extra frotend"? If it spits out stuff in some backend-independent format then we can keep only one version even if qtada is SLOTted. We will have to see..

George
Comment 7 George Shapovalov (RETIRED) gentoo-dev 2007-09-03 21:53:09 UTC
Created attachment 129940 [details]
a somewhat cleaned up ebuild

Here goes. This is a first pass on the ebuild, incorporating some of the changes I described plus cleanups. I haven't touched the install part yet, as the compile does not finish cleanly yet:

make[2]: ????? ? ??????? "/var/tmp/portage/dev-ada/qtada-0.1.1/work/qtada-0.1.1-gpl/examples/elastic_nodes"
../../adacompiler -c -O0 -gnat05 -gnatW8 -I. -I.  -I../../source/gui -I../../source/gui -I../../source/core -I../../source/core -I../../source/ui_tools -I../../source/ui_tools graph_widgets.ads -o graph_widgets.o
../../adacompiler -c -O0 -gnat05 -gnatW8 -I. -I.  -I../../source/gui -I../../source/gui -I../../source/core -I../../source/core -I../../source/ui_tools -I../../source/ui_tools graph_widgets-constructors.adb -o graph_widgets-constructors.o
../../source/tools/amoc/amoc ./graph_widgets-impl.adb -gnat05 -O0 -gnat05 -gnatW8 -I. -I.  -I../../source/gui -I../../source/gui -I../../source/core -I../../source/core -I../../source/ui_tools -I../../source/ui_tools
gcc: language ada not recognized
gcc: language ada not recognized
gcc: ./graph_widgets-impl.adb: linker input file unused because linking not done
???? ?????? ?????????? graph_widgets-impl.adt ??????? ??????.

Execution terminated by unhandled exception
Exception name: ASIS.EXCEPTIONS.ASIS_FAILED


As I can see, the library is already built though. This happens when it tries to compile examples, so some changes may be necessary (apparently ittriesto call gcc instead of gnatgcc). However these examples may be moved to test part or even omitted and left as an excersize to user.

Attaching this now, so that this does notget lost. I'll try to revisit this package again soon.

Things to do:

1. Sort out situation with examples
2. Do the installation part. BTW, what is the problem with that binary? Why did you not simply use dobin there? (instead of insinto/doins, you'd then need to change permissions as well I think)
3. expand pkg_setup to check whether the right version of gnat is activated..

George
Comment 8 Maxim Reznik 2007-09-04 14:16:46 UTC
"gcc: language ada not recognized"
This is the bug in dev/asis-gpl I meant before. Read bug #191090.
In ASIS source name of gnat frontend is written in source code as "gcc".
Amoc call asis library, asis call gcc (instead of gnatgcc), gcc knows nothing about ada and complains. Try to emerge patched asis from bug #191090.

>what is the problem with that binary
I used gnat.eclass. It's unclear for me in what function should I install /usr/bin/amoc (in lib_install or in src_install). In lib_install amoc is available but target directory not. In src_install amoc is lost somewhere in profiles build directories. It would be straitforward to install it in usual compilation way (without gnat.eclass) though.

"ebuild qtada-0.1.1-r1.ebuild compile" works fine for me (including examples). Let's proceed to install part :)

Actually I started writing ebuild in your way (without gnat.eclass), but couldn't easyly get name of target directory for *.ali files and turn to gnat.eclass way.
Comment 9 George Shapovalov (RETIRED) gentoo-dev 2007-12-11 23:09:18 UTC
Created attachment 138287 [details]
qtada-1.0.0.ebuild

Sorry for the delay. This is an ebuild for the 1.0.0 version (there is a snapshot for 1.1.0 as of now). This one is a continuation of the previous approach - one compiler only. It is pretty basic (qtada install scripts has improved quite a bit since last try) but may require some adjustment to src_install.

However this will most likely not go into the tree as it is now. I have some ideas for how to properly do multicompiler setup, so watch bug #151343. The problem here is that this package requires relatively full Ada-2005 implementation, so gnat.eclass has to be enhanced somewhat first. Plus, I will probably soon add some snapshot for gnat-gcc-4.3, so the proper handling will really be necessary.

George
Comment 10 George Shapovalov (RETIRED) gentoo-dev 2007-12-11 23:09:56 UTC
Added dependency on bug #151343, as discussed in previous comment.
Comment 11 Maxim Reznik 2007-12-12 13:37:46 UTC
I got error while emerging:

 /usr/bin/install -c -m 0444 'qt4-timers.ali' '/var/tmp/portage/dev-ada/qtada-1.0.0/image//usr/lib/ada/qtada/qtada/qt4-timers.ali'
test -z "/usr/include/ada/qtada/qtada/core" || mkdir -p -- "/usr/include/ada/qtada/qtada/core"
ACCESS DENIED  mkdir:     /usr/include/ada/qtada
mkdir: cannot create directory `/usr/include/ada/qtada': Permission denied
make[4]: *** [install-coreincludeHEADERS] Error 1
make[4]: Leaving directory `/var/tmp/portage/dev-ada/qtada-1.0.0/work/qtada-1.0.0/source/core'
Comment 12 George Shapovalov (RETIRED) gentoo-dev 2008-06-23 10:24:26 UTC
qt-1.0.3 has been added to the tree. I was also preparing qtada-1.1.0_pre, but IIRC I hit some build problems, but it is in the works. I'll take at it again as soon as I have a chance.

On related stuff, looks like some old qt bindings are still alive, Leonid Dulman (according to Georg Bauhaus) just announced on comp.lang.ada the availability of qt3ada and qt4ada. If these will go into the tree I guess I'll keep these names and will keep qtada for the binding being processed. 

The principal site for qt?ada is:
http://www.websamba.com/guibuilder
and for particular versions:
ftp://qtada@ftp40.websamba.com/qt3/qtada.tar.bz2
ftp://qtada@ftp40.websamba.com/qt4/qt4ada.tar.bz2
(although there seems to be a problem actually pulling the sources)

George
Comment 13 Vadim Godunko 2008-06-23 10:59:19 UTC
Can you please explain which build problems do you have?

Please also note, QtAda 1.1 requires GNAT GPL 2008 or FSF GCC 4.3.0. Where are no ASIS implementation available for the last and QtAda must be configured with --enable-gela flag for use internal ASIS implementation.
Comment 14 George Shapovalov (RETIRED) gentoo-dev 2008-06-23 15:31:31 UTC
(In reply to comment #13)
> Can you please explain which build problems do you have?
I dont remember right now (that was quite a while ago, when I added the 1.0.3) I'll check and post here, however see below.
 
> Please also note, QtAda 1.1 requires GNAT GPL 2008 or FSF GCC 4.3.0. Where are
> no ASIS implementation available for the last
Well, there (kind of) is, check portage ;). I basically took asis core from some "ported" (to 4.3) version lying around (may be even yours) and added tools from old version. It builds and runs fine, in whatever used I had for it..

> and QtAda must be configured with
> --enable-gela flag for use internal ASIS implementation.
Yea, that might be it. IIRC I was trying to use "system" asis instead of gela. However I did not spend too much time on it back then. I'll post more when I get around to this again..
Comment 15 George Shapovalov (RETIRED) gentoo-dev 2008-06-25 08:53:16 UTC
Created attachment 158361 [details]
qtada-1.1.0_pre20080619.ebuild

So, I had some time to test the 1.1 ebuild and here is the build tail:
../../../adacompiler -c -g -O2 -gnat05 -gnatW8 -I. -I.  -gnatwn -I../../../source/core -I../../../source/core -I../../../source/tools/amoc/gela amoc-asis_implementation_gnat.adb -o amoc-asis_implementation_gnat.o
amoc-asis_implementation_gnat.adb:50:55: "A_Null_Exclusion_Trait" not declared in "Asis"
amoc-asis_implementation_gnat.adb:79:22: "Compile" not declared in "Extensions"
amoc-asis_implementation_gnat.adb:121:32: "Definition_Interface_List" not declared in "Definitions"

It does indeed seem to be related to asis. This was built using gnat-gcc-4.3.1 with the corresponding version of asis activated. The asis was taken (IIRC) from your site (qtada.sourceforge.org) with tools taken from the old version.

Is this asis not supposed to be sufficient for qtada-1.1? (then why is it mentioned there at all?) It is also possible, that I took a somewhat older version of asis (I prepared it couple of month ago, when gcc-4.3.0 came out).

I attached qtada-1.1.0 ebuild that I was working on (note: src_compile was not yet adjusted as I did not get there yet).
Comment 16 George Shapovalov (RETIRED) gentoo-dev 2008-06-25 08:55:35 UTC
Making use of this opportunity,
Vadim: what is the story with gela and ASIS? Is one supposed to replace another? Are they supposed to coexist and if so, how they are supposed to interact?

Should I plan on including gela as an alternative or addition to ASIS or only as a part of that alternative interpreter project?
Comment 17 Vadim Godunko 2008-06-25 09:56:15 UTC
Most probably you have pre GPL2007 ASIS installed. I have tested QtAda 1.1 with GPL 2007 and GPL 2008 ASIS versions and all works fine.
Comment 18 Vadim Godunko 2008-06-25 10:04:18 UTC
Both ASIS for GNAT and Gela were an implementations of the the same ASIS API.

ASIS for GNAT based on the GNAT compiler frontend, highly dependent from the compiler version and traces this dependency into any ASIS based applications.

Gela is a compiler independent ASIS implementation, it works well with any Ada compiler.

I have recommened to use ASIS for GNAT with the AdaCore compilers and Gela with the FSF GCC compilers.
Comment 19 Maxim Reznik 2008-06-25 11:36:49 UTC
Gela ASIS is a compiler independent implementation of ASIS standard. It implements full ASIS for Ada 95 and follows SIs for Ada 2005.
List of implemented SI: http://www.ten15.org/browser/trunk/tendra/src/producers/ada/spec

Because ASIS for Ada 2005 is rather rough, we made some proposals:
http://www.ten15.org/wiki/Ada/Asis_2005_Ext

So Gela and ASIS4GNAT both implement ASIS for Ada 95. But in case Ada 2005 they have some differences, because ASIS4GNAT has its own Ada 2005 related queries.

An ASIS application (such as QtAda amoc) could be built with either Gela or ASIS4GNAT, but not with both.

Gela is rather early and has many bugs/unimplemented features. However it will be nice to have Gela as separate package in Gentoo as preview. Gela has BSD license. See Gela home http://www.ten15.org/wiki/Ada

Due to installing ASIS4GNAT into GNAT include directory it seems impossible to have both ASIS4GNAT and Gela in Gentoo however.

QtAda includes whole source code of some version of Gela already (including some  automatic generated files). If you like to make separate package for Gela I could prepare snapshot and (from scratch) building procedure, but it will require ayacc/aflex tools.
Comment 20 George Shapovalov (RETIRED) gentoo-dev 2008-06-25 11:54:16 UTC
(In reply to comment #17)
> Most probably you have pre GPL2007 ASIS installed. I have tested QtAda 1.1 with
> GPL 2007 and GPL 2008 ASIS versions and all works fine.
Actually (I just checked) ASIS is asis-gcc-4.3.0-132166 taken from the qtada site with tools from asis-gcc-4.2.2. So, am I right to conclude that this particular version of asis is insufficient for building  qtada and I should, now that asis-gpl-2008 by ACT is out, replace asis-gcc-4.3 in portage with something based in that (ACT's) version?

Comment 21 Vadim Godunko 2008-06-25 12:11:08 UTC
(In reply to comment #20)
> (In reply to comment #17)
> > Most probably you have pre GPL2007 ASIS installed. I have tested QtAda 1.1 with
> > GPL 2007 and GPL 2008 ASIS versions and all works fine.
> Actually (I just checked) ASIS is asis-gcc-4.3.0-132166 taken from the qtada
> site with tools from asis-gcc-4.2.2. So, am I right to conclude that this
> particular version of asis is insufficient for building  qtada and I should,
> now that asis-gpl-2008 by ACT is out, replace asis-gcc-4.3 in portage with
> something based in that (ACT's) version?
> 
I have reproduced same problem on Windows :-)

Can you please attach config.log file, I need to analize ASIS detection result.
Comment 22 George Shapovalov (RETIRED) gentoo-dev 2008-06-25 12:27:58 UTC
(In reply to comment #19)
> Gela is rather early and has many bugs/unimplemented features. However it will
> be nice to have Gela as separate package in Gentoo as preview. Gela has BSD
> license. See Gela home http://www.ten15.org/wiki/Ada
If you are willing to back it up, I am willing to consider its inclusion ;).

> 
> Due to installing ASIS4GNAT into GNAT include directory it seems impossible to
> have both ASIS4GNAT and Gela in Gentoo however.
Then asis-gxx and gela will have to block each other. 

As gela is compiler independent (as you say) it seem preliminarly possible to install it for all gnat versions (provided support of the right Ada standard as I understand) using mechanism similar to the one in gnat.eclass. As we cannot have both gela and "proper" asis installed simultaneously it makes sense to install gela in the same place where asis was isntalled. I see 2 possibilities:

1. Gela is installed as a regular ada lib using (possibly extended) gnat.eclass for all "primary" compilers, as usual. Then gela has to block all versions of asis. That is user can have either gela or a variation of asis versions. Not ideal from user standpoint but easy to do technically.

2. I add multiple ebuilds for gela that share build procedure and vary only in version (to match appropriate gnat, like asis do now) and DEPEND blocker entry. This gives more control over what is installed but will require extra eclass (unless I am to add virtually identical ebuilds).

This all is only valid, of course, given that my understanding of situation with gela - that it can be built from the same sources with the same procedure for all compilers in the tree, is correct.
Comment 23 George Shapovalov (RETIRED) gentoo-dev 2008-06-25 12:30:38 UTC
Created attachment 158373 [details]
config.log

(In reply to comment #21)
> Can you please attach config.log file, I need to analize ASIS detection result.
Here you go :).

Re previous comment.
Maxim: If you do want to go ahead with gela, please open a new bug, when ready..
Comment 24 George Shapovalov (RETIRED) gentoo-dev 2008-07-07 14:17:10 UTC
Just a heads up:
I added (finally, looks like ACT's gnat does not like shared libs? I had to disable libada) gnat-gpl-2008 and asis-gpl-2008. I tried rerunning the build of this version of qtada (1.1.0_pre200806) with this compiler and asis but I am hitting the same error (as in comment #15).

Any progress tracing/fixing this issue?
Also, is it worse/better to build qtada against gela instead of one of the asis implementations now in the tree? I would imagine this might lead to some problems when trying to use both asis and qtada in some project, or is it somehow not an issue?
Comment 25 Vadim Godunko 2008-07-08 16:31:28 UTC
(In reply to comment #24)
> Just a heads up:
> I added (finally, looks like ACT's gnat does not like shared libs? I had to
> disable libada) gnat-gpl-2008 and asis-gpl-2008.
libada is an FSF feature, AdaCore still use "old" build way:

make -C gcc gnatlib-shared

> Any progress tracing/fixing this issue?
I reproduce behavior on Windows/MSYS. This is the problem with the compiler switches detection for the ASIS for GNAT. For now I am trying to replace autotools by GNAT Project Files and gprbuild. By the way, does Gentoo include gprbuild program?

> Also, is it worse/better to build qtada against gela instead of one of the asis
> implementations now in the tree? I would imagine this might lead to some
> problems when trying to use both asis and qtada in some project, or is it
> somehow not an issue?
> 
ASIS used only by QtAda's amoc program. It is absolutely safe to build QtAda with Gela.
Comment 26 George Shapovalov (RETIRED) gentoo-dev 2008-07-08 16:46:21 UTC
(In reply to comment #25)
> libada is an FSF feature, AdaCore still use "old" build way:
It did work in gnat-gpl-2007..

> make -C gcc gnatlib-shared
Ok, I guess I'll make this conditional on ${PN}

> By the way, does Gentoo include gprbuild program?
Um, looks like no. Apparently it is not part of tools. What make target creates it?

> ASIS used only by QtAda's amoc program. It is absolutely safe to build QtAda
> with Gela.
Ok, I'll look into building it with internal Gela then. It might, still, be nice to have Gela as a separate package..
Comment 27 Vadim Godunko 2008-07-08 17:13:53 UTC
(In reply to comment #26)
> (In reply to comment #25)
> > libada is an FSF feature, AdaCore still use "old" build way:
> It did work in gnat-gpl-2007..
> 
Here is configure switches are used for build official compiler version:

/cardhu.b/gnatmail/release-gpl/build-cardhu/src/configure --prefix=/usr/gnat --target=i686-pc-linux-gnu --host=i686-pc-linux-gnu --build=i686-pc-linux-gnu --enable-languages=c,ada --disable-nls --disable-libada --enable-checking=release --enable-threads=posix

> > By the way, does Gentoo include gprbuild program?
> Um, looks like no. Apparently it is not part of tools. What make target creates
> it?
> 
This is a separate program. You can find it sources on the Libre site. File has name gprbuild-gpl-1.2.0-src.tgz
Comment 28 Vadim Godunko 2008-07-15 09:50:45 UTC
I complete implementation of the build machinery for QtAda 1.1. Problem with ASIS detection fixed for now, but of course new problems may appear.

QtAda 1.1 requires gprbuild program for build.
Comment 29 Vadim Godunko 2008-07-15 10:38:07 UTC
Created attachment 160427 [details]
patch for gprbuild (incremental linking of shared libraries)
Comment 30 Vadim Godunko 2008-07-15 10:39:03 UTC
Created attachment 160429 [details]
patch for gprbuild (linker driver selection)
Comment 31 Vadim Godunko 2008-07-15 10:41:14 UTC
I added to patches for gpgbuild. They may be helpful if you will have problems with gprbuild. This patches usually not needed for Linux system.