AdaCore / AdaCore/gnatformat

Undocumented dependency on GNAT 14?

Open
#5 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ada
Stars
21
Forks
2
PR merge metrics
No merged PRs in 30d

Description

Hello,
I ran into a compile error in a dependency while installing gnatformat with GNAT 13, while using GNAT 14 worked perfectly. If gnatformat does depend on GNAT 14 then I figured it would be worth documenting if other people run into this. I checked the manual, but didn't see anything relevant aside from "have GNATPro installed".

To reproduce

$ nix-shell --pure -p gnat13 gnat13Packages.gprbuild alire libiconv gmp gmp.dev pkg-config unzip curl cacert git

[nix-shell:~]$ gnat --version
GNAT 13.3.0
Copyright (C) 1996-2023, Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[nix-shell:~]$ alr toolchain --select
Welcome to the toolchain selection assistant

In this assistant you can set up the default toolchain to be used with any crate
that does not specify its own top-level dependency on a version of gnat or
gprbuild.

If you choose "None", Alire will use whatever version is found in the
environment.

ⓘ Currently configured: gnat_external=13.3.0

Please select the gnat version for use with this configuration
  1. gnat_native=14.2.1
  2. None
  3. gnat_external=13.3.0 [Detected at (...)dg75xs88004jbrbgfnx11y1w8w-gnat-wrapper-13.3.0/bin/gnat]
  4. gnat_arm_elf=14.2.1
  5. gnat_avr_elf=14.2.1
  6. gnat_riscv64_elf=14.2.1
  7. gnat_xtensa_esp32_elf=14.2.1
  8. gnat_arm_elf=14.1.3
  9. gnat_avr_elf=14.1.3
  0. gnat_native=14.1.3
  a. (See more choices...)
Enter your choice index (first is default):
> 3
ⓘ Selected tool version gnat_external=13.3.0

ⓘ Choices for the following tool are narrowed down to releases compatible with just selected gnat_external=13.3.0

ⓘ Currently configured: gprbuild=18.0.0

Please select the gprbuild version for use with this configuration
  1. gprbuild=18.0.0 [Detected at (...)lpws58krs2hdwr102ggv53ynv0-gprbuild-25.0.0/bin/gprbuild]
  2. None
Enter your choice index (first is default):
> 1
ⓘ Selected tool version gprbuild=18.0.0



[nix-shell:~]$ alr get --build gnatformat
                                                                                                          ◷ Solving dependencies: 45.45% solved (5/11 deps, 17/58 solutions left)... Looking for external crate: lib                                                                                                          ◷ Solving dependencies: 45.45% solved (5/11 deps, 17/58 solutions left)... Looking for external crate: lib                                                                                                          ◷ Solving dependencies: 45.45% solved (5/11 deps, 17/58 solutions left)... Looking for external crate: lib                                                                                                          warn:
warn:    New solution is incomplete.
warn:    +        adasat          25.0.0 (new)
warn:    +📦      gnat            14.2.1 (new,gnat_native,indirect,binary)
warn:    +        gnatcoll        25.0.0 (new)
warn:    +        gnatcoll_gmp    25.0.0 (new,indirect)
warn:    +        gnatcoll_iconv  25.0.0 (new,indirect)
warn:    +        langkit_support 25.0.0 (new,indirect)
warn:    +        libadalang      25.0.0 (new)
warn:    +        libgpr          25.0.0 (new,indirect)
warn:    +        libgpr2         25.0.0 (new,indirect)
warn:    +        prettier_ada    25.0.0 (new)
warn:    +        vss             25.0.0 (new,indirect)
warn:    +        xmlada          25.0.0 (new,indirect)
warn:    Missing:
warn:    +❗      libgmp          *      (new,indirect,missing)
warn:
warn: Could not find a complete solution for gnatformat=25.0.0
Build will fail unless externals are made available, do you want to continue?
[Y] Yes  [N] No  (default is No) y
ⓘ Deploying gnatformat=25.0.0...
     -=O=-     #     #      #      #
warn: The following external dependencies are unavailable within Alire:
warn:    libgmp*
warn: Index 'community' version (1.3.0) is older than the newest supported by alr (1.4.0)
warn: You can disable this warning with settings key 'warning.old_index'
ⓘ If you experience any problems loading this index, you may need to reset the community index with 'alr index --reset-community'. Note that this operation will delete any local changes to the community index.
warn: They should be made available in the environment by the user.
warn: Generating possibly incomplete configuration because of missing dependencies
◴ Syncing build dir... warn: Generating possibly incomplete environment because of missing dependencies
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            ⓘ Running post-fetch actions for xmlada=25.0.0...
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking whether gnat can build shared libs... yes
checking for a BSD-compatible install... /nix/store/vz67zaqyfln2jcqwar682kdlrxfx9vq1-coreutils-9.6/bin/install -c
checking whether ln -s works... yes
configure: creating ./config.status
config.status: creating xmlada_shared.gpr
config.status: creating Makefile
config.status: creating tests/dom/default.gpr
ⓘ Building gnatformat=25.0.0/gnat/gnatformat_driver.gpr...
Setup
   [mkdir]        object directory for project GNATCOLL_Minimal
   [mkdir]        library directory for project GNATCOLL_Minimal
   [mkdir]        object directory for project GNATCOLL_Core
   [mkdir]        library directory for project GNATCOLL_Core
   [mkdir]        object directory for project XmlAda_Sax
   [mkdir]        library directory for project XmlAda_Sax
   [mkdir]        object directory for project XmlAda_Schema
   [mkdir]        object directory for project GPR
   [mkdir]        library directory for project GPR
   [mkdir]        object directory for project GNATCOLL_Projects
   [mkdir]        library directory for project GNATCOLL_Projects
   [mkdir]        object directory for project GnatColl_GMP
   [mkdir]        library directory for project GnatColl_GMP
   [mkdir]        object directory for project GnatColl_Iconv
   [mkdir]        library directory for project GnatColl_Iconv
   [mkdir]        object directory for project VSS_GNAT
   [mkdir]        library directory for project VSS_GNAT
   [mkdir]        object directory for project Prettier_Ada
   [mkdir]        library directory for project Prettier_Ada
   [mkdir]        object directory for project AdaSAT
   [mkdir]        exec directory for project AdaSAT
   [mkdir]        library directory for project AdaSAT
   [mkdir]        object directory for project Langkit_Support
   [mkdir]        library directory for project Langkit_Support
   [mkdir]        object directory for project GPR2
   [mkdir]        library directory for project GPR2
   [mkdir]        object directory for project Libadalang
   [mkdir]        library directory for project Libadalang
   [mkdir]        object directory for project Gnatformat
   [mkdir]        library directory for project Gnatformat
   [mkdir]        exec directory for project Gnatformat_Driver
Compile
   [Ada]          gnatformat-ada_driver.adb
   [C]            gpr_parser-gdb.c
   [Ada]          gpr_parser_support-internal-analysis.adb
   [Ada]          gpr_parser_support-generic_api-analysis.adb
   [Ada]          gpr_parser_support-adalog-solver.adb
   [Ada]          gpr_parser_support-generic_bump_ptr.adb
   [Ada]          gpr_parser_support-array_utils.adb
   [Ada]          gpr_parser-implementation.adb
   [Ada]          gpr_parser_support-hashes.adb
   [Ada]          gpr_parser-lexer_implementation.adb
   [Ada]          gpr_parser-analysis.adb
   [Ada]          gpr_parser_support-diagnostics.adb
   [Ada]          gpr_parser-generic_api-introspection.ads
   [Ada]          gpr_parser_adasat.adb
   [Ada]          gpr_parser-unparsing.adb
   [Ada]          gpr_parser_support-names.adb
   [Ada]          gpr_parser_adasat-theory.ads
   [Ada]          gpr_parser_support-adalog-logic_var.adb
   [Ada]          gpr_parser-generic_introspection.adb
   [Ada]          gpr_parser_support-diagnostics-output.adb
   [Ada]          gpr_parser-generic_api.adb
   [Ada]          gpr_parser_support-cheap_sets.adb
   [Ada]          gpr_parser-parsers.adb
   [Ada]          gpr_parser_support-lexical_envs_impl.adb
   [Ada]          gpr_parser_adasat-dpll.adb
   [Ada]          gpr_parser_support-internal.ads
   [Ada]          gpr_parser_support-names-maps.adb
   [Ada]          gpr_parser-lexer_state_machine.adb
   [Ada]          gpr_parser_support-boxes.adb
   [Ada]          gpr_parser-iterators.adb
   [Ada]          gpr_parser_support-adalog-solver_interface.adb
   [Ada]          gpr_parser_support-symbols-precomputed.adb
   [Ada]          gpr_parser_support-tree_traversal_iterator.adb
   [Ada]          gpr_parser_support-adalog.ads
   [Ada]          gpr_parser-private_converters.adb
   [Ada]          gpr_parser-unparsing_implementation.adb
   [Ada]          gpr_parser-public_converters.adb
   [Ada]          gpr_parser_support-token_data_handlers.adb
   [Ada]          gpr_parser_support-images.adb
   [Ada]          gpr_parser_adasat-helpers.adb
   [Ada]          gpr_parser_support-adalog-main_support.ads
   [Ada]          gpr_parser_adasat-builders.adb
   [Ada]          gpr_parser_adasat-internals.ads
   [Ada]          gpr_parser_support-lexical_envs.ads
   [Ada]          gpr_parser_support-bump_ptr_vectors.adb
   [Ada]          gpr_parser_support-generic_api.adb
   [Ada]          gpr_parser-common.adb
   [Ada]          gpr_parser_support-types.ads
   [Ada]          gpr_parser_support-adalog-generic_main_support.adb
   [Ada]          gpr_parser_support-symbols.adb
   [Ada]          gpr_parser-c.adb
   [Ada]          gpr_parser.ads
   [Ada]          gpr_parser_support-packrat.adb
   [Ada]          gpr_parser_support-generic_api-introspection.adb
   [Ada]          gpr_parser_support-errors.ads
   [Ada]          gpr_parser_support-relative_get.adb
   [Ada]          gpr_parser_support-slocs.adb
   [Ada]          gpr_parser_support-bump_ptr.ads
   [Ada]          gpr_parser_support-text.adb
   [Ada]          gpr_parser_support-adalog-debug.adb
   [Ada]          gpr_parser_support-vectors.adb
   [Ada]          gpr_parser_support-iterators.adb
   [Ada]          gpr_parser-lexer.adb
   [Ada]          gpr_parser_support-internal-introspection.adb
   [Ada]          gpr_parser_support-file_readers.adb
   [Ada]          gpr_parser_support-internal-conversions.ads
   [Ada]          gpr_parser_adasat-decisions.adb
   [Ada]          gpr_parser_support.ads
   [Ada]          gpr_parser-debug.adb
   [Ada]          gpr_parser_adasat-vectors.adb
   [Ada]          gpr_parser-implementation-c.adb
   [Ada]          gpr_parser-rewriting_implementation.adb
   [Ada]          gpr_parser_adasat-formulas.adb
   [Ada]          gpr_parser-generic_impl.adb
   [Ada]          gpr_parser-rewriting.adb
   [Ada]          gpr_parser_support-internal-descriptor.ads
   [Ada]          gpr2-kb-embedded.adb
   [Ada]          gpr2-project_parser-registry.adb
   [Ada]          gpr2-project_parser.adb
   [Ada]          gpr2-view_internal.adb
   [Ada]          gpr2-pack_internal.ads
   [Ada]          gpr2-project_parser-set.ads
   [Ada]          gpr2-build-view_tables.adb
   [Ada]          gpr2-view_base_internal.ads
   [Ada]          gpr2-tree_internal.adb
   [Ada]          gpr2-project_parser-create.adb
   [Ada]          gpr2-tree_internal-view_builder.adb
   [Ada]          gpr2-build-artifacts.adb
   [Ada]          gpr2-build-process_manager-json.adb
   [Ada]          gpr2-build-artifacts-file_part.adb
   [Ada]          gpr2-build-actions-link.adb
   [Ada]          gpr2-build-source-sets.adb
   [Ada]          gpr2-build-process_manager.adb
   [Ada]          gpr2-build.ads
   [Ada]          gpr2-build-compilation_unit-maps.ads
   [Ada]          gpr2-build-actions-post_bind.adb
   [Ada]          gpr2-build-ali_parser.adb
   [Ada]          gpr2-build-actions-compile-ada.adb
   [Ada]          gpr2-build-actions.adb
   [Ada]          gpr2-build-compilation_unit.adb
   [Ada]          gpr2-build-actions-compile.adb
   [Ada]          gpr2-build-view_db.adb
   [Ada]          gpr2-build-source_base.adb
   [Ada]          gpr2-build-source_base-ada_parser.adb
   [Ada]          gpr2-build-signature.adb
gpr2-build-signature.adb:78:24: error: no selector "Finalize" for private type "JSON_Value" defined at gnatcoll-json.ads:167

   compilation of gpr2-build-signature.adb failed

gprbuild: *** compilation phase failed
error: Command ["gprbuild", "-s", "-j0", "-p", "-P", "/tmp/gnatformat_25.0.0_79117be8/gnat/gnatformat_driver.gpr"] exited with code 4

warn: gnatformat=25.0.0 successfully retrieved with missing dependencies but its build failed.
Dependencies were solved as follows:

   New solution is incomplete.
   +        adasat          25.0.0 (new)
   +📦      gnat            14.2.1 (new,gnat_native,indirect,binary)
   +        gnatcoll        25.0.0 (new)
   +        gnatcoll_gmp    25.0.0 (new,indirect)
   +        gnatcoll_iconv  25.0.0 (new,indirect)
   +        langkit_support 25.0.0 (new,indirect)
   +        libadalang      25.0.0 (new)
   +        libgpr          25.0.0 (new,indirect)
   +        libgpr2         25.0.0 (new,indirect)
   +        prettier_ada    25.0.0 (new)
   +        vss             25.0.0 (new,indirect)
   +        xmlada          25.0.0 (new,indirect)
   Missing:
   +❗      libgmp          *      (new,indirect,missing)
error: Build ended with errors

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the manual's existing toolchain requirements, then rerun the reported installation with GNAT 13 and GNAT 14 using the commands in the issue. Confirm whether GNAT 14 is required or whether the failure has another cause. Done means the manual clearly documents the verified compiler requirement or compatibility information.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.