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 2021/06/01 12:01:13 UTC

[GitHub] [incubator-teaclave-sgx-sdk] mullefel opened a new issue #342: Linker error: missing `u_pipe2_ocall` symbol when using `mio-sgx` inside the enclave

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


   We're running into a linker error problem when we try to incorporate the [mio-sgx](https://github.com/mesalock-linux/mio-sgx) library into our enclave. It seems like the `u_pipe2_ocall` symbol is missing, which, if I looked that up correctly, is provided by the [sgx_ustdc](https://github.com/apache/incubator-teaclave-sgx-sdk/blob/ed9e7cce4fd40efd7a256d5c4be1c5f00778a5bb/sgx_ustdc/pipe.c#L33) library?
   
   However, in the [mio samplecode](https://github.com/apache/incubator-teaclave-sgx-sdk/tree/master/samplecode/mio/server) I cannot find any reference to `sgx_ustdc`, neither in the Makefile (where I'd expect it, since it's a C-Library?) nor in any Cargo.toml. So I don't quite understand what's going on and how the symbols of that library find their way into `sgx_libc`. Any help is appreciated 😄 
   
   
   The error reported by the compiler:
   ```
   /usr/local/bin/ld: ./lib/libenclave.a(sgx_libc-fe3717fe13cfb6f5.sgx_libc.2dl1tomz-cgu.6.rcgu.o): in function `sgx_libc::linux::x86_64::ocall::pipe2':
   sgx_libc.2dl1tomz-cgu.6:(.text._ZN8sgx_libc5linux6x86_645ocall5pipe217hc10c647a6c5db8d3E+0x26): undefined reference to `u_pipe2_ocall'
   collect2: error: ld returned 1 exit status
   Makefile:190: recipe for target 'enclave/enclave.so' failed
   ```
   
   SGX dependency section of the enclave `cargo.toml`:
   ```
   [target.'cfg(not(target_env = "sgx"))'.dependencies]
   sgx_tse       = { rev = "v1.1.3", git = "https://github.com/apache/teaclave-sgx-sdk.git" }
   sgx_tstd      = { rev = "v1.1.3", git = "https://github.com/apache/teaclave-sgx-sdk.git", features = ["untrusted_fs","net","backtrace"] }
   sgx_rand      = { rev = "v1.1.3", git = "https://github.com/apache/teaclave-sgx-sdk.git" }
   sgx_trts      = { rev = "v1.1.3", git = "https://github.com/apache/teaclave-sgx-sdk.git" }
   sgx_types     = { rev = "v1.1.3", git = "https://github.com/apache/teaclave-sgx-sdk.git" }
   sgx_tseal     = { rev = "v1.1.3", git = "https://github.com/apache/teaclave-sgx-sdk.git" }
   sgx_tcrypto   = { rev = "v1.1.3", git = "https://github.com/apache/teaclave-sgx-sdk.git" }
   sgx_serialize = { rev = "v1.1.3", git = "https://github.com/apache/teaclave-sgx-sdk.git" }
   sgx_tunittest = { rev = "v1.1.3", git = "https://github.com/apache/teaclave-sgx-sdk.git" }
   ```
   
   Further down, we add the `mio` dependency:
   ```
   [dependencies.mio]
   git      = "https://github.com/mesalock-linux/mio-sgx"
   rev   = "sgx_1.1.3"
   ```
   
   


-- 
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] mullefel closed issue #342: Linker error: missing `u_pipe2_ocall` symbol when using `mio-sgx` inside the enclave

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


   


-- 
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] mullefel commented on issue #342: Linker error: missing `u_pipe2_ocall` symbol when using `mio-sgx` inside the enclave

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


   Okay I think I found the problem. The `Enclave.edl` was missing the imports from `sgx_pipe`:
   
   In `Enclave.edl`
   ```
   from "sgx_pipe.edl" import *;
   ```


-- 
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