Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation failures with GNAT Community 2020 #17

Closed
damaki opened this issue May 23, 2020 · 1 comment
Closed

Compilation failures with GNAT Community 2020 #17

damaki opened this issue May 23, 2020 · 1 comment
Assignees
Labels

Comments

@damaki
Copy link
Owner

damaki commented May 23, 2020

Building libkeccak with the newly released GNAT Community 2020 results in compilation failures:

gprbuild -d -Plibkeccak.gpr -p
Compile
   [Ada]          keccak-parallel_keccak_1600.ads
   [Ada]          keccak-parallel_keccak_1600-rounds_24.ads
   [Ada]          keccak-parallel_keccak_1600-rounds_14.ads
   [Ada]          keccak-parallel_keccak_1600-rounds_12.ads
   [Ada]          tuple_hash.ads
   [Ada]          shake.ads
   [Ada]          sha3.ads
   [Ada]          rawshake.ads
   [Ada]          parallel_hash.ads
   [Ada]          marsupilamifourteen.ads
   [Ada]          kmac.ads
   [Ada]          ketje.ads
   [Ada]          keccak.ads
   [Ada]          keccak-util.adb
   [Ada]          keccak-types.ads
keccak-generic_monkeyduplex.ads:55:19: not subtype conformant with declaration at ketje.ads:66
keccak-generic_monkeyduplex.ads:55:19: formal subprograms are not subtype conformant (RM 6.3.1 (17/3))
keccak-generic_monkeyduplex.ads:55:19: not subtype conformant with declaration at ketje.ads:96
keccak-generic_monkeyduplex.ads:55:19: formal subprograms are not subtype conformant (RM 6.3.1 (17/3))
keccak-generic_monkeyduplex.ads:55:19: not subtype conformant with declaration at ketje.ads:126
keccak-generic_monkeyduplex.ads:55:19: formal subprograms are not subtype conformant (RM 6.3.1 (17/3))
keccak-generic_monkeyduplex.ads:55:19: not subtype conformant with declaration at ketje.ads:156
keccak-generic_monkeyduplex.ads:55:19: formal subprograms are not subtype conformant (RM 6.3.1 (17/3))
keccak-generic_monkeywrap.ads:62:04: instantiation error at keccak-generic_monkeyduplex.ads:55
keccak-generic_monkeywrap.ads:62:04: not subtype conformant with declaration at ketje.ads:66
keccak-generic_monkeywrap.ads:62:04: formal subprograms are not subtype conformant (RM 6.3.1 (17/3))

   compilation of ketje.ads failed

These compilation errors seem to be caused by a clash between subprograms with the same name in certain scopes.

For example, in ketje.ads there are lines such as (some parameters omitted for clarity):

      procedure XOR_Padding_Into_State is new Keccak.Padding.XOR_Pad101_Into_State
        (...)

      package MonkeyDuplex_Jr is new Keccak.Generic_MonkeyDuplex
        (...
         XOR_Padding_Into_State => XOR_Padding_Into_State,
         ...)

The compilation error seems to be that the declaration of XOR_Padding_Into_State clashes with the generic formal parameter of Generic_MonkeyDuplex of the same name. Renaming the XOR_Padding_Into_State procedure to something else avoids the problem.

All instances of this compilation error should be fixed by renaming functions as appropriate.

@damaki damaki added the bug label May 23, 2020
@damaki damaki self-assigned this May 23, 2020
@damaki
Copy link
Owner Author

damaki commented Jun 4, 2022

This is now fixed in #18

@damaki damaki closed this as completed Jun 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant