Polyorb/DSA Bug Fixes

Hello all,

Given the end of life status of Polyorb, I’ve forked the project and fixed a few problems I encountered during the development of an experimental multiplayer game which uses DSA.

The problems fixed so far are …

  1. In po_gnatdist, when preparing directories, copy non Ada object files (from any C sources) to the partition directory.
  2. In po_gnatdist, when loading all registered units, guard against including implicit 'with’s of Ada runtime packages, such as ‘a-sttebu.ads’.
  3. Honour DESTDIR in Makefile to aid OS package creators.

Without (1), po_gnatdist would fail if the project, or any of it’s dependencies, contained C source files.

Without (2), po_gnatdist would fail due to the implicit ‘with’ of ‘a-sttebu.ads’ showing up during gnatls invocation.

Problem (3) just allows OS package creators to more easily control the intermediate install destination of a project, if required, such as …

make -j1 DESTDIR=$pkgdir install

… in an Arch Linux PKGBUILD.

The fork is here if anyone is interested.

I’ll try to add any other problem fixes to the fork, if/when they arise, although I’m primarily interested in just the DSA personality.

If anyone has any problems or opinions, please feel free to open an Issue or Discussion in the forks repo.

Regards.

Great!

If you are going to contribute po_gnatdist to alire then I would suggest to name it just gnatdist and make it work for both Garlic and PolyORB. I will deprecate garlic_gnatdist then, because it is outdated and even doesn’t support project files.

What do you think about splitting gnatdist source to a dedicated repo?

Polyorb’s gnatdist actually has a garlic backend, tho I’ve never tried it and don’t know if it works or supports project files. I suspect not, but I might give it a try.

This should be quite easy as the Polyorb gnatdist code is (almost) entirely self-contained in a single folder. There are only 2 packages (Platform and Utils) used which are not in the folder and they are in a ../common_files folder and could simply be copied in. Hmm, although, the Platform package is generated during ./configure.

Whether it would be worth it depends on how well the Polyorb garlic backend works, I guess. In any case, Polyorb would probably be a good candidate for alire. If so, I wonder if all the personalities should be built/included (a huge build) or just the DSA personality ? I’m not sure if the other personalities are still relevant.

Well, as expected po_gnatdist, given the --PCS=garlic, didn’t succeed …

$ po_gnatdist --PCS=garlic simcity.cfg 

/usr/bin/gprbuild simcity_monolithic_app.adb -c -P /home/rod/Desktop/garlic/garlic/Examples/Bank/dsa/x86_64-unknown-linux-gnu/simcity_dist_app.gpr -aI/usr/lib/garlic -aO/usr/lib/garlic -largs -L/usr/lib/garlic -lgarlic

gprbuild: illegal option "-aI/usr/lib/garlic" on the command line

I expect it would take considerable effort to sort it all out but might be willing to try if others are willing to help ?

Note that the Bank example built fine when using Garlic’s gnatdist :slight_smile: .