Package Details: gnatdoc 24.0w-1

Git Clone URL: https://aur.archlinux.org/gnatdoc.git (read-only, click to copy)
Package Base: gnatdoc
Description: GNAT documentation generation tool.
Upstream URL: https://github.com/AdaCore/gnatdoc
Submitter: charlie5
Maintainer: charlie5
Last Packager: charlie5
Votes: 1
Popularity: 0.000027
First Submitted: 2022-11-19 07:53 (UTC)
Last Updated: 2023-06-16 07:33 (UTC)

Pinned Comments

charlie5 commented on 2023-07-09 16:41 (UTC)

This package is available in the Arch Ada Repository.

https://wiki.archlinux.org/title/Ada

Latest Comments

charlie5 commented on 2023-07-09 16:41 (UTC)

This package is available in the Arch Ada Repository.

https://wiki.archlinux.org/title/Ada

charlie5 commented on 2023-06-26 18:44 (UTC)

hi @tfl5034,

Libadalang is already an (indirect) dependency of gnatdoc (via gpr-unit-provider). The error you get appears to be due to your libadalang being an older version (not 24.0w). 'libadalang-project_provider.ads:57' in the new 24.0w version points to a line of comment code.

Can you please try re-building libadalang and let me know if you still get this same problem?

Regards.

tfl5034 commented on 2023-06-24 17:56 (UTC)

It looks like libadalang should be added as a dependency. Currently I get the following error.

gnatdoc-projects.adb:203:41: error: missing argument for parameter "Env" in call to "Create_Project_Unit_Provider" declared at libadalang-project_provider.ads:57

   compilation of gnatdoc-projects.adb failed

gprbuild: *** compilation phase failed
make: *** [Makefile:4: all] Error 4
==> ERROR: A failure occurred in build().
    Aborting...
error: failed to build 'gnatdoc-24.0w-1':

charlie5 commented on 2022-11-25 09:48 (UTC)

Thanks @tfl5034

The patch works nicely. Much appreciated.

tfl5034 commented on 2022-11-24 06:39 (UTC)

I fixed my issue on my machine with the following patch which forces gpr2 to be built/installed as a static library instead of a relocatable library:

diff --git a/PKGBUILD b/PKGBUILD
index 5c8ec57..e39cf6e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@

 pkgname=gnatdoc
 pkgver=23.0.0
-pkgrel=3
+pkgrel=4

 pkgdesc='GNAT documentation generation tool.'
 url='https://github.com/AdaCore/gnatdoc'
@@ -21,14 +21,14 @@ build()
     cd "$srcdir/$pkgname-$pkgver"

      gprbuild -j0 -p -P gnat/libgnatdoc.gpr -XSUPERPROJECT=
-     gprbuild -j0 -p -P gnat/gnatdoc.gpr -XGPR_UNIT_PROVIDER_LIBRARY_TYPE=static -XSUPERPROJECT= -XGPR_UNIT_PROVIDER_BUILD=release
+     gprbuild -j0 -p -P gnat/gnatdoc.gpr -XGPR_UNIT_PROVIDER_LIBRARY_TYPE=static -XGPR2_LIBRARY_TYPE=static -XSUPERPROJECT= -XGPR_UNIT_PROVIDER_BUILD=release
 }

 package()
 {
     cd "$srcdir/$pkgname-$pkgver"

-    gprinstall gnat/gnatdoc.gpr    --prefix="$pkgdir/usr" --create-missing-dirs
+    gprinstall gnat/gnatdoc.gpr    --prefix="$pkgdir/usr" --create-missing-dirs -XGPR_UNIT_PROVIDER_LIBRARY_TYPE=static -XGPR2_LIBRARY_TYPE=static
     gprinstall gnat/libgnatdoc.gpr --prefix="$pkgdir/usr" --create-missing-dirs

charlie5 commented on 2022-11-21 05:23 (UTC) (edited on 2022-11-21 05:24 (UTC) by charlie5)

I had a similar error when building 'gnatdoc'.

Setup

[mkdir] exec directory for project GNATdoc

gpr_unit_provider.gpr:16:17: shared library project "gpr_unit_provider" cannot import static library project "gpr2"

gpr_unit_provider.gpr:16:17: shared library project "gpr_unit_provider" cannot import static library project "libadalang"

gpr_unit_provider.gpr:16:17: shared library project "gpr_unit_provider" cannot import static library project "gnatcoll_gmp" ...

Setting 'ENABLE_SHARED=no' in gpr-unit-provider 'PKGBUILD' appears to have fixed the problem.

tfl5034 commented on 2022-11-20 09:33 (UTC)

You're right. Usually I can figure out when it's a problem solved by rebuilding dependencies, but this didn't match the pattern, so I didn't even try!

charlie5 commented on 2022-11-19 11:33 (UTC)

Hi @tfl5034, I encountered the same problem earlier today. I'm not certain of the cause but possibly some of the lower level dependencies need to be rebuilt.

When I ran $ sudo pacman -Rsc gcc-ada and then cleared the /var/cache/pacman/pkg folder to force a rebuild of all the ada packages, the problem no longer occurred.

Not very elegant, I admit, but a workaround for the moment.

Also, if you are using pacaur or pikaur, you may need to clear their caches also (both in '~/.cache').

In the meantime, I'll try investigate the cause.

Regards.

tfl5034 commented on 2022-11-19 08:48 (UTC)

Hi @charlie5, I am working on installing the dependencies for ada_language_server so I can test my new PKGBUILD and I see the following errors when building gnatdoc:

gprbuild -j0 -p -P gnat/gnatdoc.gpr -XGPR_UNIT_PROVIDER_LIBRARY_TYPE=static -XSUPERPROJECT= -XGPR_UNIT_PROVIDER_BUILD=debug
Setup
   [mkdir]        exec directory for project GNATdoc
gpr2.gpr:13:17: shared library project "gpr2" cannot import static library project "gnatcoll_iconv"
gpr2.gpr:13:17: shared library project "gpr2" cannot import static library project "gnatcoll"
gpr2.gpr:13:17: shared library project "gpr2" cannot import static library project "xmlada_dom"
gpr2.gpr:13:17: shared library project "gpr2" cannot import static library project "xmlada_input"
gpr2.gpr:13:17: shared library project "gpr2" cannot import static library project "xmlada_unicode"
gpr2.gpr:13:17: shared library project "gpr2" cannot import static library project "xmlada_sax"
gpr2.gpr:13:17: shared library project "gpr2" cannot import static library project "xmlada_schema"
gpr2.gpr:13:17: shared library project "gpr2" cannot import static library project "gpr"
gpr2.gpr:13:17: shared library project "gpr2" cannot import static library project "gnatcoll_gmp"
gprbuild: "gnat/gnatdoc.gpr" processing failed

I believe all these dependencies are installed as both static and relocatable libraries, but perhaps the build flags should be adjusted to use the relocatable versions.