alire-project / alire

Command-line tool from the Alire project and supporting library
GNU General Public License v3.0
288 stars 49 forks source link

Compilation failures with GCC 13.1.0 #1377

Closed simonjwright closed 1 year ago

simonjwright commented 1 year ago

The same failures happen with GCC 13.1.0 on {x86_64 and aarch64}-apple-darwin.

Building with gprbuild -k -XALIRE_OS=macos -P alr_env.gpr (twice, to report only the compilation failures - there are other warnings which don’t lead to failure - ??) gives

Compile
   [Ada]          gnatcoll-config.adb
gnatcoll-config.adb:38:26: (style) bad casing of "System_ID" declared at gnatcoll-config.ads:292
   [Ada]          gnatcoll-storage_pools-headers.adb
gnatcoll-storage_pools-headers.ads:48:09: warning: unit "Ada.Unchecked_Conversion" is not instantiated in spec [-gnatwu]
gnatcoll-storage_pools-headers.ads:48:09: warning: with clause can be moved to body [-gnatwu]
   [Ada]          alire-index_on_disk-loading.adb
alire-index_on_disk-loading.adb:282:16: warning: unreachable code [enabled by default]
   [Ada]          alire-solver.adb
alire-solver.adb:874:28: error: ambiguous expression (cannot resolve "Dependencies")
alire-solver.adb:874:28: error: possible interpretation at alire-conditional_trees.ads:76, instance at alire-conditional.ads:18
alire-solver.adb:874:28: error: possible interpretation at alire-conditional.ads:20
   [Ada]          alire-crate_configuration.adb
alire-crate_configuration.adb:940:13: warning: unreachable code [enabled by default]
   [Ada]          alr-commands-search.adb
alr-commands-search.adb:95:07: warning: use clause for package "Release_Sets" has no effect [-gnatwu]

   compilation of gnatcoll-storage_pools-headers.adb failed
   compilation of gnatcoll-config.adb failed
   compilation of alire-crate_configuration.adb failed
   compilation of alire-solver.adb failed
   compilation of alire-index_on_disk-loading.adb failed
   compilation of alr-commands-search.adb failed

Compiling with -gnatwn leaves us with the alire-solver.adb problem still; would you like me to look into it?

simonjwright commented 1 year ago
  [Ada]          alire-solver.adb
alire-solver.adb:874:28: error: ambiguous expression (cannot resolve "Dependencies")
alire-solver.adb:874:28: error: possible interpretation at alire-conditional_trees.ads:76, instance at alire-conditional.ads:18
alire-solver.adb:874:28: error: possible interpretation at alire-conditional.ads:20
gprbuild: *** compilation phase failed

I think this may be a compiler issue: the possible interpretation at alire-conditional_trees.ads:76, instance at alire-conditional.ads:18 appears to be function Dependencies at alire-releases.ads:141, whereas the possible interpretation at alire-conditional.ads:20 is subtype Dependencies.

demizer commented 1 year ago

I am also having the same compiler errors with gcc 13.1.1 on Arch Linux.

mosteo commented 1 year ago

This is pending to be merged in https://github.com/alire-project/alire/pull/1381