comp.lang.ada
 help / color / mirror / Atom feed
* Erroneous installation for GPRBuild on Ubuntu ?
@ 2011-05-26  1:16 Yannick Duchêne (Hibou57)
  2011-05-26  8:21 ` Ludovic Brenta
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Yannick Duchêne (Hibou57) @ 2011-05-26  1:16 UTC (permalink / raw)


Hi all,

I feel stupid, or else something is wrong.

I've installed GNAT in Ubuntu (10.10) since 4 months. This works fine.  
Today, I wanted to install AUnit. The documentation stated GPRBuild is  
required for that. So I installed GPRBuild (which I did not installed so  
far), and launched the “make” command from the “aunit-gpl-2010-src”  
directory.

It failed, with this rather surprising message:

> aunit_build.gpr:3:09: warning: no compiler specified forlanguage "Ada",  
> ignoring all its sources
> […]
> gprbuild: no sources to compile

How is this possible ? No compiler specified for language "Ada", it says ?

Note: both the FSF Ada compiler and GPRBuild was installed from official  
packages (not installed from scratch).

It's long time I did not play with GPRBuild's configuration files (I did  
it on Windows some time ago), and I don't feel happy to run to there right  
now (will do it later). I still wanted to notice, as this seems really  
strange (this should have worked right-up).

-- 
Si les chats miaulent et font autant de vocalises bizarres, c’est pas pour  
les chiens.
“ c++; /* this makes c bigger but returns the old value */ ” [Anonymous]



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Erroneous installation for GPRBuild on Ubuntu ?
  2011-05-26  1:16 Erroneous installation for GPRBuild on Ubuntu ? Yannick Duchêne (Hibou57)
@ 2011-05-26  8:21 ` Ludovic Brenta
  2011-05-26 15:03   ` Yannick Duchêne (Hibou57)
  2011-05-26 12:21 ` Simon Wright
  2011-05-27 11:33 ` Stephen Leake
  2 siblings, 1 reply; 12+ messages in thread
From: Ludovic Brenta @ 2011-05-26  8:21 UTC (permalink / raw)


Yannick Duchêne wrote on comp.lang.ada:
> Hi all,
>
> I feel stupid, or else something is wrong.
>
> I've installed GNAT in Ubuntu (10.10) since 4 months. This works fine.  
> Today, I wanted to install AUnit. The documentation stated GPRBuild is  
> required for that. So I installed GPRBuild (which I did not installed so  
> far), and launched the “make” command from the “aunit-gpl-2010-src”  
> directory.
>
> It failed, with this rather surprising message:
>
>> aunit_build.gpr:3:09: warning: no compiler specified forlanguage "Ada",  
>> ignoring all its sources
>> […]
>> gprbuild: no sources to compile
>
> How is this possible ? No compiler specified for language "Ada", it says ?
>
> Note: both the FSF Ada compiler and GPRBuild was installed from official  
> packages (not installed from scratch).
>
> It's long time I did not play with GPRBuild's configuration files (I did  
> it on Windows some time ago), and I don't feel happy to run to there right  
> now (will do it later). I still wanted to notice, as this seems really  
> strange (this should have worked right-up).

I'll let Stephe comment on gprbuild but I think the quick answer to
your problem is:

aptitude install libaunit1-dev

--
Ludovic Brenta.



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Erroneous installation for GPRBuild on Ubuntu ?
  2011-05-26  1:16 Erroneous installation for GPRBuild on Ubuntu ? Yannick Duchêne (Hibou57)
  2011-05-26  8:21 ` Ludovic Brenta
@ 2011-05-26 12:21 ` Simon Wright
  2011-05-26 14:43   ` Yannick Duchêne (Hibou57)
  2011-05-27 11:33 ` Stephen Leake
  2 siblings, 1 reply; 12+ messages in thread
From: Simon Wright @ 2011-05-26 12:21 UTC (permalink / raw)


"Yannick Duchêne (Hibou57)" <yannick_duchene@yahoo.fr> writes:

> I've installed GNAT in Ubuntu (10.10) since 4 months. This works
> fine. Today, I wanted to install AUnit. The documentation stated
> GPRBuild is  required for that. So I installed GPRBuild (which I did
> not installed so  far), and launched the “make” command from the
> “aunit-gpl-2010-src”  directory.
>
> It failed, with this rather surprising message:
>
>> aunit_build.gpr:3:09: warning: no compiler specified forlanguage
>> "Ada", ignoring all its sources
>> […]
>> gprbuild: no sources to compile
>
> How is this possible ? No compiler specified for language "Ada", it says ?
>
> Note: both the FSF Ada compiler and GPRBuild was installed from
> official packages (not installed from scratch).

When you say "GPRBuild was installed from official packages" I suppose
you mean AdaCore's?

I think the trouble is that gprbuild has lots of flexibility to run
different compilers in different circumstances, and this can confuse it.

I presume that your GNAT's gcc and gprbuild are both on your PATH (NB,
gprbuild is looking for "gcc", not "gnatgcc"). If this is OK and
gprbuild still doesn't work, then execute

   $ gcc -v

and check the Target: line; here, I get

   $ gcc -v
   Using built-in specs.
   COLLECT_GCC=gcc
   COLLECT_LTO_WRAPPER=/opt/gcc-4.6.0-x86_64/libexec/gcc/x86_64-apple-darwin10/4.6.0/lto-wrapper
   Target: x86_64-apple-darwin10
   [...]

and you need to tell gprbuild to use that target.

Without,

   $ /opt/gnat-gpl-2010-x86_64/bin/gprbuild -P default
   default.gpr:1:09: no languages defined for this project
   gprbuild: "default" processing failed

With,

   $ /opt/gnat-gpl-2010-x86_64/bin/gprbuild \
     --target=x86_64-apple-darwin10 -P default
   gcc -c -g -gnatQ -gnato -fstack-check -g acc.adb
   [...]




^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Erroneous installation for GPRBuild on Ubuntu ?
  2011-05-26 12:21 ` Simon Wright
@ 2011-05-26 14:43   ` Yannick Duchêne (Hibou57)
  2011-05-27  7:04     ` Ludovic Brenta
                       ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Yannick Duchêne (Hibou57) @ 2011-05-26 14:43 UTC (permalink / raw)


Le Thu, 26 May 2011 14:21:24 +0200, Simon Wright <simon@pushface.org> a  
écrit:
> With,
>
>    $ /opt/gnat-gpl-2010-x86_64/bin/gprbuild \
>      --target=x86_64-apple-darwin10 -P default
>    gcc -c -g -gnatQ -gnato -fstack-check -g acc.adb
>    [...]

You're right, that's OK with an explicit target specification. At the top  
of the Makfile (in “aunit-gpl-2010-src”), I changed “GPRBUILD  = gprbuild”  
into “GPRBUILD  = gprbuild --target=i686-linux-gnu”, and it did not  
complained anymore.

Still have some questions, still strange to me: the original line,  
“GPRBUILD  = gprbuild”, which does not contain any target specification,  
suggest GPRBuild should be able to use the current target as the default  
one (on Windows, this was indeed operating this way). I had a look at  
“/usr/share/gprconfig”, and found a configuration file for GNAT, so looks  
like its all there, while somethings are not the same anymore as before,  
like this configuration file for languages with no compiler (I remember I  
had to trick a bit for AdaControl files in a Windows project at that  
time). If its not the same anymore, will have to look again and study all  
of these files to understand why it does not properly handle a default  
native target.

Will try what Ludovic suggested, that is installing a pre-built package  
for AUnit, and leave that GPRBuild matters for some later times.

-- 
Si les chats miaulent et font autant de vocalises bizarres, c’est pas pour  
les chiens.
“ c++; /* this makes c bigger but returns the old value */ ” [Anonymous]



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Erroneous installation for GPRBuild on Ubuntu ?
  2011-05-26  8:21 ` Ludovic Brenta
@ 2011-05-26 15:03   ` Yannick Duchêne (Hibou57)
  2011-05-26 15:09     ` Yannick Duchêne (Hibou57)
  0 siblings, 1 reply; 12+ messages in thread
From: Yannick Duchêne (Hibou57) @ 2011-05-26 15:03 UTC (permalink / raw)


Le Thu, 26 May 2011 10:21:19 +0200, Ludovic Brenta  
<ludovic@ludovic-brenta.org> a écrit:
> I'll let Stephe comment on gprbuild but I think the quick answer to
> your problem is:
>
> aptitude install libaunit1-dev
This installed fine, but now there is another failure. When I compile the  
test suite (the one of AUnit), execution of the makefile ends with this  
sad message:

> Execution terminated by unhandled exception
> Exception name: STORAGE_ERROR
> Message: stack overflow (or erroneous memory access)
> Call stack traceback locations:
> 0x806879b

and the file test.out is empty. The exception message does not show any  
line number, however there are reasons to believe the error comes from the  
AUnit library.

-- 
Si les chats miaulent et font autant de vocalises bizarres, c’est pas pour  
les chiens.
“ c++; /* this makes c bigger but returns the old value */ ” [Anonymous]



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Erroneous installation for GPRBuild on Ubuntu ?
  2011-05-26 15:03   ` Yannick Duchêne (Hibou57)
@ 2011-05-26 15:09     ` Yannick Duchêne (Hibou57)
  0 siblings, 0 replies; 12+ messages in thread
From: Yannick Duchêne (Hibou57) @ 2011-05-26 15:09 UTC (permalink / raw)


Le Thu, 26 May 2011 17:03:01 +0200, Yannick Duchêne (Hibou57)  
<yannick_duchene@yahoo.fr> a écrit:

> Le Thu, 26 May 2011 10:21:19 +0200, Ludovic Brenta  
> <ludovic@ludovic-brenta.org> a écrit:
>> I'll let Stephe comment on gprbuild but I think the quick answer to
>> your problem is:
>>
>> aptitude install libaunit1-dev
> This installed fine, but now there is another failure. When I compile  
> the test suite (the one of AUnit), execution of the makefile ends with  
> this sad message:
>
>> Execution terminated by unhandled exception
>> Exception name: STORAGE_ERROR
>> Message: stack overflow (or erroneous memory access)
>> Call stack traceback locations:
>> 0x806879b

Just tested with the one from LibreAdaCore, with the same result.

-- 
Si les chats miaulent et font autant de vocalises bizarres, c’est pas pour  
les chiens.
“ c++; /* this makes c bigger but returns the old value */ ” [Anonymous]



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Erroneous installation for GPRBuild on Ubuntu ?
  2011-05-26 14:43   ` Yannick Duchêne (Hibou57)
@ 2011-05-27  7:04     ` Ludovic Brenta
  2011-05-27 11:39     ` Stephen Leake
  2011-05-27 12:34     ` Ludovic Brenta
  2 siblings, 0 replies; 12+ messages in thread
From: Ludovic Brenta @ 2011-05-27  7:04 UTC (permalink / raw)


Yannick Duchêne wrote on comp.lang.ada:
> You're right, that's OK with an explicit target specification. At the top  
> of the Makfile (in “aunit-gpl-2010-src”), I changed “GPRBUILD  = gprbuild”  
> into “GPRBUILD  = gprbuild --target=i686-linux-gnu”, and it did not  
> complained anymore.
>
> Still have some questions, still strange to me: the original line,  
> “GPRBUILD  = gprbuild”, which does not contain any target specification,  
> suggest GPRBuild should be able to use the current target as the default  
> one (on Windows, this was indeed operating this way). I had a look at  
> “/usr/share/gprconfig”, and found a configuration file for GNAT, so looks  
> like its all there, while somethings are not the same anymore as before,  
> like this configuration file for languages with no compiler (I remember I  
> had to trick a bit for AdaControl files in a Windows project at that  
> time). If its not the same anymore, will have to look again and study all  
> of these files to understand why it does not properly handle a default  
> native target.

I suspect this might be related to a change that Ubuntu made relative
to the original Debian. Debian uses i486-linux-gnu, Ubuntu changed
that to i686-linux-gnu.  Of course, without detailed symptoms or
access to an Ubuntu system, I cannot tell for sure.

--
Ludovic Brenta.



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Erroneous installation for GPRBuild on Ubuntu ?
  2011-05-26  1:16 Erroneous installation for GPRBuild on Ubuntu ? Yannick Duchêne (Hibou57)
  2011-05-26  8:21 ` Ludovic Brenta
  2011-05-26 12:21 ` Simon Wright
@ 2011-05-27 11:33 ` Stephen Leake
  2011-05-27 13:44   ` Yannick Duchêne (Hibou57)
  2 siblings, 1 reply; 12+ messages in thread
From: Stephen Leake @ 2011-05-27 11:33 UTC (permalink / raw)


"Yannick Duchêne (Hibou57)" <yannick_duchene@yahoo.fr> writes:

> Hi all,
>
> I feel stupid, or else something is wrong.
>
> I've installed GNAT in Ubuntu (10.10) since 4 months. This works fine.
> Today, I wanted to install AUnit. The documentation stated GPRBuild is
> required for that. So I installed GPRBuild (which I did not installed
> so  far), and launched the “make” command from the
> “aunit-gpl-2010-src”  directory.
>
> It failed, with this rather surprising message:
>
>> aunit_build.gpr:3:09: warning: no compiler specified forlanguage
>> "Ada", ignoring all its sources
>> […]
>> gprbuild: no sources to compile
>
> How is this possible ? No compiler specified for language "Ada", it says ?
>
> Note: both the FSF Ada compiler and GPRBuild was installed from
> official packages (not installed from scratch).

Which "official packages"? please show the command line you used, or at
least the package name and version if you used a GUI (once again, GUIs
make things harder :).

(I could interpret "official package" as "the .tar.gz from
http://libre.adacore.com/libre/ , but I'm assuming you mean "Ubuntu
package". I still need the version.).

You can run 'gprbuild -v -v' to get a log of how it searches for the
compiler.

> It's long time I did not play with GPRBuild's configuration files (I
> did it on Windows some time ago), and I don't feel happy to run to
> there right  now (will do it later). I still wanted to notice, as this
> seems really  strange (this should have worked right-up).

It does on Debian - perhaps you should upgrade :).

-- 
-- Stephe



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Erroneous installation for GPRBuild on Ubuntu ?
  2011-05-26 14:43   ` Yannick Duchêne (Hibou57)
  2011-05-27  7:04     ` Ludovic Brenta
@ 2011-05-27 11:39     ` Stephen Leake
  2011-05-27 13:49       ` Yannick Duchêne (Hibou57)
  2011-05-27 12:34     ` Ludovic Brenta
  2 siblings, 1 reply; 12+ messages in thread
From: Stephen Leake @ 2011-05-27 11:39 UTC (permalink / raw)


"Yannick Duchêne (Hibou57)" <yannick_duchene@yahoo.fr> writes:

> Le Thu, 26 May 2011 14:21:24 +0200, Simon Wright <simon@pushface.org>
> a écrit:
>> With,
>>
>>    $ /opt/gnat-gpl-2010-x86_64/bin/gprbuild \
>>      --target=x86_64-apple-darwin10 -P default
>>    gcc -c -g -gnatQ -gnato -fstack-check -g acc.adb
>>    [...]
>
> You're right, that's OK with an explicit target specification. At the
> top of the Makfile (in “aunit-gpl-2010-src”), I changed “GPRBUILD  =
> gprbuild”  into “GPRBUILD  = gprbuild --target=i686-linux-gnu”, and it
> did not  complained anymore.

Ah. This implies that by "official packages" you meant AdaCore, not
Ubuntu. Yes, that doesn't get the target right.

I fixed this problem in packaging gprbuild for Debian. Install the
Ubuntu gprbuild package, and things will be fine.

You should always search for Debian/Ubuntu packages before downloading
anything. If you don't find what you want, ask here; someone might be
working on it. We need to get more Ada packages into Debian.

-- 
-- Stephe



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Erroneous installation for GPRBuild on Ubuntu ?
  2011-05-26 14:43   ` Yannick Duchêne (Hibou57)
  2011-05-27  7:04     ` Ludovic Brenta
  2011-05-27 11:39     ` Stephen Leake
@ 2011-05-27 12:34     ` Ludovic Brenta
  2 siblings, 0 replies; 12+ messages in thread
From: Ludovic Brenta @ 2011-05-27 12:34 UTC (permalink / raw)


Yannick Duchêne wrote on comp.lang.ada:
> I had a look at “/usr/share/gprconfig”, and found a configuration
> file for GNAT, so looks like its all there [...]

This is what led me to believe you were using the official Debian
package for gprbuild.  If you were not, you made a mistake.  The
Debian packaging system owns /, /usr, /lib etc and all files under
these directories are under the control of dpkg.  If you place files
there manually, you're in for trouble. See
http://www.debian.org/releases/stable/i386/ch08s03.html.en

Per the Filesystem Hierarchy standard, the proper place for software
that you compile yourself is /usr/local.  So, the gprbuild
configuration files should be in /usr/local/share/gprconfig.  Most GNU
packages use /usr/local as the default installation path when you call
configure.  Your $PATH should contain /usr/local/bin by default and
$LD_LIBARY_PATH may contain /usr/local/lib.

Alternately, you can use /opt/$PACKAGE but then you have to adjust
your $PATH and other variables.

--
Ludovic Brenta.



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Erroneous installation for GPRBuild on Ubuntu ?
  2011-05-27 11:33 ` Stephen Leake
@ 2011-05-27 13:44   ` Yannick Duchêne (Hibou57)
  0 siblings, 0 replies; 12+ messages in thread
From: Yannick Duchêne (Hibou57) @ 2011-05-27 13:44 UTC (permalink / raw)


Le Fri, 27 May 2011 13:33:30 +0200, Stephen Leake  
<stephen_leake@stephe-leake.org> a écrit:
> Which "official packages"? please show the command line you used, or at
> least the package name and version if you used a GUI (once again, GUIs
> make things harder :).
I meant from the Ubuntu repository. Was installed via Synaptic (a GUI form  
for Ubuntu, of the “old” DSelect from Debian).

gprbuild is 1.3.0-1 (the version number suggest no custom modifications  
was made by Ubuntu).
gnat is 4.4+1ubuntu1 (ah... some Ubuntu specific stuff here).
gcc is 4:4.4.4-1ubuntu2 (idem)

for AUnit, I tested both the *.tar.gz from AdaCore and the *.deb from  
Ubuntu.
libaunit1-dev was 1.03-5

Did not look further so far, but will have to figure out the finally  
installed or compiled AUnit both crashes with the tests.

-- 
“Syntactic sugar causes cancer of the semi-colons.”  [Epigrams on  
Programming — Alan J. — P. Yale University]
“Structured Programming supports the law of the excluded muddle.” [Idem]
“c++; /* this makes c bigger but returns the old value */” [Anonymous]



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Erroneous installation for GPRBuild on Ubuntu ?
  2011-05-27 11:39     ` Stephen Leake
@ 2011-05-27 13:49       ` Yannick Duchêne (Hibou57)
  0 siblings, 0 replies; 12+ messages in thread
From: Yannick Duchêne (Hibou57) @ 2011-05-27 13:49 UTC (permalink / raw)


Le Fri, 27 May 2011 13:39:24 +0200, Stephen Leake  
<stephen_leake@stephe-leake.org> a écrit:

> "Yannick Duchêne (Hibou57)" <yannick_duchene@yahoo.fr> writes:
>
>> Le Thu, 26 May 2011 14:21:24 +0200, Simon Wright <simon@pushface.org>
>> a écrit:
>>> With,
>>>
>>>    $ /opt/gnat-gpl-2010-x86_64/bin/gprbuild \
>>>      --target=x86_64-apple-darwin10 -P default
>>>    gcc -c -g -gnatQ -gnato -fstack-check -g acc.adb
>>>    [...]
>>
>> You're right, that's OK with an explicit target specification. At the
>> top of the Makfile (in “aunit-gpl-2010-src”), I changed “GPRBUILD  =
>> gprbuild”  into “GPRBUILD  = gprbuild --target=i686-linux-gnu”, and it
>> did not  complained anymore.
>
> Ah. This implies that by "official packages" you meant AdaCore, not
> Ubuntu. Yes, that doesn't get the target right.
Not, was the Debian/Ubuntu package

-- 
“Syntactic sugar causes cancer of the semi-colons.”  [Epigrams on  
Programming — Alan J. — P. Yale University]
“Structured Programming supports the law of the excluded muddle.” [Idem]
“c++; /* this makes c bigger but returns the old value */” [Anonymous]



^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2011-05-27 13:49 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-26  1:16 Erroneous installation for GPRBuild on Ubuntu ? Yannick Duchêne (Hibou57)
2011-05-26  8:21 ` Ludovic Brenta
2011-05-26 15:03   ` Yannick Duchêne (Hibou57)
2011-05-26 15:09     ` Yannick Duchêne (Hibou57)
2011-05-26 12:21 ` Simon Wright
2011-05-26 14:43   ` Yannick Duchêne (Hibou57)
2011-05-27  7:04     ` Ludovic Brenta
2011-05-27 11:39     ` Stephen Leake
2011-05-27 13:49       ` Yannick Duchêne (Hibou57)
2011-05-27 12:34     ` Ludovic Brenta
2011-05-27 11:33 ` Stephen Leake
2011-05-27 13:44   ` Yannick Duchêne (Hibou57)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox