AdaCore / gprbuild

GPRbuild is an advanced build system designed to help automate the construction of multi-language systems.
Other
65 stars 21 forks source link

Fix build on Netbsd with gcc 10.3.0 #107

Closed stcarrez closed 2 years ago

stcarrez commented 2 years ago

On Netbsd we now have gcc 10.3.0, thanks to @Irvise for this port, but gprbuild does not compile because

This pull request contains changes that fixes the build on Netbsd. I'm doing this more as a friendly notification and not really as a request to merge this in your branch.

CLAassistant commented 2 years ago

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Irvise commented 2 years ago

Hi @stcarrez nice to see you here. Also, happy new year.

I have not commented much over on C.L.A regarding the state of the Ada tooling in NetBSD with gcc10-aux. I will give here a short comment.

Most AdaCore tools follow the compiler, meaning, they tend to use newer features when they are made available in GCC. I successfully managed to compile GPRBuild without issue... Using version 21.2, NOT v22, which is the current one, let alone the master branch. I had to patch out the bootstrap script (changes that actually made it to master, but not to v21) for it to compile, but they were very minor. I actually compiled most of AdaCore tools, but always version 21. I nearly got ada-mode working over in Emacs, which requires several tools to be installed! Even Alire works now in NetBSD :D

So I would say that you will be much better using v21 of all tools. However, a better approach would be to install and use GCC 11 for NetBSD. Marino has helped a ton getting GCC back up to speed in NetBSD, but since he does not follow pkgsrc, but his Ravenports project https://github.com/jrmarino/Ravenports he used a newer GCC (GCC 11), https://github.com/jrmarino/draco

gcc10-aux did not make it into pkgsrc-Q4 sadly, I have not had any luck getting anybody from pkgsrc to take a look into the package... And after it is moved to stable, the packaging frenzy of Ada tools in pkgsrc can start.

Still, if you have any questions or if you need help getting anything compiled in NetBSD, feel free to write to me directly or in any other communications platform.

Regards, Fer

anisimkov commented 2 years ago
  • it uses an internal GCC method __gnat_file_time whose name is __gnat_file_time_name is GCC 10.3.0

Wrong. Fresh GNAT have it both but with different return types.

it uses the Ada.Containers.Vectors.Append_Vector and Insert_Vector procedures which are not available.

Ada.Containers.Vectors.Append going to be removed in the future and the only Append_Vector will remain.

If you get gprbuild sources from origin/21.2 branch both problems you "fixed" by this commits will gone.

t-14 commented 2 years ago

As suggested, recommendation is to use the branch 21.2 since the master branch is not compatible with the obsolete GNAT.