You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@teaclave.apache.org by GitBox <gi...@apache.org> on 2020/12/27 19:10:26 UTC

[GitHub] [incubator-teaclave-sgx-sdk] Lanjiejie opened a new issue #305: link sgx_tprotected_fs lib failed

Lanjiejie opened a new issue #305:
URL: https://github.com/apache/incubator-teaclave-sgx-sdk/issues/305


   I try to link a sgx_tprotected_fs lib, but I missed some linking errors:
   ```
   = note: /usr/bin/ld: ../lib/libEnclave_u.a(Enclave_u.o): in function `Enclave_u_sgxprotectedfs_do_file_recovery':
             Enclave_u.c:(.text+0x10): undefined reference to `u_sgxprotectedfs_do_file_recovery'
             /usr/bin/ld: ../lib/libEnclave_u.a(Enclave_u.o): in function `Enclave_u_sgxprotectedfs_fwrite_recovery_node':
             Enclave_u.c:(.text+0x30): undefined reference to `u_sgxprotectedfs_fwrite_recovery_node'
             /usr/bin/ld: ../lib/libEnclave_u.a(Enclave_u.o): in function `Enclave_u_sgxprotectedfs_recovery_file_open':
             Enclave_u.c:(.text+0x49): undefined reference to `u_sgxprotectedfs_recovery_file_open'
             /usr/bin/ld: ../lib/libEnclave_u.a(Enclave_u.o): in function `Enclave_u_sgxprotectedfs_remove':
             Enclave_u.c:(.text+0x69): undefined reference to `u_sgxprotectedfs_remove'
             /usr/bin/ld: ../lib/libEnclave_u.a(Enclave_u.o): in function `Enclave_u_sgxprotectedfs_fflush':
             Enclave_u.c:(.text+0x89): undefined reference to `u_sgxprotectedfs_fflush'
             /usr/bin/ld: ../lib/libEnclave_u.a(Enclave_u.o): in function `Enclave_u_sgxprotectedfs_fclose':
             Enclave_u.c:(.text+0xa9): undefined reference to `u_sgxprotectedfs_fclose'
             /usr/bin/ld: ../lib/libEnclave_u.a(Enclave_u.o): in function `Enclave_u_sgxprotectedfs_fwrite_node':
             Enclave_u.c:(.text+0xd4): undefined reference to `u_sgxprotectedfs_fwrite_node'
             /usr/bin/ld: ../lib/libEnclave_u.a(Enclave_u.o): in function `Enclave_u_sgxprotectedfs_fread_node':
             Enclave_u.c:(.text+0xf4): undefined reference to `u_sgxprotectedfs_fread_node'
             /usr/bin/ld: ../lib/libEnclave_u.a(Enclave_u.o): in function `Enclave_u_sgxprotectedfs_check_if_file_exists':
             Enclave_u.c:(.text+0x109): undefined reference to `u_sgxprotectedfs_check_if_file_exists'
             /usr/bin/ld: ../lib/libEnclave_u.a(Enclave_u.o): in function `Enclave_u_sgxprotectedfs_exclusive_file_open':
             Enclave_u.c:(.text+0x135): undefined reference to `u_sgxprotectedfs_exclusive_file_open'
             collect2: error: ld returned 1 exit status
   ```
   My enclave.edl's content:
   ```
   enclave {
       from "sgx_tstd.edl" import *;
       from "sgx_stdio.edl" import *;
       from "sgx_backtrace.edl" import *;
       from "sgx_tstdc.edl" import *;
       from "sgx_tprotected_fs.edl" import *;
       trusted {
           /* define ECALLs here. */
   
           //public sgx_status_t say_something([in, size=len] const uint8_t* some_string, size_t len);
           public sgx_status_t initial_secret_seed_gen(size_t nodenum, 
                   [out, size=shares_len] uint8_t* shares, size_t shares_len,
                   [out, size=commits_len] uint8_t* commits, size_t commits_len);
   
       };
       untrusted{};
   };
   ```
   And I have linked it in my Makefile:
   ```
   RustEnclave_Link_Flags := -Wl,--no-undefined -nostdlib -nodefaultlibs -nostartfiles -L$(SGX_LIBRARY_PATH) \
   	-Wl,--whole-archive -l$(Trts_Library_Name) -Wl,--no-whole-archive \
   	-Wl,--start-group -lsgx_tstdc -l$(Service_Library_Name) -l$(Crypto_Library_Name) -lsgx_tprotected_fs $(RustEnclave_Link_Libs) -Wl,--end-group \
   	-Wl,--version-script=enclave/Enclave.lds \
   	$(ENCLAVE_LDFLAGS)
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@teaclave.apache.org
For additional commands, e-mail: notifications-help@teaclave.apache.org


[GitHub] [incubator-teaclave-sgx-sdk] Lanjiejie commented on issue #305: link sgx_tprotected_fs lib failed

Posted by GitBox <gi...@apache.org>.
Lanjiejie commented on issue #305:
URL: https://github.com/apache/incubator-teaclave-sgx-sdk/issues/305#issuecomment-751941295


   @longtomjr Thank you for your help! I add the link to the `sgx_tcxx` library, and it finally works!


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@teaclave.apache.org
For additional commands, e-mail: notifications-help@teaclave.apache.org


[GitHub] [incubator-teaclave-sgx-sdk] Lanjiejie commented on issue #305: link sgx_tprotected_fs lib failed

Posted by GitBox <gi...@apache.org>.
Lanjiejie commented on issue #305:
URL: https://github.com/apache/incubator-teaclave-sgx-sdk/issues/305#issuecomment-751506474


   I have tried many methods, but I don’t know what makes it wrong. May I ask for help?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@teaclave.apache.org
For additional commands, e-mail: notifications-help@teaclave.apache.org


[GitHub] [incubator-teaclave-sgx-sdk] Lanjiejie closed issue #305: link sgx_tprotected_fs lib failed

Posted by GitBox <gi...@apache.org>.
Lanjiejie closed issue #305:
URL: https://github.com/apache/incubator-teaclave-sgx-sdk/issues/305


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@teaclave.apache.org
For additional commands, e-mail: notifications-help@teaclave.apache.org