Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 214337 - app-admin/eselect-gnat does not setup gnat to work correctly
Summary: app-admin/eselect-gnat does not setup gnat to work correctly
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: ada team [OBSOLETE]
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-23 04:03 UTC by Hal Engel
Modified: 2008-05-17 08:13 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hal Engel 2008-03-23 04:03:49 UTC
I have emerged gnat-gpl as well as eselect-gnat and other gnat related libraries.  Ebuilds for things like gtkada and xlmada can find what they need to build but when I try to build gps 4.0.2 it fails on the configure step because it does not find gnatmake.  So using gnat from the command line does not work at least not without doing some additional configuration steps for which I have been unable to find documentation.

For example when I try to configure gps this is what happens:

$ ./configure --prefix=/usr
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
./configure: line 1416: gnatls: command not found
checking for xmlada.gpr... no_xmlada
checking for gcc... gcc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for library containing strerror... none required
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for gnatmake... no
configure: error: I could not find gnatmake. See the file 'INSTALL' for more details.


Reproducible: Always

Steps to Reproduce:
1. Install gnat-gpl
2. Install eselect-gnat and use it to set the above as the default gnat compiler
3. Install gtkada and xmlada
4. Get and unpack the 4.0.2 GPS sources
5. run ./configure in the root of the gps source tree.

Actual Results:  
./configure fails because it can not find any of the gnat utilities.

Expected Results:  
./configure and make should work for ada projects.
Comment 1 George Shapovalov (RETIRED) gentoo-dev 2008-04-08 14:08:50 UTC
This is strange. Most likely some misconfiguration on your end (I have no problem compiling my stuff here, nor did I receive any reports to this effect).

Did you forget to run ". /etc/profile" afterwards (most likely guess)? Please (re)run
env-update
. /etc/profile
and try again. You may even try to logout and then login again.

Can you please show your eselect gnat list output?
Also, please show the output of:
ls /usr/share/gnat/eselect/
ls /etc/env.d/55*

George
Comment 2 George Shapovalov (RETIRED) gentoo-dev 2008-04-08 14:26:31 UTC
BTW, you can find some documentation here (its an Ada project page):
http://www.gentoo.org/proj/en/prog_lang/ada/index.xml

Right now there is only developer-side documentation linked. I was hoping someone would write (at least some text for) the user-side docs, but oh, well, looks like I'll have to do it myself :).
Comment 3 Hal Engel 2008-04-08 23:27:05 UTC
I guess I didn't run env-update && source /etc/profile.  Sorry.  Running this helped get me farther along and I am able to get it to build a minimally functional version of gps if I don't configure the build to use xmlada or python and if I hand modify the gtkada.gpr file in the source tree to point to the correct locations.  It takes forever to build and for some reason it ignores -j3 and only uses one CPU :(. 

The xmlada issue is that I can't figure out the correct setting is for ADA_PROJECT_PATH.  Perhaps you could give me some clues about this.  If I set this to the location of the xmlada.gpr file it still refuses to configure the build to use xmlada.  Perhaps this setting should be part of /etc/env.d/55gnat-* since this appears to be where all of the other gnat related things are set?

I also found that when I enable python support in the configure script (--with-python=/usr/lib) that the build fails with compile errors in the python code.  I have not looked into these at all at this point but these appear to be libpath and include path related.

By the way I found that GPS 4.0.2 needs a special version of gtkada that is not in portage (gtkada-for-gps-4.0.2-src.tgz).  I created an ebuild for this if you are interested although my ebuild expects the tarball to be in /usr/portage/distfiles to work (IE. a hand downloaded tarball).  I suppose that it could be generalized if the tarball were put up on the Gentoo mirrors.  But this is basically a very slightly modified version of the 2.8.0 ebuild with the only change being the SRC_URI. 
Comment 4 gentoo 2008-04-29 22:47:04 UTC
(In reply to comment #3)
> I guess I didn't run env-update && source /etc/profile.  Sorry.  Running this
> helped get me farther along and I am able to get it to build a minimally
> functional version of gps if I don't configure the build to use xmlada or
> python and if I hand modify the gtkada.gpr file in the source tree to point to
> the correct locations.  It takes forever to build and for some reason it
> ignores -j3 and only uses one CPU :(. 
> 
> The xmlada issue is that I can't figure out the correct setting is for
> ADA_PROJECT_PATH.  Perhaps you could give me some clues about this.  If I set
> this to the location of the xmlada.gpr file it still refuses to configure the
> build to use xmlada.  Perhaps this setting should be part of
> /etc/env.d/55gnat-* since this appears to be where all of the other gnat
> related things are set?
> 
> I also found that when I enable python support in the configure script
> (--with-python=/usr/lib) that the build fails with compile errors in the python
> code.  I have not looked into these at all at this point but these appear to be
> libpath and include path related.
> 
> By the way I found that GPS 4.0.2 needs a special version of gtkada that is not
> in portage (gtkada-for-gps-4.0.2-src.tgz).  I created an ebuild for this if you
> are interested although my ebuild expects the tarball to be in
> /usr/portage/distfiles to work (IE. a hand downloaded tarball).  I suppose that
> it could be generalized if the tarball were put up on the Gentoo mirrors.  But
> this is basically a very slightly modified version of the 2.8.0 ebuild with the
> only change being the SRC_URI. 
> 

*shamless self promotion*

Have you tried the ebuild in bug 75803, comment 53? It uses the vanilla gtkada and works fine for me.
Comment 5 George Shapovalov (RETIRED) gentoo-dev 2008-05-17 08:13:38 UTC
(In reply to comment #3)
> I guess I didn't run env-update && source /etc/profile.  Sorry.  Running this
> helped get me farther along and I am able to get it to build a minimally
> functional version of gps if I don't configure the build to use xmlada or
> python and if I hand modify the gtkada.gpr file in the source tree to point > > to the correct locations. 
Yea, that thing is quite picky.

> It takes forever to build and for some reason it
> ignores -j3 and only uses one CPU :(. 
That's because MAKEOPTS only set -j option for make, and gps likely only uses gnatmake. To pass -j3 to it you will need to make another modification to some gpr file (section Builder). Even then, gnatmake seems to be not as efficient in paralellizing compiles unfortunately..


> The xmlada issue is that I can't figure out the correct setting is for
> ADA_PROJECT_PATH.  Perhaps you could give me some clues about this.
Well, AFAIR xmlada is one of the few libs that are already "completely converted", that is it also installs (properly modified) gpr files and the location of the main one should be listed in ADA_PROJECT_PATH. However there was a small bug, making so that that var was starting with :, may be this was preventing gnatmake from properly processing the list of dirs in it. I remember fixing it already a few month ago, however apparently I did not commit the fix before I got my laptop stolen recently :(. Fixed it now, please update eselect-gnat.

>  If I set
> this to the location of the xmlada.gpr file it still refuses to configure the
> build to use xmlada.
I suspect to make it use xmlada you will have to do more modifications to gps project files. It does not use autotools after all, simply finding xmlada may not be enough to force it to use xmlada.

BTW, did you try to build anything else that uses xmlada, or did you try to c
omplie your own project that uses xmlada? Does it work? If you have a problem with xmlada itself, please open a new bug about it (but, I believe, it should be Ok, especially with the last fix).

If you have any success or advance to report about gps, please post to that gps bug. I am going to close this one, as the original issue was resolved.

George