Package Details: gprbuild 1:22.0.0-2

Git Clone URL: (read-only, click to copy)
Package Base: gprbuild
Description: Ada library to handle Gnat project files
Upstream URL:
Licenses: custom, GPL3
Conflicts: gprbuild-bootstrap
Provides: gprbuild-bootstrap
Submitter: None
Maintainer: charlie5 (xiretza)
Last Packager: xiretza
Votes: 27
Popularity: 0.000129
First Submitted: 2010-02-03 13:25 (UTC)
Last Updated: 2022-05-15 07:18 (UTC)

Latest Comments

charlie5 commented on 2022-01-27 09:37 (UTC)


I've encountered the same problem. A second ...

$ pacaur -S gnat-gps

... completed the install.

Armag67 commented on 2022-01-27 01:16 (UTC)

@charlie5 & @xiretza, thanks for your advices.

It worked, but with same build failures:

:: Construction du paquet gnat-gps...
==> Création du paquet gnat-gps 2021-3 (mer. 26 janv. 2022 16:20:00)
==> Vérification des dépendances pour l’exécution…
==> Installation des dépendances manquantes…
erreur : impossible de trouver la cible : ada_language_server
==> ERREUR : « pacman » n’a pas pu installer les dépendances manquantes.
==> Dépendances manquantes :
  -> ada_language_server
  -> python2-gobject
==> Vérification des dépendances pour la compilation…
==> ERREUR : Échec de résolution des dépendances.
:: ada-libfswatch is now an orphan package
:: ada_spawn is now an orphan package
:: gnatcoll-db2ada is now an orphan package
:: gnatcoll-gmp is now an orphan package
:: gnatcoll-python2 is now an orphan package
:: gnatcoll-xref is now an orphan package
:: gprbuild is now an orphan package
:: python2-yaml is now an orphan package
:: failed to build langkit package(s)
:: failed to build libadalang package(s)
:: failed to build libadalang-tools package(s)
:: failed to build ada_language_server package(s)
:: failed to build gnat-gps package(s)

I needed to build and install one by one langkit, libadalang, libadalang-tools, ada_language_server and then gnat-gps.

charlie5 commented on 2022-01-26 12:16 (UTC) (edited on 2022-01-26 12:16 (UTC) by charlie5)


Hard to diagnose when I can't repeat the problem.

All I can suggest is this ...

$ sudo pacman -Rsc gcc-ada

$ pacaur -S gnat-gps

... that is wipe all ada packages and rebuild all from scratch.

Armag67 commented on 2022-01-25 13:58 (UTC) (edited on 2022-01-25 13:59 (UTC) by Armag67)

I tried cloning gprbuild in an empty folder and made makepkg -si, but AFTER upgrading libgpr with an AUR helper. And then upgrading gprbuild failed...

Unfortunately, I cleared my AUR cache and I don't know how to downgrade AUR packages as libgpr. How could I git clone an old commit of an AUR package?

charlie5 commented on 2022-01-23 14:57 (UTC) (edited on 2022-01-24 07:08 (UTC) by charlie5)


Perhaps try cloning into a new folder and doing 'makepkg' from there. You may have old build artifacts if you have just 'git pull'ed into an existing gprbuild git repo folder. Or just delete the 'src' folder there.

If you are using pacaur, then delete the gprbuild folder in ~/.cache/pacaur and try again.

xiretza commented on 2022-01-23 11:59 (UTC)

That depends on what you did in the first place, but downgrading libgpr to match gprbuild might lead you in the right direction.

Armag67 commented on 2022-01-23 11:56 (UTC) (edited on 2022-01-23 11:56 (UTC) by Armag67)


@charlie5, my version of GCC is 11.1.0-3

@xiretza, what can y do now?

xiretza commented on 2022-01-23 09:03 (UTC)

@Armag67: it looks like you upgraded libgpr without upgrading gprbuild, so now gprbuild (linked against the old version of the library) can't find a symbol that no longer exists in the new version.

charlie5 commented on 2022-01-23 07:20 (UTC) (edited on 2022-01-23 07:28 (UTC) by charlie5)

hi @Armag67,

I cannot reproduce that error. I will try again soon.

Is your system fully up to date ? Which GCC version are you using ?

Possibly @xiretza can shed some light.

Armag67 commented on 2022-01-22 21:49 (UTC) (edited on 2022-01-22 21:54 (UTC) by Armag67)


This evening, libgpr built fine, but with gprbuild, by using the git clone way, I had this traceback:

==> Starting build()...
gprbuild -p -m   -j0 -XBUILD=production -R -cargs -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2           -fstack-clash-protection -fcf-protection -largs -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -gargs gpr/gpr.gpr -XLIBRARY_TYPE=static \
gprbuild: symbol lookup error: gprbuild: undefined symbol: gpr__empty_file
make: *** [Makefile:146:] Error 127
==> ERROR: A failure occurred in build().

And now gnatstudio fails with the traceback:

gnatstudio: symbol lookup error: /usr/lib/ undefined symbol: gpr__empty_string

charlie5 commented on 2022-01-22 16:23 (UTC) (edited on 2022-01-22 16:24 (UTC) by charlie5)

Thanks @tfl5034 New version is now in the AUR.

tfl5034 commented on 2022-01-22 00:56 (UTC)

I was able to update this package by making the following changes to the PKGBUILD. I removed the ld partial linker patch because it didn't apply cleanly. Looking at the history of linker.xml, they made changes to support partial linking by passing a no-pie flag.

diff --git a/PKGBUILD b/PKGBUILD
index 9f5060e..2780bc5 100644
@@ -6,8 +6,8 @@
 pkgname=(libgpr gprbuild)
 pkgdesc="Builder for multi-language systems"
 arch=('i686' 'x86_64')
@@ -19,20 +19,17 @@ source=(
-    '0001-Use-ld-as-Library_Partial_Linker.patch'
-            '2aec26afad5bb1a4685d9c041c9c797ff5beda211a5e81f2a97452d2ceabc557'
+            'cc19437e0982d9af31e09ad7c42eac6a445dac65336bd53d67ba61f630be7f13'
-            'b1a38e166f54d7b8e85f7351341109200c5712f7bfa79a9233adf8a24e036a3a'

 prepare() {
     cd "$srcdir/gprconfig_kb-$pkgver"

-    patch -Np1 -i "$srcdir/0001-Use-ld-as-Library_Partial_Linker.patch"
     patch -Np1 -i "$srcdir/0002-compilers.xml-use-gcc-version-to-get-version-number-.patch"

     cd "$srcdir/$pkgbase-$pkgver"

gbabin commented on 2021-05-17 14:32 (UTC)

No, not that I am aware of, but a little sed or patch would make the situation much less confusing.

xiretza commented on 2021-05-16 23:13 (UTC)

@gbabin: does this cause any problems?

gbabin commented on 2021-05-16 21:50 (UTC)

gprbuild 21.0.0 builds, however it reports "GPRBUILD Pro 18.0w (19940713)".

According to, gpr/src/ is supposed to be patched during the build. The patching tool does not seem to be in the repo:

charlie5 commented on 2021-01-03 08:10 (UTC)

hi @JanSurft

The name clash is unfortunate :( .

I know of no workaround other than to remove all packages that require grpc.

I can at least add gprc to the 'conflicts' array. Thanks for pointing out the issue.

JanSurft commented on 2021-01-02 06:03 (UTC)

This package seems to conflict with grpc because it desires overwriting of libgpr.

Is there any known workaround, or do I need to remove all packages that require grpc for installing gnat-gps?

➜  ~ sudo pacman -S libgpr
Packages (1) libgpr-2020-5
error: failed to commit transaction (conflicting files)
libgpr: /usr/lib/ exists in filesystem (owned by grpc)
Errors occurred, no packages were upgraded.

Armag67 commented on 2020-05-22 11:42 (UTC)

Ok, thank you very much xiretza, I will wait ;)

xiretza commented on 2020-05-22 11:28 (UTC)

Yes, gnat-gps still needs to be updated to the 2020 release, which will happen soon™ (all the gnatcoll-db based packages need to be done first).

Armag67 commented on 2020-05-22 11:20 (UTC) (edited on 2020-05-22 11:40 (UTC) by Armag67)

Thanks xiretza, I had forgotten that trick since last year. I have now installed/updated without troubles and in that order : gprbuild-bootstrap (2020-2), xmlada (2020-2), libgpr (2020-3), gprbuild (2020-4), gnatcoll-core (2020-1) but gnat-gps (2019-2 is the latest version) was broken and I needed to rebuild it. Rebuild of gnat-gps fails now with this traceback:

code_analysis_xml.adb:57:19: "Project_Array" is not visible
code_analysis_xml.adb:57:19: multiple use clauses cause hiding
code_analysis_xml.adb:57:19: hidden declaration at
code_analysis_xml.adb:57:19: hidden declaration at
code_analysis_xml.adb:57:33: incorrect constraint for this kind of type
code_analysis_xml.adb:60:16: prefix of "Range" attribute must be a type
code_analysis_xml.adb:61:10: array type required in indexed component
code_analysis_xml.adb:67:16: prefix of "Range" attribute must be a type
code_analysis_xml.adb:68:24: array type required in indexed component

   compilation of code_analysis_xml.adb failed

gprbuild: *** compilation phase failed
make[1]: *** [Makefile:44 : all] Erreur 4
make[1] : on quitte le répertoire « /var/tmp/pamac-build-h2/gnat-gps/src/gps-eb0d52567d9e1af49ee3248144442c9fa46bbb55/gps »
make: *** [Makefile:21 : all] Erreur 2
==> ERREUR : Une erreur s’est produite dans build().

xiretza commented on 2020-05-22 06:43 (UTC)

@Armag67: gprbuild-bootstrap and xmlada need to be updated before gprbuild and libgpr can be built. If that doesn't work, please post the exact versions of all those packages and I'll have a look.

Armag67 commented on 2020-05-22 01:04 (UTC) (edited on 2020-05-22 01:09 (UTC) by Armag67)

Hello charlie5,

Today update of libgpr required by gnatcoll-core and gprbuild updates failed on my Manjaro box with this traceback:

gprbuild: error while loading shared libraries: cannot open shared object file: No such file or directory
make: *** [Makefile:154 :] Erreur 127

I have the file in my path, but not the file. Should y make a symlink?

Thanks to take a look.

chmp commented on 2020-01-30 07:02 (UTC)

Hi, Looks like the package would need to be updated: curl: (6) Could not resolve host:

That's a showstopper at the moment.

Armag67 commented on 2019-06-29 01:20 (UTC) (edited on 2019-06-29 01:22 (UTC) by Armag67)

The solution was in this comment of charlie5 from may 2019:

There is a circular dependency. 'gprbuild' depends on 'libgpr', which depends on 'xmlada', which depends on 'gprbuild'. The circularity is broken by introducing 'gprbuild-bootstrap'. The normal build order should be: gprbuild-bootstrap xmlada libgpr gprbuild (which should replace gprbuild-bootstrap)

I have uninstalled gnat-gps and all his related packages installed in this order: gprbuild-bootstrap xmlada libgpr gprbuild before gnat-gps

Armag67 commented on 2019-06-22 22:37 (UTC) (edited on 2019-06-23 09:04 (UTC) by Armag67)

Hello charlie5,

I have the following error when building this package at today updates of: gnatcoll-core, gnatcoll-iconv, gnatcoll-python, gnatcoll-readline, gprbuild, gtkada, libadalang, libgpr & xmlada packages related to my gnat-gps instal:

==> Lancement de package()…
exe/production/gprinstall -p -f --target=x86_64-pc-linux-gnu  --prefix=/var/tmp/pamac-build-h2/gprbuild/pkg/gprbuild/usr -XBUILD=production --mode=usage --install-name=gprbuild \
    -XINSTALL_MODE=nointernal gprbuild.gpr
exe/production/gprinstall: symbol lookup error: exe/production/gprinstall: undefined symbol: gpr_build_util__add_gpr_tool_external
make: *** [Makefile:132: install] Error 127
==> ERREUR : Une erreur s’est produite dans package().
Could it by related with this warning?
Avertissement : cycle de dépendances détecté :
Avertissement : gprbuild sera installé avant sa dépendance libgpr

Thank's to take a look.

Edit: Now, sunday morning with all the 16 packages update related to gnat-gps, same error at buid of gprbuild.

charlie5 commented on 2018-09-09 08:56 (UTC)

@gbabin Thanks for the tips, I will follow them up.

Having pkgname in the conflicts array seemed weird to me also. I was using some of the git versions as templates and that was done there.

And thank you for your 'thank you' :). I am (obviously) still a novice in PKGBUILD-foo and some of the the Ada package builds are a bit tricky :).

gbabin commented on 2018-09-09 08:39 (UTC)

@charlie5 you are correct

I had to build xmlada then libgpr then gprbuild.

You should change the dependency to depends=('libgpr>=2018'), then that would be automatic. The issue is the same for all gnatcoll/gpr/gps 2018 packages.

Also, do not add pkgname to the provides array, as it is done automatically.

Finally, it seems very weird to have the pkgname in the conflicts array.

Thank you for all the Ada-related packages !

charlie5 commented on 2018-09-09 08:05 (UTC)

hi gbabin ... can you try rebuilding and reinstalling xmlada.

gbabin commented on 2018-09-07 19:36 (UTC)

I have the following error when building this package:

==> Starting build()...
gprbuild -p -m   -j4 -XBUILD=production -R gprbuild.gpr -XLIBRARY_TYPE=relocatable -XXMLADA_BUILD=relocatable -cargs -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -largs -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now
   [mkdir]        object directory for project GPR
   [mkdir]        library directory for project GPR
   [mkdir]        object directory for project Gprbuild
   [mkdir]        exec directory for project Gprbuild
   [Ada]          gprconfig-main.adb
   [Ada]          gprls.adb
Build Libraries
   [gprlib]       gpr.lexch
   [link library]
   [gprbind]      gprconfig-main.bexch
   [Ada]          gprconfig-main.ali
   [gprbind]      gprbuild-main.bexch
   [gprbind]      gprclean-main.bexch
   [Ada]          gprbuild-main.ali
   [Ada]          gprclean-main.ali
   [gprbind]      gprinstall-main.bexch
   [Ada]          gprinstall-main.ali
error: "" and "gprconfig-main.adb" compiled with different GNAT versions             +
error: "dom-core.adb" and "gprconfig-main.adb" compiled with different GNAT versions        + many similar errors
error: "" and "gprconfig-main.adb" compiled with different GNAT versions             +
error: "" and "gprconfig-main.adb" compiled with different GNAT versions   +
gprbind: invocation of gnatbind failed
error: "sax-state_machines.adb" must be compiled                                                     + many similar errors
error: ("/usr/lib/xmlada/xmlada_sax.relocatable/sax-state_machines.ali" is obsolete and read-only)   +
gprbind: invocation of gnatbind failed
   binding of gprconfig-main.adb failed
   binding of gprclean-main.adb failed
   binding of gprbuild-main.adb failed
   binding of gprinstall-main.adb failed
gprbuild: *** post compilation phase failed
make: *** [Makefile:103: build] Error 4

charlie5 commented on 2017-05-09 04:14 (UTC)

Thanks for the tip Chocimier. I've added prepare_gnat_util as a dependency.

Chocimier commented on 2017-05-01 13:56 (UTC)

That package fails to build without prepare_gnat_util installed. Error log is like: gcc -c -fPIC -gnat12 -gnaty -gnatQ -gnata -O2 -gnatn -gnatws -g1 gpr-dect.adb gcc -c -fPIC -gnat12 -gnaty -gnatQ -gnata -O2 -gnatn -gnatws -g1 gpr-nmsc.adb gprlib gpr.lexch gcc -shared -o /path/libgpr/src/gprbuild/gpr/lib/production/relocatable/ ... /path/libgpr/src/gprbuild/gpr/libobj/production/relocatable/gpr-com.o ... /usr/bin/ld: cannot find -lgnat-6.3 collect2: error: ld returned 1 exit status gprlib: /usr/bin/gcc execution error gprbuild: could not build library for project gpr make: *** [Makefile:135:] Error 4 ==> ERROR: A failure occurred in build(). Aborting...

charlie5 commented on 2016-11-30 07:18 (UTC)

Georgios, The problem should now be fixed in PKGBUILD.

charlie5 commented on 2016-11-30 06:54 (UTC)

Hi Georgios, Thanks for pointing this out. This error occurs when the 'src' directory already exists. I will try to fix this in the PKGBUILD. In the meantime, doing the following should allow the package to build ... $ rm -fr src/ Regards.

Georgios commented on 2016-11-29 23:44 (UTC)

The package build fails with the following message: ==> Connecting to GIT server.... You are not currently on a branch. Please specify which branch you want to merge with. See git-pull(1) for details. git pull <remote> <branch>

charlie5 commented on 2016-06-06 00:15 (UTC)

The obsolete 'Makefile.archy' file has been removed, along with all references to it. Should build ok now.

ids1024 commented on 2016-06-05 16:37 (UTC)

Makefile.archy needs to be added to the src array in the PKGBUILD.

charlie5 commented on 2016-06-01 09:32 (UTC)

Earnest, Apologies for the delay. I've been waiting for GNAT GPL16 to emerge before tackling the archy Ada updates. (Also been a bit flat out.) "... a malicious user can dump a gcc or clang script in some bin directory prepended to PATH and gprbuild will blindly use it." I didn't know of this problem. Thanks for pointing it out. "... they're going to add a standalone static gprbuild binary which should help bootstrapping in the 2016 release." This they have done. You're 'whining' has done some good ! ... :) . Yes, it should help simplify things considerably. "... my approach is to build gprbuild using the static gprbuild, which also builds xmlada ..." I will try to do the same. "... they've at least added checksums for their over-http downloads." Again, this they have done :) . Sincere thanks for your comments (and successful efforts to improve the Ada ecosystem). My impression is that AdaCore is largely resistant to outside influences, so your efforts are doubly appreciated. cheers, charlie5.

Earnest commented on 2016-05-15 12:53 (UTC) (edited on 2016-05-15 12:57 (UTC) by Earnest)

I've tried working with upstream Adacore to fix this build system and it's hopeless. They refuse to move from Debianisms and employ very sketchy practices such as rolling over PATH to find tools. This NIH could be solved nicely by honouring de facto environments such as CC but no, instead a malicious user can dump a gcc or clang script in some bin directory prepended to PATH and gprbuild will blindly use it. They also offer no way to bootstrap gprbuild (other build systems, such as make, don't seem to suffer from this insanity). Up until now they've only provided a static gprbuild as part of their giant 300+MiB download, although thanks to my whining they're going to add a standalone static gprbuild binary which should help bootstrapping in the 2016 release. Speaking of bootstrapping, my approach is to build gprbuild using the static gprbuild, which also builds xmlada (PKGBUILD: <>). Then this gprbuild is used to build xmlada (PKGBUILD: <>) proper and then the final gprbuild (PKGBUILD: <> (incomplete)). At this point gprbuild will also provide gprbuild-bootstrap as a virtual package so any subsequent rebuilds can use it instead of going through the static one. * * * Hopefully this can help to verify the initial compiler wasn't malicious IIRC <> as Adacore do not sign their downloads, although again thanks to my whining they've at least added checksums for their over-http downloads. Either way, Adacore is a miserable clusterfuck and the only way to make gprbuild and the Ada library ecosystem work on non-Debian distributions is to patch/fork gprbuild. (Or hope people who write Ada software are wise enough to also provide Makefiles, but fat chance of that happening.)

charlie5 commented on 2016-02-01 08:04 (UTC)

"Perhaps it would be better to patch gprbuild to change the path it uses?" ... a better option, yes. In fact, the gcc/gnat/gprbuild and gnat_util (which requires full gcc-ada rebuild) is, err, tricky, to sort out. There are also later issues with gdb not recognising Ada exceptions (such as Constraint_Error) when you want to set break point on a given exception, perhaps due to the gcc/gnat runtime not being built with debug symbols attached (i guess). I, err, sort of inherited this job (so am glad of any help/advice). I will try it locally, of course.

ids1024 commented on 2016-02-01 05:48 (UTC)

Installing that package works, though it is imperfect. Perhaps it would be better to patch gprbuild to change the path it uses? I haven't looked at how difficult that would be.

charlie5 commented on 2016-02-01 05:46 (UTC)

I guess PKGBUILD depends settings musyt need attention ... will look properly tomorrow. Sorry for inconvenience.

charlie5 commented on 2016-02-01 05:40 (UTC)

Ah, Have you installed the 'prepare_gnat_util' package ? (It should provide the libgnat-5.3.0 link). As you say, hackish ... any advice welcome.

ids1024 commented on 2016-02-01 04:54 (UTC)

@charlie5 It shows "gcc (GCC) 5.3.0" The library seems to be named /usr/lib/ rather than /usr/lib/ like it is looking for. A symlink makes it compile, but that is a hack.

charlie5 commented on 2016-02-01 00:32 (UTC)

Hi ids1024, What does this show ? $ gcc --version

ids1024 commented on 2016-01-30 17:56 (UTC)

Trying to use gprbuild, I am getting the error "/usr/bin/ld: cannot find -lgnat-5.3"

charlie5 commented on 2015-11-21 09:09 (UTC)

Source URL is now updated. It seems several of the Adacore packages source URL's have changed. The other packages should be updated now also.

valexey commented on 2015-11-20 20:09 (UTC)

Thanks! It helps.

Dettorer commented on 2015-11-20 18:43 (UTC)

Changing the source url of gprbuild to should fix it.

valexey commented on 2015-11-20 08:57 (UTC)

It looks like url is invalid now: $ makepkg -si ==> Making package: gprbuild 2015-1 (Fri Nov 20 11:56:50 UTC 2015) ==> Checking runtime dependencies... ==> Checking buildtime dependencies... ==> Retrieving sources... -> Downloading 3c2da2f1d3335d39bc9ebb65a3a58264ddac6d41... % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (22) The requested URL returned error: 404 Not Found ==> ERROR: Failure while downloading 3c2da2f1d3335d39bc9ebb65a3a58264ddac6d41 Aborting...

Georgios commented on 2014-07-29 17:17 (UTC)

Is this truly out of date? Because the 2014 GPL version doesn't build with FSF's gnat.

commented on 2013-07-28 06:01 (UTC)

fails for other localizations than english. please add this patch:

aayjaychan commented on 2013-07-27 07:48 (UTC)

The package installs gprbind and gprlib in /usr/libexec/gprbuild. Is it possible to patch it to use /usr/lib/gprbuild instead?

titiwu commented on 2013-07-22 17:56 (UTC)

Thanks, that helped!

Sietse commented on 2013-07-19 12:37 (UTC)

@titiwu Please try to recompile your xmlada, that should fix the problem.

titiwu commented on 2013-07-18 16:36 (UTC)

I get the following error building this package: fatal error: file dom.ali is incorrectly formatted make sure you are using consistent versions of gcc/gnatbind 7. | gnatmake: *** bind failed. My System is up to date (x86_64, gcc-ada 4.8.1-1, xmlada 4.1-3) Any suggestions?

Sietse commented on 2013-07-14 10:54 (UTC)

Updated to 2013 version so we can finally use gprinstall!

commented on 2011-10-18 19:05 (UTC)

hi, i have an updated version of gprbuild (2011). don't have permission to upload it..

Georgios commented on 2011-10-15 21:43 (UTC)

Georgios commented on 2011-10-15 21:38 (UTC)

This is not an old package yet, since the 2011 version cannot be compiled by the current gcc (<4.7). BUT the source link is wrong. Please update