Where to download AUnit 3 (for Ada)? - ada

Where to download the AUnit (AFAIK, the latest version is 3) for Ada (particularly for GNAT-4.9)?
I don't care whether this AUnit is licensed GPL or otherwise, because it is used only for my test program and the license of the test program does not matter.
I have a Debian system with gnat-4.9. The package libaunit2-dev does not install with this version of GNAT. And it seems that libaunit2-dev is AUnit 1 rather than AUnit 3. I would prefer the latest version.

Go to http://libre.adacore.com and select Download, Free Software, Build your download package, (any operating system)/GNAT GPL 2014, GNAT Ada GPL 2014, Sources, click on aunit-gpl-2014-src.tar.gz (not the checkbox, since you only want the one archive).
I’d recommend not running plain make install to install with the compiler, because AdaCore packages assume a different file structure from that used by Debian; in particular, gnatmake will not find aunit.gpr. Also, you may confuse apt-get. Install in ~/local instead by
make install INSTALL=$HOME/local
(yes, I know, it should be prefix not INSTALL but AdaCore aren’t all that consistent about this)
and then include $HOME/local/lib/gnat in your $ADA_PROJECT_PATH.

Related

install elm 0.16 and its dependenices

I need to get acquainted specifically with elm 0.16.XX because some project I am working on is using it, and long story short,e.g. the version cannot be changed. Also, as you guys know there is a significant change between 0.16 and later elm versions. I am doing an online video course that has the 0.16.XX version but when I install elm, it naturally installs the latest version. How can I install the older versions?
The info I see online says to just change in elm.json, the version numbers of dependencies you need, but the problem is that the names of the dependencies have also changed. e.g in a basic hello world project,
0.16.xx
"elm-lang/core": 5.1.1, "elm-lang/html": 2.0.0, "elm-lang/virtual dom": 2.0.4
as opposed to modern elm
"elm/core": 1.0.5, "elm/html": 1.0.0, "elm/virtual-dom": 1.0.3
So how do I go about installing older elm i.e 0.16.XX. Any help is appreciated.
In theory, you could download the source code zip and try to build from sources but I remember people having a lot of trouble with the particular Haskell dependencies.
If the app is an Html based app that used evancz/start-app you might have some luck by first upgrading to 0.17.1. Take a look at https://github.com/elm-lang/elm-platform/blob/master/upgrade-docs/0.17.md
You might be able to install 0.17.1 with npm i -D elm#0.17.1.
elm.json is available only to 0.19 and 0.19.1 projects. The versions before that used elm-package.json
You can download Elm 0.16 installers for Windows and Mac Elm from the official releases.
https://github.com/elm/compiler/releases/tag/0.16.0
But I have no idea if installing the dependencies still works.
So maybe you'll need to incrementally upgrade your code, see https://github.com/elm-lang/elm-platform/tree/master/upgrade-docs
If that is too complicated, maybe you can ask in the Elm slack if someone can upgrade the code for you? E.g. with a small freelancer contract?

Installing ada libraries from github -- to keep getting file not found error

This is such a noddy question, but I'm struggling to particularly install libadalang which (to avoid X-Y problem) came from me having a working Gnatstudio, installing ada webserver, then I couldn't start Gnatstudio as it required libadalang.so. So I tried to install libadalang and
am currently getting failures of the form
libadalang-iterators-extensions.ads:29:29: file "langkit_support-symbols-precomputed.ads" not found
So I've spammed my /opt/GNAT/2020 with installing langkit everywhere that looks likely.
./lib/langkit_support
./lib/lib/langkit_support
./lib/include/langkit_support
./include/langkit_support
And still the installer for libadalang doesn't work.
Clearly something going on with paths here that I'm not getting. Can anyone provide any information on how paths are supposed to work as I need to install a number of other ada and SPARK-ada libraries from github and I want to do it correctly.
I think, the simplest way to restore GNAT Studio is to delete everything and reinstall. The GNAT Studio has its-own copy of libadalang/langkit. Look for
<install-path>/lib/gnatstudio/libadalang.so
<install-path>/lib/gnatstudio/liblangkit_support.so
When you install a developer version of libadalang you will get another copy of these files. They could have a different version.
I would suggest you to install GNAT Studio into a dedicated directory and make sure you launch it with a shell script from the bin (bin/gnatstudio). This way it shouldn't be affected by any other installed libraries.
Installing AWS shouldn't break GNAT Studio installation. If you know how to reproduce, please report to AdaCore.

No GNATtest in GNAT Community Edition?

When I try to generate unit tests in GNAT 2020 Community Edition (Windows 10 64 bit), I get an error on missing gnattest tool: could not locate gnattest.
Same happens on Ubuntu 20.04 (in WSL) with package gnat-10: could not locate x86_64-linux-gnu-gnattest-10.
Is GNATtest not part of GNAT 2020 Community Edition, as shown on AdaCores website (https://www.adacore.com/gnatpro/comparison)?
Yes in 2020 Community Edition gnattest is not included. Main reason: gnattest is tool based on library ASIS which is no longer maintained. AdaCore is moving towards libadalang library and for now gnattest is a victim of these changes. It will back soon or later to Community Edition (when it will be rewritten to use libadalang). Source: I was hit by this same problem and I got this answer from AdaCore :)
At this moment, you can download source package asis-2019-20190517-18AB5-src.tar.gz from previous version of GNAT and compile it by self. At least for me, it works.
AdaCore are moving away from ASIS to their own libadalang technology, and GNAT CE 2020 doesn’t include ASIS.
The ASIS-based applications in GNAT CE 2019 are
gnat2xml
gnat2xsd
gnatcheck
gnatelim
gnatmetric *
gnatpp *
gnatstub *
gnattest
of which only the ones marked with an asterisk are in GNAT CE 2020 (for macOS, at any rate).
If you do go with #thindil’s answer, it’d be best to install the ASIS tools in their own directory, so as to avoid stomping on gnatpp etc.
For info, gnatelim is missing because - for targets using the GNU linker - -ffunction-sections, -fdata-sections, and -gc-sections do the equivalent job
On Ubuntu you can just install asis applications with : sudo apt install asis-programs

Updating boost libraries without affecting existing binaries

I would like to do some development for which I need boost. (I'm using Fedora 19). The installation on the boost site seems straightforward and I'm pretty much ready. However, I found that I already have some shared boost libraries but I don't have any headers. Furthermore, I have a lot of installed software that uses the shared libs. For example
ldd /usr/bin/checkpto
produces
linux-vdso.so.1 => (0x00007fff7b115000)
libhuginbase.so.0.0 => /usr/lib64/hugin/libhuginbase.so.0.0 (0x0000003a92c00000)
libboost_thread-mt.so.1.53.0 => /lib64/libboost_thread-mt.so.1.53.0 (0x0000003a98200000)
libboost_system-mt.so.1.53.0 => /lib64/libboost_system-mt.so.1.53.0 (0x0000003a98600000)
...
Now I want to do a full boost install, but what will happen to all the binaries I have that already depend on the existing boost libraries? Will I have to maintain two sets? As you might guess from the ldd output, there are no symlinks to those libraries. They are all files. Could yum resolve the dependencies and update the binaries that depend on them?
Thanks!
It depends on whether you need a different version of the boost library than that available in the Fedora repository.
If you do not need a different version, you can simply install all the boost library packages from the Fedora repository including the ...-devel packages which provide the library headers.
If you do a different version, you will have to obtain the boost source distribution, build it and install it yourself. You just need to make sure that you DO NOT install it in the default system locations (e.g. /usr/include, /usr/lib, /usr/lib64). That way, your version can live side by side with the Fedora versions in perfect harmony.

IDE for GNAT 3.15p Ada compiler

I am using the GNAT 3.15p Ada compiler which is suggested for RTRT. I was using GPS IDE with another version of the GNAT Ada compiler. Is there any IDE available for the GNAT 3.15p compiler? Can I use GPS IDE itself, if so how to change the compiler?
Thanks
Padmapriya
I believe that GPS will use the first gcc and gnatmake that it finds on the PATH.
Normally, installing GNAT on Windows will set up the PATH properly; if you already have a later GNAT+GPS installed, installing 3.15p should put itself first on the PATH.
The latest GPS you can find (e.g. GPS from GNAT GPL 2012) might support GNAT 3.15p (although the officially stated support only goes back as far as GNAT Pro 3.16a1). Look in the newer GPS manual for the "multiple toolchains" feature. This works very well for using a newer GNAT toolset with an older compiler. The "multiple toolchains" settings will override the OS path variable settings.
See http://docs.adacore.com/gps-docs/users_guide/_build/html/compilation.html#working-with-two-compilers
If you use gpr files you will probably have to restrict yourself to project file features that were available in GNAT 3.15p.
You might also have some luck with either GNATbench on Eclipse or AdaGIDE as alternate IDEs.

Resources