Segment 9 of talos patch fails
Hello,
i am interested in your LibSEAL project and wanted to build. However, it fails at the patching step of Talos (./patch_talos.sh)
The exact error message is :
Hunk #9 FAILED at 876. 1 out of 11 hunks FAILED -- saving rejects to file crypto/Makefile.sgx.rej
I tried adding --ignore-whitespaces to exclude errors regarding identation or different whitespaces but it returns the same error. It would be great if you can help me out with this problem.
Best regards
Hi
I have found a problem in the Makefile.sgx.patch of LibSEAL and fixed it in the latest commit (32d5641). Can you try again? It should be fine now.
Thanks for the fast response. Yeah the patch script works fine now. Thanks!. However, after applying the patch and trying to follow the instructions of Talos readme to build it with libseal, it fails with 2 different errors.
The first one is while running make -f Makefile.nosgx and it returns compile error message regarding bignum functions.
`bn/bn_lib.c:143:16: error: expected identifier or ‘(’ before ‘const’
143 | int BN_is_zero(const BIGNUM* a) {
| ^~~~~
../include/openssl/bn.h:329:31: note: in definition of macro ‘BN_is_zero’ 329 | #define BN_is_zero(a) ((a)->top == 0) | ^ ../include/openssl/bn.h:329:33: error: expected ‘)’ before ‘->’ token 329 | #define BN_is_zero(a) ((a)->top == 0) | ^~ bn/bn_lib.c:143:5: note: in expansion of macro ‘BN_is_zero’ 143 | int BN_is_zero(const BIGNUM* a) { | ^~~~~~~~~~ make: *** [Makefile.nosgx:649: bn/bn_lib.o] Error 1 `
the other error happens when executing make -f Makefile.sgx and the compile error message is:
`enclaveshim_ocalls.c:1123:5: error: conflicting types for ‘gettimeofday’
1123 | int gettimeofday(struct timeval *tv, struct timezone *tz) {
| ^~~~~~~~~~~~
In file included from enclaveshim_ocalls.c:33: /usr/include/x86_64-linux-gnu/sys/time.h:66:12: note: previous declaration of ‘gettimeofday’ was here 66 | extern int gettimeofday (struct timeval *__restrict __tv, | ^~~~~~~~~~~~ make: *** [Makefile.sgx:784: enclaveshim_ocalls.o] Error 1 `
I am not really sure whats causing this problem.
I did not encounter these errors when compiling without sgx. Instead I have encountered other errors related to a type mismatch in the auditing module interface (see commit 3437214). I am using Ubuntu 20.04 with gcc 9.3.0. Maybe this is due to a different gcc version?