Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

gnattest: aunit not installed

381 views
Skip to first unread message

robi...@e2eservices.co.uk

unread,
Feb 21, 2018, 5:53:05 AM2/21/18
to
Hello,

I've been fighting for awhile with gnattest, and trying to get it to work.

I downloaded `gnat-gpl-2017-x86_64-linux-bin` and ran `doinstall.sh`, and it all seems to work I have my project that uses AWS and JSON building via gprbuild fine.

I did download and compile gnatcol as well to get JSON working.

However when ever I try and run gnattest, even from the `share/examples/aunit` it always fails with the following output;

```
/usr/gnat/share/examples/gnattest/simple$ gnattest simple.gpr
default.gpr:1:06: unknown project file: "aunit"

gnattest: aunit not installed
```

The above also occurs if i try using GPS

I cannot find any advice online about this, anyone got any ideas what the problem is?

Using Ubuntu 16.04 LTS

Thanks,
Robin

Bojan Bozovic

unread,
Feb 21, 2018, 8:04:03 AM2/21/18
to
Try example from share/examples/gnattest/simple there is README.Testing there. Also look at AdaCore documentation on AUnit from http://docs.adacore.com/live/wave/aunit/html/aunit_cb/aunit_cb.html

It that doesn't help wait for someone experienced to answer, as I am a beginner.

robi...@e2eservices.co.uk

unread,
Feb 21, 2018, 8:24:20 AM2/21/18
to
On Wednesday, February 21, 2018 at 1:04:03 PM UTC, Bojan Bozovic wrote:
> Try example from share/examples/gnattest/simple there is README.Testing there. Also look at AdaCore documentation on AUnit from http://docs.adacore.com/live/wave/aunit/html/aunit_cb/aunit_cb.html
>
> It that doesn't help wait for someone experienced to answer, as I am a beginner.

Afraid that even the examples fail to build..

Anh Vo

unread,
Feb 21, 2018, 12:26:18 PM2/21/18
to
After installing the GNAT, you should see aunit.gpr along with other projects located at /GNAT_INSTALLATION_DIR/lib/gnat. In addition, make sure the variable GPR_PROJECT_PATH pointing this location. If it does not exist, create one for it.

Anh Vo

robi...@e2eservices.co.uk

unread,
Feb 22, 2018, 2:57:15 AM2/22/18
to
Hi Avh,

Afraid this still hasn't solved my problem :(

the lib/gnat folder contains a load of GPR files.

the GPR_PROJECT_DIR didn't exist so I set it, but this had no effect

echo $GPR_PROJECT_DIR
/usr/gnat/lib/gnat


/usr/gnat/lib/gnat$ ls
aunit.gpr gnatcoll_gmp.gpr gnatcoll_postgres.gpr gnatcoll_sqlite.gpr gnatmetric.gpr gnat_util.gpr xmlada.gpr xmlada_schema.gpr
gnat2xml.gpr gnatcoll.gpr gnatcoll_python.gpr gnatcoll_xref.gpr gnatpp.gpr manifests xmlada_input.gpr xmlada_unicode.gpr
gnatcoll_full.gpr gnatcoll_iconv.gpr gnatcoll_readline.gpr gnatelim.gpr gnattest.gpr xmlada_dom.gpr xmlada_sax.gpr

robi...@e2eservices.co.uk

unread,
Feb 22, 2018, 8:26:31 AM2/22/18
to
I've managed to get it working if i install libaunit-dev.. is there a way to do this via the ada distribution (via the ./doinstall)?

As i've currently just done: sudo apt-get install libaunit3.7.1-dev

not sure if it's even the correct version

Bojan Bozovic

unread,
Feb 22, 2018, 8:52:45 AM2/22/18
to
As far as I know FSF GNAT uses its own version of AUnit, different than AdaCore one, but I might be wrong. Check to see are you compiling with FSF or AdaCore compiler, which comes first in the PATH is used. Or just use gcc --version to see which one is used.

robi...@e2eservices.co.uk

unread,
Feb 22, 2018, 8:57:14 AM2/22/18
to
On Thursday, February 22, 2018 at 1:52:45 PM UTC, Bojan Bozovic wrote:
> As far as I know FSF GNAT uses its own version of AUnit, different than AdaCore one, but I might be wrong. Check to see are you compiling with FSF or AdaCore compiler, which comes first in the PATH is used. Or just use gcc --version to see which one is used.

Ok, looks like i just need to have the Ada bin (/usr/gnat/bin) at the front of the path to get this working.

It does contain it's own GCC, which when using it doesn't seem to depend on libaunit-dev as installed via apt-get.

Thanks

Simon Wright

unread,
Feb 22, 2018, 11:19:55 AM2/22/18
to
Actually it's not FSF GNAT you're talking about, it's Debian (as picked
up by Ubuntu), which has its own view on hw things should be packaged.

Sounds very much as though you're picking up the host Ada compiler, not
the GNAT GPL one you installed.

gnatls -v is a good way to see what Ada compiler you're using.

Dirk Heinrichs

unread,
Feb 22, 2018, 12:21:46 PM2/22/18
to
Am 21.02.2018 um 11:53 schrieb robi...@e2eservices.co.uk:

> Using Ubuntu 16.04 LTS

Wouldn't it have been easier to simply install the distribution packages
(gnat, gnat-gps, etc...)?

Bye...

Dirk
--
Dirk Heinrichs <dirk.he...@altum.de>
GPG Public Key: D01B367761B0F7CE6E6D81AAD5A2E54246986015
Sichere Internetkommunikation: http://www.retroshare.org
Privacy Handbuch: https://www.privacy-handbuch.de

Anh Vo

unread,
Feb 22, 2018, 3:35:08 PM2/22/18
to
On Wednesday, February 21, 2018 at 11:57:15 PM UTC-8, robi...@e2eservices.co.uk wrote:
> On Wednesday, February 21, 2018 at 5:26:18 PM UTC, Anh Vo wrote:
> > On Wednesday, February 21, 2018 at 5:24:20 AM UTC-8, robi...@e2eservices.co.uk wrote:
> > > On Wednesday, February 21, 2018 at 1:04:03 PM UTC, Bojan Bozovic wrote:
> > > > Try example from share/examples/gnattest/simple there is README.Testing there. Also look at AdaCore documentation on AUnit from http://docs.adacore.com/live/wave/aunit/html/aunit_cb/aunit_cb.html
> > > >
> > > > It that doesn't help wait for someone experienced to answer, as I am a beginner.
> > >
> > > Afraid that even the examples fail to build..
> >
> > After installing the GNAT, you should see aunit.gpr along with other projects located at /GNAT_INSTALLATION_DIR/lib/gnat. In addition, make sure the variable GPR_PROJECT_PATH pointing this location. If it does not exist, create one for it.
> >
> > Anh Vo
>
> Hi Avh,
>
> Afraid this still hasn't solved my problem :(
>
> the lib/gnat folder contains a load of GPR files.
>
> the GPR_PROJECT_DIR didn't exist so I set it, but this had no effect

Sorry for my typo. It should have been GPR_PROJECT_PATH.

Anh Vo
0 new messages