Package Details: libadalang 2:24.0w-1

Git Clone URL: https://aur.archlinux.org/libadalang.git (read-only, click to copy)
Package Base: libadalang
Description: A high performance semantic engine for the Ada programming language.
Upstream URL: https://github.com/AdaCore/libadalang
Licenses: Apache
Submitter: charlie5
Maintainer: charlie5
Last Packager: charlie5
Votes: 5
Popularity: 0.83
First Submitted: 2017-06-05 06:00 (UTC)
Last Updated: 2023-06-16 09:41 (UTC)

Pinned Comments

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

This package is available in the Arch Ada Repository.

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

charlie5 commented on 2020-11-16 08:53 (UTC) (edited on 2020-11-16 08:55 (UTC) by charlie5)

If build hangs, please ensure you have more than 4Gig of RAM+Swap (8+ Gig is recommended).

Latest Comments

« First ‹ Previous 1 2 3 4 5 Next › Last »

pmderodat commented on 2020-06-16 09:47 (UTC)

Hello,

There’s a known bug somewhere between GCC and GPRbuild: one one hand some Linux distros (ArchLinux and Ubuntu at least) configure GCC to automatically pass -pie when linking, and on the other hand, for GPRbuild passes the -r option to do a partial link when building standalone libraries in static mode (and Libadalang is a a standalone library).

Since -r and -pie are mutually incompatible, building Libadalang in static mode does not work on such distros. This is what I have documented in the libadalang-git package, and very likely why this package does not build LAL in static mode.

Now, if I understand correctly, ArchLinux packages should contain dynamically linked programs (to save disk space, avoid rebuilds on dependency update, …). So shouldn’t ada_language_server be built in dynamic mode, working around this static link issue?

If that helps, I’m also available on IRC (pmderodat@freenode, on #ada) :-)

xiretza commented on 2020-06-14 21:41 (UTC)

@tfl5034: ah, I get it now! That's a weird one. Most of the Ada packages are built in three versions - static, static-pic and relocatable. Picking out xmlada_dom as a random example, the xmlada PKGBUILD builds both a usr/lib/xmlada/xmlada_dom.static/libxmlada_dom.a (static) as well as a usr/lib/xmlada/xmlada_dom.relocatable/libxmlada_dom.so (relocatable), so I'm really not sure what it's complaining about there.

One thing I noticed in that log is that it's building with -XBUILD_MODE=dev, might want to use make BUILD_MODE=prod.

I'd gladly assist with bug hunting (I have some experience now after updating all the AdaCore packages to 2020...), just poke me on IRC (lambda@freenode) if you want.

tfl5034 commented on 2020-06-14 20:43 (UTC)

@xiretza I wanted to clarify that this is not necessarily an issue building your libadalang package. It builds and installs fine. What I want to do is leverage this package to build ada_language_server version 21.0.11. I am creating a PKGBUILD for ada_language_server and it fails on the build step when executing make. The error is as follows:

==> Extracting sources...
  -> Extracting 21.0.11.tar.gz with bsdtar
==> Starting build()...
gprbuild -j0 -P gnat/spawn_tests.gpr -p -XBUILD_MODE=dev -XOS=unix
Setup
   [mkdir]        object directory for project Spawn
   [mkdir]        object directory for project Spawn_Tests
Compile
   [Ada]          spawn_test.adb
   [c]            posix_const.c
   [Ada]          spawn.ads
   [Ada]          spawn-processes__posix.adb
   [Ada]          spawn-processes-monitor_loop.adb
   [Ada]          spawn-string_vectors.ads
   [Ada]          spawn-processes-monitor__posix.adb
   [Ada]          spawn-posix.ads
   [Ada]          spawn-environments.adb
   [Ada]          spawn-internal__posix.adb
   [Ada]          spawn-environments-internal__posix.adb
Bind
   [gprbind]      spawn_test.bexch
   [Ada]          spawn_test.ali
Link
   [archive]      libspawn_tests.a
   [index]        libspawn_tests.a
   [link]         spawn_test.adb
gprbuild -j0 -P gnat/tester.gpr -p -XBUILD_MODE=dev -XOS=unix
Setup
   [mkdir]        object directory for project LSP
   [mkdir]        object directory for project LSP_Client
   [mkdir]        object directory for project Tester
Compile
   [Ada]          tester-run.adb
   [Ada]          tester.ads
   [Ada]          tester-macros.adb
   [Ada]          tester-tests.adb
   [Ada]          uris.adb
   [Ada]          lsp.ads
   [Ada]          lsp-raw_clients.adb
Bind
   [gprbind]      tester-run.bexch
   [Ada]          tester-run.ali
Link
   [archive]      libtester.a
   [index]        libtester.a
   [link]         tester-run.adb
gprbuild -j0 -d -ws -c -u -P gnat/lsp_server.gpr -p -XBUILD_MODE=dev -XOS=unix s-memory.adb
Setup
   [mkdir]        object directory for project LSP_Server
libadalang.gpr:14:17: shared library project "libadalang" cannot import static library project "gnatcoll_gmp"
libadalang.gpr:14:17: shared library project "libadalang" cannot import static library project "gnatcoll"
libadalang.gpr:14:17: shared library project "libadalang" cannot import static library project "xmlada_dom"
libadalang.gpr:14:17: shared library project "libadalang" cannot import static library project "xmlada_input"
libadalang.gpr:14:17: shared library project "libadalang" cannot import static library project "xmlada_unicode"
libadalang.gpr:14:17: shared library project "libadalang" cannot import static library project "xmlada_sax"
libadalang.gpr:14:17: shared library project "libadalang" cannot import static library project "xmlada_schema"
libadalang.gpr:14:17: shared library project "libadalang" cannot import static library project "gpr"
libadalang.gpr:14:17: shared library project "libadalang" cannot import static library project "gnatcoll_iconv"
langkit_support.gpr:12:17: shared library project "langkit_support" cannot import static library project "gnatcoll"
langkit_support.gpr:12:17: shared library project "langkit_support" cannot import static library project "xmlada_dom"
langkit_support.gpr:12:17: shared library project "langkit_support" cannot import static library project "xmlada_input"
langkit_support.gpr:12:17: shared library project "langkit_support" cannot import static library project "xmlada_unicode"
langkit_support.gpr:12:17: shared library project "langkit_support" cannot import static library project "xmlada_sax"
langkit_support.gpr:12:17: shared library project "langkit_support" cannot import static library project "xmlada_schema"
langkit_support.gpr:12:17: shared library project "langkit_support" cannot import static library project "gpr"
langkit_support.gpr:12:17: shared library project "langkit_support" cannot import static library project "gnatcoll_iconv"
gprbuild: "gnat/lsp_server.gpr" processing failed
make: *** [Makefile:72: all] Error 4
==> ERROR: A failure occurred in build().
    Aborting...
==> ERROR: Build failed, check /home/tim/.cache/clean-chroot-manager/tim/build

xiretza commented on 2020-06-14 12:16 (UTC)

@tfl5034: please post the error you get when building the actual package, without messing around in the sources yourself. FWIW it builds fine in a clean chroot here.

tfl5034 commented on 2020-06-14 11:27 (UTC)

I'm getting an error when using this package to compile ada_language_server. The error is that libadalang is compiled as a shared project while seemingly every other dependency of ada_language_server is static. I tried adding --library-type static to all the ada/manage.py commands, but got the following linking error. Got any idea on a fix?

/usr/bin/ld: -r and -pie may not be used together
collect2: error: ld returned 1 exit status
gprlib: call to linker driver /usr/bin/gcc failed
gprbuild: raised CONSTRAINT_ERROR : gprbuild-post_compile.adb:1113 range check failed
0x5559284879cd
0x55592849f0fa
0x5559284a5e72
0x5559284aedc2
0x5559284aff5d
0x55592840a284
0x5559283f8319
[/usr/lib/libc.so.6]
0x7fb71dc2e000
0x5559283f838c
0xfffffffffffffffe

Build failed: error while running gprbuild -p -j16 -P/home/tim/.cache/yay/libadalang/src/libadalang-2020-20200429-19982-src/build/lib/gnat/libadalang.gpr -XBUILD_MODE=prod -XLIBRARY_TYPE=static -XGPR_BUILD=static -XXMLADA_BUILD=static -XLIBADALANG_WARNINGS=true -R -cargs -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -largs -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -gargs:
    Command '['gprbuild', '-p', '-j16', '-P/home/tim/.cache/yay/libadalang/src/libadalang-2020-20200429-19982-src/build/lib/gnat/libadalang.gpr', '-XBUILD_MODE=prod', '-XLIBRARY_TYPE=static', '-XGPR_BUILD=static', '-XXMLADA_BUILD=static', '-XLIBADALANG_WARNINGS=true', '-R', '-cargs', '-march=x86-64', '-mtune=generic', '-O2', '-pipe', '-fno-plt', '-largs', '-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now', '-gargs']' returned non-zero exit status 4
==> ERROR: A failure occurred in build().
    Aborting...

krouziciorel commented on 2020-06-11 08:47 (UTC)

Thank you very much for the quick answer, I would like to wait a few days to update the gnatcoll-iconv package, so far I can use eg VSCode with ADA extension.

xiretza commented on 2020-06-10 21:43 (UTC)

@krouziciorel: as the error says, files from gnatcoll-iconv and libadalang were compiled with different GNAT/compiler versions - you probably have to rebuild gnatcoll-iconv. You can either do that manually right now or wait a few days for a TU to accept the open merge request into gnatcoll-bindings, at which point I'll bump the pkgrel and your AUR helper will presumably update it anyway.

krouziciorel commented on 2020-06-10 21:38 (UTC) (edited on 2020-06-10 21:40 (UTC) by krouziciorel)

Dear Xiretza,

I tried to build actual libadalang package, all dependencies are installed properly. During building I got the following error:


...

[Ada] libadalang-introspection.adb

libadalang-implementation.ads:20:18: warning: license of withed unit

"GNATCOLL.GMP.Integers" may be inconsistent

Build Libraries

[gprlib] langkit_support.lexch

[gprlib] adalang.lexch

[bind SAL] langkit_support

error: "gnatcoll-iconv.adb" and "langkit_support-adalog-abstract_relation.adb" compiled with different GNAT versions

error: "gnatcoll-traces.adb" must be compiled

error: ("/usr/lib/gnatcoll.relocatable/gnatcoll-traces.ali" is obsolete and read-only)

error: "gnatcoll-refcount.adb" must be compiled

error: ("/usr/lib/gnatcoll.relocatable/gnatcoll-refcount.ali" is obsolete and read-only)

error: "gnatcoll-storage_pools-headers.adb" has been modified and must be recompiled

error: "gnatcoll-iconv.adb" must be compiled

error: ("/usr/lib/gnatcoll_iconv.relocatable/gnatcoll-iconv.ali" is obsolete and read-only)

gprlib: invocation of /usr/bin/gnatbind failed

gprbuild: raised CONSTRAINT_ERROR : gprbuild-post_compile.adb:1113 range check failed

0x560208f089cd

0x560208f200fa

0x560208f26e72

0x560208f2fdc2

0x560208f30f5d

0x560208e8b284

0x560208e79319

[/usr/lib/libc.so.6]

0x7f5ca7bb8000

0x560208e7938c

0xfffffffffffffffe

Build failed: error while running gprbuild -p -j2 -P/home/wanbli/tmp_aur/libadalang/src/libadalang-2020-20200429-19982-src/build/lib/gnat/libadalang.gpr -XBUILD_MODE=prod -XLIBRARY_TYPE=relocatable -XGPR_BUILD=relocatable -XXMLADA_BUILD=relocatable -XLIBADALANG_WARNINGS=true -R -cargs -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -largs -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -gargs:

Command '['gprbuild', '-p', '-j2', '-P/home/wanbli/tmp_aur/libadalang/src/libadalang-2020-20200429-19982-src/build/lib/gnat/libadalang.gpr', '-XBUILD_MODE=prod', '-XLIBRARY_TYPE=relocatable', '-XGPR_BUILD=relocatable', '-XXMLADA_BUILD=relocatable', '-XLIBADALANG_WARNINGS=true', '-R', '-cargs', '-march=x86-64', '-mtune=generic', '-O2', '-pipe', '-fno-plt', '-largs', '-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now', '-gargs']' returned non-zero exit status 4

==> Error: There is error in build().

Cancelling...

Error making: libadalang


Have you ever encountered this error? I am unable to build gnat-gps without this package. Installing huge binary community package from Adacore is OK, but i prefer using AUR together with other Ada packages.

xiretza commented on 2020-05-23 19:11 (UTC) (edited on 2020-05-23 19:15 (UTC) by xiretza)

Thanks to a great suggestion by a user on #ada@freenode, we now have a working libadalang 2020! Yes, it manually downloads 35 wheels from pypi as a replacement for largely non-existent makepends. If someone feels like creating python2- packages for all of those, be my guest.

xiretza commented on 2020-05-23 13:31 (UTC)

Unfortunately it seems like the 2020 releases of libadalang and langkit still rely entirely on python 2, which has been officially declared end-of-life at the beginning of this year after a 5 year grace period. With more and more python 2 packages being (rightfully) dropped from the repos, this becomes almost impossible to maintain. If you want to use this package, there are three options:

  • continue using the old version
  • build the new version yourself locally (using pip in a virtualenv to fetch all the needed python2 dependencies)
  • or hope that AdaCore gets their act together and releases a working version soon.