Closed njlow closed 1 week ago
Hello,
This seems to be an issue caused by an underlying library sparknacl which uses the -fcallgraph-info=su,da
switch which is either not supported by your version of the compiler or is not available on arm.
You can try modifying third-party/sparknacl/sparknacl.gpr
as follows:
--- a/sparknacl.gpr
+++ b/sparknacl.gpr
@@ -29,7 +29,7 @@ library project Sparknacl is
type Target_Arch_Kind is ("unspecified", "rv32im", "rv32imc", "rv32imc_a4");
Target_Arch : Target_Arch_Kind := External ("SPARKNACL_TARGET_ARCH", "unspecified");
- Callgraph_Switch := ("-fcallgraph-info=su,da");
+ Callgraph_Switch := ();
Compile_Checks_Switches := ();
case Compile_Checks is
Compile_Checks_Switches := ();
case Compile_Checks is
and then attempt to build the project again.
Hope this helps.
thank you for your reply.
your modification solved the error. but i get this now on both systems:
Compile [Ada] sparknacl-mac.adb [Ada] sparknacl.adb [Ada] sparknacl-secretbox.adb [Ada] sparknacl-core.adb sparknacl.adb:16:25: "Relaxed_Initialization" is not a valid aspect identifier sparknacl.adb:28:21: warning: unused variable "J" sparknacl.adb:28:57: unrecognized attribute "Initialized" sparknacl.adb:33:24: unrecognized attribute "Initialized" sparknacl.adb:41:24: unrecognized attribute "Initialized" sparknacl.adb:51:25: "Relaxed_Initialization" is not a valid aspect identifier sparknacl.adb:63:21: warning: unused variable "J" sparknacl.adb:63:57: unrecognized attribute "Initialized" sparknacl.adb:68:24: unrecognized attribute "Initialized" sparknacl.adb:76:24: unrecognized attribute "Initialized" sparknacl.adb:86:22: "Relaxed_Initialization" is not a valid aspect identifier sparknacl.adb:204:21: warning: unused variable "J" sparknacl.adb:204:58: unrecognized attribute "Initialized" sparknacl.adb:214:18: warning: unused variable "J" sparknacl.adb:214:42: unrecognized attribute "Initialized" sparknacl.adb:218:25: unrecognized attribute "Initialized"
compilation of sparknacl.adb failed
gprbuild: *** compilation phase failed
What version of gnat and gprbuild are you using on your systems? Errors indicate that your version of the compiler does not support some of the features required by the sparknacl library.
Ensure that your gnat version is at least 11.2.1. If it is greater than that, it might be possible that this is simply something not supported on arm systems. In this case your best bet is to try and build the sparknacl project by itself, and if unsuccessful, opening an issue there regarding Raspberry Pi support.
You could also try simply disabling compiler checks by once again modifying sparknacl.gpr
as follows:
--- a/sparknacl.gpr
+++ b/sparknacl.gpr
@@ -14,7 +14,7 @@ library project Sparknacl is
for Library_Kind use Library_Type;
type Enabled_Kind is ("enabled", "disabled");
- Compile_Checks : Enabled_Kind := External ("SPARKNACL_COMPILE_CHECKS", "enabled");
+ Compile_Checks : Enabled_Kind := External ("SPARKNACL_COMPILE_CHECKS", "disabled");
Runtime_Checks : Enabled_Kind := External ("SPARKNACL_RUNTIME_CHECKS", "disabled");
Style_Checks : Enabled_Kind := External ("SPARKNACL_STYLE_CHECKS", "enabled");
Contracts_Checks : Enabled_Kind := External ("SPARKNACL_CONTRACTS", "disabled");
But I cannot guarantee that this wouldn't change behaviour of the resulting program. Always make sure that the mnemonic phrases generated by vaniton are valid before transferring any funds!
updating gnat to 11.4.0 solved all problems.
thank you so much!
Glad this helped!
hi,
i tried to build on raspian and debian system. always get the same error.
command used:
gprbuild -P vaniton.gpr -XBUILD=RELEASE -j0
output on raspian:
Setup [mkdir] object directory for project Sparknacl [mkdir] object directory for project Vaniton [mkdir] exec directory for project Vaniton Compile [Ada] vaniton.adb [Ada] mnemonic2address.adb [Ada] benchmark.adb [Ada] sparknacl-cryptobox.adb arm-linux-gnueabihf-gnatgcc: error: unrecognized command line option ‘-fcallgraph-info=su,da’
compilation of sparknacl-cryptobox.adb failed
gprbuild: *** compilation phase failed
output on debian:
Setup [mkdir] object directory for project Sparknacl [mkdir] object directory for project Vaniton [mkdir] exec directory for project Vaniton Compile [Ada] vaniton.adb [Ada] mnemonic2address.adb [Ada] benchmark.adb [Ada] sparknacl-mac.adb gnatgcc: error: unrecognized command line option '-fcallgraph-info=su,da'
compilation of sparknacl-mac.adb failed
gprbuild: *** compilation phase failed
systems are up to date. recursively cloned repo and openssl installed.
thank you for your help.