fix(guest): install-native-crypto-deps target and ZKC_EXEC_FLAGS propagation - #3808
Conversation
Signed-off-by: Lorenzo Gentile <lorenzo.gentile@consensys.net>
Signed-off-by: Lorenzo Gentile <lorenzo.gentile@consensys.net>
Signed-off-by: Lorenzo Gentile <lorenzo.gentile@consensys.net>
Signed-off-by: Lorenzo Gentile <lorenzo.gentile@consensys.net>
Signed-off-by: Lorenzo Gentile <lorenzo.gentile@consensys.net>
Signed-off-by: Lorenzo Gentile <lorenzo.gentile@consensys.net>
Signed-off-by: Lorenzo Gentile <lorenzo.gentile@consensys.net>
Signed-off-by: Lorenzo Gentile <lorenzo.gentile@consensys.net>
Signed-off-by: Lorenzo Gentile <lorenzo.gentile@consensys.net>
Signed-off-by: Lorenzo Gentile <lorenzo.gentile@consensys.net>
Signed-off-by: Lorenzo Gentile <lorenzo.gentile@consensys.net>
Signed-off-by: Lorenzo Gentile <lorenzo.gentile@consensys.net>
Signed-off-by: Lorenzo Gentile <lorenzo.gentile@consensys.net>
| @@ -0,0 +1,422 @@ | |||
| package main | |||
There was a problem hiding this comment.
This has been deleted in main. Understand if the logic has been moved somewhere else.
Signed-off-by: Lorenzo Gentile <lorenzo.gentile@consensys.net>
Signed-off-by: Lorenzo Gentile <lorenzo.gentile@consensys.net>
Signed-off-by: Lorenzo Gentile <lorenzo.gentile@consensys.net>
Signed-off-by: Lorenzo Gentile <lorenzo.gentile@consensys.net>
install-native-crypto-deps target and ZKC_EXEC_FLAGS propagation
| $$sudo cp /tmp/blst-src/bindings/blst.h /tmp/blst-src/bindings/blst_aux.h "$$prefix/include/"; \ | ||
| fi; \ | ||
| if [ -f "$$prefix/lib/libmcl.so" ] || [ -f "$$prefix/lib/libmcl.dylib" ]; then \ | ||
| if { [ -f "$$prefix/lib/libmcl.so" ] || [ -f "$$prefix/lib/libmcl.dylib" ]; } && { [ "$$uname_s" != "Darwin" ] || [ -f "$$prefix/lib/libmcl.a" ]; }; then \ |
There was a problem hiding this comment.
I don't know - what is this doing ?
There was a problem hiding this comment.
Basically there is a difference between Linux and MacOS in the libraries we install. In the case of MacOS (when uname_s is equal to Darwin) the file libmcl.a needs to be moved from the tmp folder under lib. In the case of Linux that file is already under lib.
So, when we are on MacOS and libmcl.a is not under lib, then we know that the library/target still needs to be executed fully, so we do not skip the body of this if.
There was a problem hiding this comment.
thanks for the explanation - if the script adapts to both OS then, looks good 👍
| # Convert and execute an already compiled external ELF | ||
| elf-exec: elf-to-json install-zkc | ||
| $(MAKE) -C $(MAKEFILE_DIR) --no-print-directory zkc-exec JSON=$(JSON_EXT) | ||
| $(MAKE) -C $(MAKEFILE_DIR) --no-print-directory zkc-exec JSON=$(JSON_EXT) ZKC_EXEC_FLAGS="$(ZKC_EXEC_FLAGS)" |
There was a problem hiding this comment.
are you calling elf-exec directly ? Through make -C risv-guests/l2-execution exec it's passed already
There was a problem hiding this comment.
I am not sure I understand. Here I added the ZKC_EXEC_FLAGS otherwise at the internal invokation the default values was used instead.
There was a problem hiding this comment.
what's the command line for an internal invocation ? you mean when you type make elf-exec directly ?
There was a problem hiding this comment.
For example, when a target is included as a dependency (in this case elf-to-json install-zkc) I call those internal, as the values of the flags are "inherited", while if you invoke make again, then it is like a fresh new call.
Signed-off-by: Lorenzo Gentile <lorenzo.gentile@consensys.net>
d34d926
No description provided.