Package Details: libadalang 1:2022-2

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: custom, GPL3
Submitter: charlie5
Maintainer: charlie5 (xiretza)
Last Packager: charlie5
Votes: 4
Popularity: 0.000000
First Submitted: 2017-06-05 06:00 (UTC)
Last Updated: 2022-05-14 11:51 (UTC)

Pinned Comments

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

Herve_R commented on 2022-02-20 22:39 (UTC)

Sorry for the noise. I've rebuilt all dependencies and now it builds. Don't know the root cause but it works :->

Herve_R commented on 2022-02-20 17:32 (UTC)

With 12Gb of RAM (mostly unused), I'm hit by:

Build Libraries
   [gprlib]       adalang.lexch
   [bind SAL]     adalang

raised STORAGE_ERROR : stack overflow or erroneous memory access
gprlib: invocation of /usr/bin/gnatbind failed
gprbuild: could not build library for project libadalang

Is there something I can do to build this pakage?

Thanks

charlie5 commented on 2021-07-16 12:12 (UTC)

hi @tfl5034, 'langkit' has been separated out and is now a dependency.

Apologies for the delay.

charlie5 commented on 2021-07-13 17:13 (UTC)

hi @tfl5034, I've done this and just have to check the build in a clean chroot. Mods should be pushed tomorrow.

tfl5034 commented on 2021-07-13 02:26 (UTC)

This package conflicts with langkit. I am guessing that this PKGBUILD installs the langkit library. Can that be removed and can langkit be added as a dependency of this package?

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).

xiretza commented on 2020-06-27 11:24 (UTC)

@tfl5034 - yeah, that was my conclusion as well, see also my rejected PR here (which also sets a few more -X... flags): https://github.com/AdaCore/ada_language_server/pull/470

tfl5034 commented on 2020-06-27 11:21 (UTC) (edited on 2020-06-27 11:21 (UTC) by tfl5034)

Thanks for the help! Figured the issue out: I had to explicitly set the make variable LIBRARY_TYPE=relocatable to build and then I had to patch the Makefile to add a variable to a gprbuild command. https://aur.archlinux.org/packages/ada_language_server/

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.

gbabin commented on 2019-06-22 23:32 (UTC)

Please add gnatcoll-gmp as dependency.

Also during the "Pretty-printing sources for libadalang" step, I get two "Pretty-printing failed" errors with "[Errno 2] No such file or directory" message.

charlie5 commented on 2019-04-17 05:04 (UTC) (edited on 2019-04-17 05:06 (UTC) by charlie5)

Hi serh,

'python2-funcy' is available in the Archlinux archives, if you would like to manually install it.

<https://archive.archlinux.org/packages/p/python2-funcy>

pmderodat commented on 2019-04-16 14:08 (UTC)

Hello serh,

Thank you for reporting this. Unfortunately, Libadalang/Langkit still rely on Python2, so there is no obvious action to update the package. We plan to migrate to Python3 before Python2’s End Of Life, but that won’t be immediate.

We’ll probably temporarily patch Langkit to inline its very few dependencies on funcy, so that means you’ll have at some point build libadalang-git…

serh commented on 2019-04-10 10:48 (UTC)

python2-funcy has been replaced by python-funcy, could you please update the package?

charlie5 commented on 2018-09-30 09:07 (UTC)

@Tav @troisqua

I think the problem has now been fixed.

Clang has trouble compiling the Quex-generated lexer, so we had to make sure GPRbuild chooses GCC.

Apologies for the delay in sorting this out.

Tav commented on 2018-09-30 01:19 (UTC) (edited on 2018-09-30 01:44 (UTC) by Tav)

While building I received this message:

                   Build Libraries
           [gprlib]       langkit_support.lexch
           [bind SAL]     langkit_support
           [Ada]          b__langkit_support.adb
           [link library] liblangkit_support.so
           [gprlib]       adalang.lexch
           [bind SAL]     adalang
           [Ada]          b__adalang.adb
           [link library] libadalang.so
        /usr/bin/ld: /home/joebs/.cache
        /yay/libadalang/src/libadalang-gpl-2018-src
        /build/obj/libadalang.relocatable/quex_lexer.o: 
        relocation R_X86_64_PC32 against symbol
        `quex_LexemeNullObject' can not be used 
         when making a shared object; recompile with -fPIC
        /usr/bin/ld: final link failed: bad value
        collect2: error: ld returned 1 exit status
        gprlib: /usr/bin/gcc execution error
        gprbuild: could not build library for project libadalang
        Build failed: error while running gprbuild -p 
        -j2 -P/home/joebs        /.cache/yay/libadalang/src/
        libadalang-gpl-2018-src/build/
        lib/gnat
        /libadalang.gpr -XBUILD_MODE=dev 
        -XLIBRARY_TYPE=relocatable  
        -XXMLADA_BUILD=relocatable   -XLIBADALANG_WARNINGS=true:
         Command '['gprbuild', '-p', '-j2', 
         '-P/home/joebs/.cache/yay/libadalang/src/
          libadalang-gpl-2018-src/
          build/lib/gnat/libadalang.gpr',
          '-XBUILD_MODE=dev', 
         '-XLIBRARY_TYPE=relocatable', 
         '-XXMLADA_BUILD=relocatable',     '-XLIBADALANG_WARNINGS=true']' 
          returned non-zero exit status 4
            ==> ERROR: A failure occurred in build().
            Aborting...
           Error making: libadalang

troisqua commented on 2018-09-16 12:47 (UTC) (edited on 2018-09-16 19:43 (UTC) by troisqua)

Hello, When compiling the package I get the following error

Build Libraries
   [gprlib]       langkit_support.lexch
   [bind SAL]     langkit_support
   [Ada]          b__langkit_support.adb
   [link library] liblangkit_support.so
   [gprlib]       adalang.lexch
   [bind SAL]     adalang
   [Ada]          b__adalang.adb
   [link library] libadalang.so
/usr/bin/ld: /tmp/yaourt-tmp-cyril/aur-libadalang/src/libadalang-gpl-2018-src/build/obj/libadalang.relocatable/quex_lexer.o: 
relocation R_X86_64_PC32 against symbole `quex_LexemeNullObject' can not be used when making un objet partagé; recompilé avec -fPIC
/usr/bin/ld : échec de l'édition de liens finale : bad value
collect2: error: ld a retourné le statut de sortie 1
gprlib: /usr/bin/gcc execution error
gprbuild: could not build library for project libadalang
Build failed: error while running gprbuild -p -j8 -P/tmp/yaourt-tmp-cyril/aur-libadalang/src/libadalang-gpl-2018-src/build/lib/gnat/libadalang.gpr -XBUILD_MODE=dev -XLIBRARY_TYPE=relocatable -XXMLADA_BUILD=relocatable -XLIBADALANG_WARNINGS=true:
 Command '['gprbuild', '-p', '-j8', '-P/tmp/yaourt-tmp-cyril/aur-libadalang/src/libadalang-gpl-2018-src/build/lib/gnat/libadalang.gpr', '-XBUILD_MODE=dev', '-XLIBRARY_TYPE=relocatable', '-XXMLADA_BUILD=relocatable', '-XLIBADALANG_WARNINGS=true']' returned non-zero exit status 4
==> ERREUR : Une erreur s’est produite dans build().
    Abandon…

pmderodat commented on 2018-09-13 06:25 (UTC)

Sure, and thank you for reporting the issue! :-)

gbabin commented on 2018-09-12 18:16 (UTC)

@charlie5 @pmderodat Thank you, it works now.

charlie5 commented on 2018-09-11 17:48 (UTC)

@gbabin Hi again,

I've re-submitted all of the Ada related packages with (hopefully) fixes and the mods you suggested in your 'gprbuild' package comment.

Please let me know if you have the same (or any other) problem.

pmderodat commented on 2018-09-11 14:40 (UTC)

Hello gbabin,

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

This log make me suspect that you need to update your libgpr package (which now builds in shared and static-pic mode). Sorry for the inconvenience, we probably need to put version numbers in package dependencies. Thank you for reporting this!

gbabin commented on 2018-09-09 09:59 (UTC)

I have build and installed gnatcoll-core, gnatcoll-iconv and gprbuild in version 2018-1, but I have this error:

==> Starting build()...
Generating source for libadalang...
Compiling the grammar...
Compiling properties...
File "/home/gbabin/.cache/pacaur/libadalang/src/libadalang-gpl-2018-src/ada/language/ast.py", line 3085, in TypeAccessDef
  line 3088, in TypeAccessDef.type_expr
    Warning: Specified type is TypeExpr, but it could be more specific: SubtypeIndication
Prepare code emission...
File setup...
Generating sources... 
Compiling the quex lexer specification
Generation complete!
Building the generated source code
libadalang.gpr:8:17: shared library project "libadalang" cannot import static library project "gpr"
gnatcoll.gpr:10:17: shared library project "gnatcoll" cannot import static library project "gpr"
gnatcoll_iconv.gpr:11:17: shared library project "gnatcoll_iconv" cannot import static library project "gpr"
langkit_support.gpr:4:17: shared library project "langkit_support" cannot import static library project "gpr"
gprbuild: "/home/gbabin/.cache/pacaur/libadalang/src/libadalang-gpl-2018-src/build/lib/gnat/libadalang.gpr" processing failed
Build failed: error while running gprbuild -p -j4 -P/home/gbabin/.cache/pacaur/libadalang/src/libadalang-gpl-2018-src/build/lib/gnat/libadalang.gpr -XBUILD_MODE=dev -XLIBRARY_TYPE=relocatable -XXMLADA_BUILD=relocatable -XLIBADALANG_WARNINGS=true:
    Command '['gprbuild', '-p', '-j4', '-P/home/gbabin/.cache/pacaur/libadalang/src/libadalang-gpl-2018-src/build/lib/gnat/libadalang.gpr', '-XBUILD_MODE=dev', '-XLIBRARY_TYPE=relocatable', '-XXMLADA_BUILD=relocatable', '-XLIBADALANG_WARNINGS=true']' returned non-zero exit status 4
==> ERROR: A failure occurred in build().

pmderodat commented on 2018-07-12 06:13 (UTC)

Hello mindbound,

I believe your report should go to https://aur.archlinux.org/packages/libadalang-git ;-)

Good catch: gnatcoll-gmp-git is indeed missing: I’ll add it. I’ll also edit my instructions below to remove the typo. Thank you!

mindbound commented on 2018-07-10 15:34 (UTC) (edited on 2018-07-10 16:24 (UTC) by mindbound)

Instead of lankgit-git there should be langkit-git.

Also, building on 4.17.4-1 x86_64 currently fails with

Generating source for libadalang...
Compiling the grammar...
Compiling properties...
Prepare code emission...
File setup...
Generating sources... 
Warning: Yapf not available, using autopep8 to pretty-print Python code
Compiling the quex lexer specification
Pretty-printing sources for Libadalang...
Pretty-printing failed: error while running gnatpp -P/tmp/yaourt-tmp-mindbound/aur-libadalang-git/src/libadalang/build/lib/gnat/libadalang.gpr -rnb --insert-blank-lines --syntax-only -XBUILD_MODE=prod -XLIBRARY_TYPE=relocatable -XXMLADA_BUILD=relocatable /tmp/yaourt-tmp-mindbound/aur-libadalang-git/src/libadalang/build/include/libadalang/libadalang-analysis-implementation-c.adb /tmp/yaourt-tmp-mindbound/aur-libadalang-git/src/libadalang/build/include/libadalang/libadalang-analysis-implementation-c.ads /tmp/yaourt-tmp-mindbound/aur-libadalang-git/src/libadalang/build/include/libadalang/libadalang-debug.adb /tmp/yaourt-tmp-mindbound/aur-libadalang-git/src/libadalang/build/include/libadalang/libadalang-debug.ads /tmp/yaourt-tmp-mindbound/aur-libadalang-git/src/libadalang/build/include/libadalang/libadalang-lexer.adb /tmp/yaourt-tmp-mindbound/aur-libadalang-git/src/libadalang/build/include/libadalang/libadalang-lexer.ads /tmp/yaourt-tmp-mindbound/aur-libadalang-git/src/libadalang/build/include/libadalang/libadalang-analysis-parsers.adb /tmp/yaourt-tmp-mindbound/aur-libadalang-git/src/libadalang/build/include/libadalang/libadalang-analysis-parsers.ads /tmp/yaourt-tmp-mindbound/aur-libadalang-git/src/libadalang/build/include/libadalang/libadalang-unparsing-implementation.adb /tmp/yaourt-tmp-mindbound/aur-libadalang-git/src/libadalang/build/include/libadalang/libadalang-unparsing-implementation.ads /tmp/yaourt-tmp-mindbound/aur-libadalang-git/src/libadalang/build/include/libadalang/libadalang-unparsing.adb /tmp/yaourt-tmp-mindbound/aur-libadalang-git/src/libadalang/build/include/libadalang/libadalang-unparsing.ads /tmp/yaourt-tmp-mindbound/aur-libadalang-git/src/libadalang/build/include/libadalang/libadalang-rewriting.adb /tmp/yaourt-tmp-mindbound/aur-libadalang-git/src/libadalang/build/include/libadalang/libadalang-rewriting.ads /tmp/yaourt-tmp-mindbound/aur-libadalang-git/src/libadalang/build/include/libadalang/libadalang-iterators.adb /tmp/yaourt-tmp-mindbound/aur-libadalang-git/src/libadalang/build/include/libadalang/libadalang-iterators.ads /tmp/yaourt-tmp-mindbound/aur-libadalang-git/src/libadalang/build/include/libadalang/libadalang-introspection.adb /tmp/yaourt-tmp-mindbound/aur-libadalang-git/src/libadalang/build/include/libadalang/libadalang-introspection.ads /tmp/yaourt-tmp-mindbound/aur-libadalang-git/src/libadalang/build/include/libadalang/libadalang-analysis-implementation.adb /tmp/yaourt-tmp-mindbound/aur-libadalang-git/src/libadalang/build/include/libadalang/libadalang-analysis-implementation.ads /tmp/yaourt-tmp-mindbound/aur-libadalang-git/src/libadalang/build/include/libadalang/libadalang-analysis.adb /tmp/yaourt-tmp-mindbound/aur-libadalang-git/src/libadalang/build/include/libadalang/libadalang-analysis.ads /tmp/yaourt-tmp-mindbound/aur-libadalang-git/src/libadalang/build/include/libadalang/libadalang-init.adb /tmp/yaourt-tmp-mindbound/aur-libadalang-git/src/libadalang/build/include/libadalang/libadalang-init.ads /tmp/yaourt-tmp-mindbound/aur-libadalang-git/src/libadalang/build/include/libadalang/libadalang.ads:
    [Errno 2] No such file or directory
Pretty-printing failed: error while running gnatpp -P/tmp/yaourt-tmp-mindbound/aur-libadalang-git/src/libadalang/build/src/mains.gpr -rnb --insert-blank-lines --syntax-only -XBUILD_MODE=prod -XLIBRARY_TYPE=relocatable -XXMLADA_BUILD=relocatable /tmp/yaourt-tmp-mindbound/aur-libadalang-git/src/libadalang/build/src/parse.adb:
    [Errno 2] No such file or directory
Generation complete!
Building the generated source code
libadalang.gpr:5:06: unknown project file: "gnatcoll_gmp"
gprbuild: "/tmp/yaourt-tmp-mindbound/aur-libadalang-git/src/libadalang/build/lib/gnat/libadalang.gpr" processing failed
Build failed: error while running gprbuild -p -j2 -P/tmp/yaourt-tmp-mindbound/aur-libadalang-git/src/libadalang/build/lib/gnat/libadalang.gpr -XBUILD_MODE=prod -XLIBRARY_TYPE=relocatable -XXMLADA_BUILD=relocatable -XLIBADALANG_WARNINGS=true -R --config=/tmp/yaourt-tmp-mindbound/aur-libadalang-git/src/libadalang/config.cgpr:
    Command '['gprbuild', '-p', '-j2', '-P/tmp/yaourt-tmp-mindbound/aur-libadalang-git/src/libadalang/build/lib/gnat/libadalang.gpr', '-XBUILD_MODE=prod', '-XLIBRARY_TYPE=relocatable', '-XXMLADA_BUILD=relocatable', '-XLIBADALANG_WARNINGS=true', '-R', '--config=/tmp/yaourt-tmp-mindbound/aur-libadalang-git/src/libadalang/config.cgpr']' returned non-zero exit status 4

This is solved by including gnatcoll-gmp-git among the dependencies (or building it manually before).

pmderodat commented on 2018-06-27 17:38 (UTC) (edited on 2018-07-15 10:39 (UTC) by pmderodat)

Yes, this is indeed what you should do.

By the way, as a workaround you may be interesting in using the *-git packages I maintain myself. That implies recompiling several packages manually (I’m not experienced in packaging, so I’m not sure if I got the dependencies right, there), but this should work:

# Assuming you are using yaourt to install packages for the AUR
$ yaourt -S xmlada-git
$ yaourt -S libgpr-git
$ yaourt -S gprbuild-git
$ yaourt -S gnatcoll-core-git
$ yaourt -S gnatcoll-iconv-git
$ yaourt -S gnatcoll-gmp-git
$ yaourt -S langkit-git
$ yaourt -S libadalang-git

[EDIT: fixed a typo, added gnatcoll-gmp-git]

GaryScottMartin commented on 2018-06-25 23:20 (UTC)

Thanks, just to make sure, should I be looking for the "Last Updated:" date above to change from 2017-07-06 to a current date?

pmderodat commented on 2018-06-25 11:40 (UTC)

Hello,

These compilation errors:

langkit_support-token_data_handlers.ads:29:04: warning: use clause for package "Text_Vectors" has no effect langkit_support-lexical_env.adb:171:07: warning: use clause for package "Referenced_Envs_Arrays" has no effect

Will go away once this package is updated… which should happen quite soon. :-)

GaryScottMartin commented on 2018-06-24 09:06 (UTC)

I get a build failure during 'makepkg -si' as follows:

compilation of langkit_support-token_data_handlers.adb failed

gprbuild: *** compilation phase failed Build failed: error while running gprbuild -m -p -j4 -P/home/gary/libadalang/src/libadalang-gps-src/build/lib/gnat/libadalang.gpr -XBUILD_MODE=dev -XLIBRARY_TYPE=relocatable -XXMLADA_BUILD=relocatable -XLIBADALANG_WARNINGS=true -cargs: Command '[u'gprbuild', u'-m', u'-p', u'-j4', u'-P/home/gary/libadalang/src/libadalang-gps-src/build/lib/gnat/libadalang.gpr', u'-XBUILD_MODE=dev', u'-XLIBRARY_TYPE=relocatable', u'-XXMLADA_BUILD=relocatable', u'-XLIBADALANG_WARNINGS=true', u'-cargs']' returned non-zero exit status 4 ==> ERROR: A failure occurred in build(). Aborting...

fintatarta commented on 2017-12-24 23:20 (UTC)

The compilation fails because it does not find gnatcoll-projects.ads. It seems like an option (--enable-projects) missing in the PKGBUILD of gnatcoll. See my comment in the gnatcoll page.

pmderodat commented on 2017-09-22 07:30 (UTC)

You are welcome! Thank you for confirming. :-)

tfl5034 commented on 2017-09-21 21:00 (UTC)

pmderodat Ah, that fixed it. Thanks! I'm still new to Ada.

pmderodat commented on 2017-09-21 07:37 (UTC)

Hello tfl5034, Could you please try the following instead? $ gnatmake -P/usr/share/gpr/libadalang.gpr \ -XLIBRARY_TYPE=relocatable \ -XXMLADA_BUILD=relocatable \ test.adb Unfortunately, Libadalang, GNATcoll and XML/Ada don’t agree on a default for static/shared libraries… By the way, the use of project files with gnatmake (`gnatmake -P`) is deprecated, so you may want to switch to a project file for your program + using gprbuild for a real project. :-)

tfl5034 commented on 2017-09-21 02:27 (UTC)

I successfully installed libadalang, but when trying to compile an ada source file using the following command: $ gnatmake -P/usr/share/gpr/libadalang.gpr test.adb I get the following errors (I'm not sure if user error or not): libadalang.gpr:13:17: shared library project "libadalang" cannot import static library project "gnatcoll_iconv" libadalang.gpr:13:17: shared library project "libadalang" cannot import static library project "gnatcoll" libadalang.gpr:13:17: shared library project "libadalang" cannot import static library project "xmlada_dom" libadalang.gpr:13:17: shared library project "libadalang" cannot import static library project "xmlada_input" libadalang.gpr:13:17: shared library project "libadalang" cannot import static library project "xmlada_unicode" libadalang.gpr:13:17: shared library project "libadalang" cannot import static library project "xmlada_sax" libadalang.gpr:13:17: shared library project "libadalang" cannot import static library project "xmlada_schema" libadalang.gpr:13:17: shared library project "libadalang" cannot import static library project "gpr" langkit_support.gpr:11:17: shared library project "langkit_support" cannot import static library project "gnatcoll" langkit_support.gpr:11:17: shared library project "langkit_support" cannot import static library project "xmlada_dom" langkit_support.gpr:11:17: shared library project "langkit_support" cannot import static library project "xmlada_input" langkit_support.gpr:11:17: shared library project "langkit_support" cannot import static library project "xmlada_unicode" langkit_support.gpr:11:17: shared library project "langkit_support" cannot import static library project "xmlada_sax" langkit_support.gpr:11:17: shared library project "langkit_support" cannot import static library project "xmlada_schema" langkit_support.gpr:11:17: shared library project "langkit_support" cannot import static library project "gpr" gprbuild: "/usr/share/gpr/libadalang.gpr" processing failed libadalang.gpr:13:17: shared library project "libadalang" cannot import static library project "gnatcoll_iconv" libadalang.gpr:13:17: shared library project "libadalang" cannot import static library project "gpr" libadalang.gpr:13:17: shared library project "libadalang" cannot import static library project "xmlada_schema" libadalang.gpr:13:17: shared library project "libadalang" cannot import static library project "xmlada_input" libadalang.gpr:13:17: shared library project "libadalang" cannot import static library project "xmlada_unicode" libadalang.gpr:13:17: shared library project "libadalang" cannot import static library project "xmlada_sax" libadalang.gpr:13:17: shared library project "libadalang" cannot import static library project "xmlada_dom" libadalang.gpr:13:17: shared library project "libadalang" cannot import static library project "gnatcoll" langkit_support.gpr:11:17: shared library project "langkit_support" cannot import static library project "gpr" langkit_support.gpr:11:17: shared library project "langkit_support" cannot import static library project "xmlada_schema" langkit_support.gpr:11:17: shared library project "langkit_support" cannot import static library project "xmlada_input" langkit_support.gpr:11:17: shared library project "langkit_support" cannot import static library project "xmlada_unicode" langkit_support.gpr:11:17: shared library project "langkit_support" cannot import static library project "xmlada_sax" langkit_support.gpr:11:17: shared library project "langkit_support" cannot import static library project "xmlada_dom" langkit_support.gpr:11:17: shared library project "langkit_support" cannot import static library project "gnatcoll" gnatmake: "/usr/share/gpr/libadalang.gpr" processing failed

charlie5 commented on 2017-06-06 18:57 (UTC)

Hi Aphirst, Thanks for the report. I've removed the explicit setting of LIBRARY_TYPE from the gnatcoll build. I'll test it some more but I think it may fix the problem, as pmderodat suggests. You will have to rebuild gnatcoll, of course.

pmderodat commented on 2017-06-06 11:23 (UTC)

> gnatcoll.gpr:7:04: value "relocatable" is illegal for typed string "build" I have the feeling that your gnatcoll was not built in shared library mode. FYI, charlie5 and I are working on gnatcoll’s package, so it could be worth waiting for us to finish work on that first. :-)

aphirst commented on 2017-06-06 09:30 (UTC)

I'm getting the following error when trying to build. I'll investigate it myself later once I have some time, but I'll post it nonetheless in case it turns out to be something not caused by my own setup. library directory "/tmp/yaourt-tmp-adam/aur-libadalang/src/libadalang/build/lib/gnat/../libadalang.relocatable" created for project libadalang gnatcoll.gpr:7:04: value "relocatable" is illegal for typed string "build" gnatcoll_iconv.gpr:8:04: value "relocatable" is illegal for typed string "build" gprbuild: "/tmp/yaourt-tmp-adam/aur-libadalang/src/libadalang/build/lib/gnat/libadalang.gpr" processing failed Build failed: error while running gprbuild -m -p -j4 -P/tmp/yaourt-tmp-adam/aur-libadalang/src/libadalang/build/lib/gnat/libadalang.gpr -XBUILD_MODE=dev -XLIBRARY_TYPE=relocatable -XXMLADA_BUILD=relocatable -cargs: Command '['gprbuild', '-m', '-p', '-j4', '-P/tmp/yaourt-tmp-adam/aur-libadalang/src/libadalang/build/lib/gnat/libadalang.gpr', '-XBUILD_MODE=dev', '-XLIBRARY_TYPE=relocatable', '-XXMLADA_BUILD=relocatable', '-cargs']' returned non-zero exit status 4 ==> ERROR: A failure occurred in build(). Aborting... ==> ERROR: Makepkg was unable to build libadalang.