You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@teaclave.apache.org by Mingshen Sun <no...@github.com.INVALID> on 2021/11/25 01:13:38 UTC

[apache/incubator-teaclave] Failed to directly build `teaclave_sgx_tool` only from scratch (Issue #576)

I tried to build, execute, deploy, and use Teaclave like this:

```
docker run --rm -v $(pwd):/teaclave -w /teaclave \
>   -it teaclave/teaclave-build-ubuntu-1804-sgx-2.14:latest \
>    bash -c ". /root/.cargo/env && \
>      . /opt/sgxsdk/environment && \
>      mkdir -p build && cd build && \
>      cmake -DTEST_MODE=ON .. && \
>      make teaclave_sgx_tool"
Unable to find image 'teaclave/teaclave-build-ubuntu-1804-sgx-2.14:latest' locally
latest: Pulling from teaclave/teaclave-build-ubuntu-1804-sgx-2.14
Digest: sha256:7573f25acecddca48c57b20acb6f0fe9fe505503c33a9dc9905470f95ebd7829
Status: Downloaded newer image for teaclave/teaclave-build-ubuntu-1804-sgx-2.14:latest
-- The C compiler identification is GNU 7.5.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Found Git: /usr/bin/git (found version "2.32.0")
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so (found version "1.1.1")
-- Submodule update
Submodule 'third_party/crates-io' (https://github.com/mesalock-linux/crates-io.git) registered for path 'third_party/crates-io'
Submodule 'third_party/crates-sgx' (https://github.com/mesalock-linux/crates-sgx.git) registered for path 'third_party/crates-sgx'
Submodule 'third_party/mesapy' (https://github.com/mesalock-linux/mesapy.git) registered for path 'third_party/mesapy'
Submodule 'third_party/rust-sgx-sdk' (https://github.com/apache/incubator-teaclave-sgx-sdk) registered for path 'third_party/rust-sgx-sdk'
Submodule 'third_party/wasm-micro-runtime' (https://github.com/bytecodealliance/wasm-micro-runtime) registered for path 'third_party/wasm-micro-runtime'
Cloning into '/teaclave/third_party/crates-io'...
Cloning into '/teaclave/third_party/crates-sgx'...
Cloning into '/teaclave/third_party/mesapy'...
Cloning into '/teaclave/third_party/rust-sgx-sdk'...
Cloning into '/teaclave/third_party/wasm-micro-runtime'...
Submodule path 'third_party/crates-io': checked out '5d8a4374276778da1ef3f35c3d1f294143275fbe'
Submodule path 'third_party/crates-sgx': checked out '7b5fdc60d567134009143de5d362db82d46165eb'
Submodule path 'third_party/mesapy': checked out '947fb3f598eede83ba0e33b5b5655b9a9597c2d8'
Submodule 'sgx/libffi' (https://github.com/libffi/libffi.git) registered for path 'third_party/mesapy/sgx/libffi'
Cloning into '/teaclave/third_party/mesapy/sgx/libffi'...
Submodule path 'third_party/mesapy/sgx/libffi': checked out '20562ac0427c3578250d04c6e34fb0127d4551cf'
Submodule path 'third_party/rust-sgx-sdk': checked out 'ed9e7cce4fd40efd7a256d5c4be1c5f00778a5bb'
Submodule path 'third_party/wasm-micro-runtime': checked out '7706e4b1514e5fd95a1c5efe258ecd08467d030a'
patching file core/shared/platform/teaclave-sgx/platform_internal.h
patching file core/shared/platform/teaclave-sgx/sgx_platform.c
patching file core/shared/platform/teaclave-sgx/sgx_rsrv_mem_mngr.h
patching file core/shared/platform/teaclave-sgx/sgx_thread.c
patching file core/shared/platform/teaclave-sgx/shared_platform.cmake
patching file product-mini/platforms/teaclave-sgx/CMakeLists.txt
SGX_SDK=/opt/sgxsdk
SGX_MODE=HW
RUSTUP_TOOLCHAIN=nightly-2020-10-25
DCAP=OFF
BUILD_TYPE=debug
TEACLAVE_SYMLINKS=/tmp/teaclave_symlinks.Qtx3oVw7rjaU
EXECUTOR_BUILTIN=ON
EXECUTOR_MESAPY=ON
EXECUTOR_WAMR=ON
-- ====== /teaclave/build/environment GENERATED ======
-- Configuring done
-- Generating done
-- Build files have been written to: /teaclave/build
Scanning dependencies of target prep
INFO: Start to build EDL.
[  0%] Built target prep
Scanning dependencies of target sgxapp-teaclave_sgx_tool
[  6%] Building sgxapp-teaclave_sgx_tool
   Compiling proc-macro2 v1.0.27
   Compiling unicode-xid v0.2.2
   Compiling libc v0.2.97
   Compiling syn v1.0.73
   Compiling cfg-if v1.0.0
   Compiling serde_derive v1.0.126
   Compiling serde v1.0.126
   Compiling cc v1.0.68
   Compiling getrandom v0.1.16
   Compiling version_check v0.9.3
   Compiling tinyvec_macros v0.1.0
   Compiling matches v0.1.8
   Compiling ryu v1.0.5
   Compiling cfg-if v0.1.10
   Compiling memchr v2.4.0
   Compiling anyhow v1.0.41
   Compiling log v0.4.14
   Compiling percent-encoding v2.1.0
   Compiling ppv-lite86 v0.2.10
   Compiling semver-parser v0.7.0
   Compiling rand_core v0.4.2
   Compiling bitflags v1.2.1
   Compiling serde_json v1.0.64
   Compiling spin v0.5.2
   Compiling itoa v0.4.7
   Compiling untrusted v0.7.1
   Compiling once_cell v1.8.0
   Compiling sgx_types v1.1.3 (https://github.com/apache/teaclave-sgx-sdk?rev=v1.1.3#a6a172e6)
   Compiling unicode-segmentation v1.8.0
   Compiling regex-syntax v0.6.25
   Compiling hex v0.4.3
   Compiling teaclave_config v0.2.0 (/teaclave/build/cmake_tomls/sgx_untrusted_app/config)
   Compiling quick-error v1.2.3
   Compiling unicode-width v0.1.8
   Compiling termcolor v1.1.2
   Compiling teaclave_binder v0.2.0 (/teaclave/build/cmake_tomls/sgx_untrusted_app/binder)
   Compiling ansi_term v0.11.0
   Compiling vec_map v0.8.2
   Compiling strsim v0.8.0
   Compiling teaclave_sgx_tool v0.2.0 (/teaclave/build/cmake_tomls/sgx_untrusted_app/tool/app)
   Compiling lazy_static v1.4.0
   Compiling tinyvec v1.2.0
   Compiling unicode-bidi v0.3.5
   Compiling protected_fs_rs v0.2.0 (/teaclave/build/cmake_tomls/sgx_untrusted_app/common/protected_fs_rs)
   Compiling form_urlencoded v1.0.1
   Compiling proc-macro-error-attr v1.0.4
   Compiling proc-macro-error v1.0.4
   Compiling rdrand v0.6.0
   Compiling semver v0.9.0
   Compiling humantime v1.3.0
   Compiling textwrap v0.11.0
   Compiling heck v0.3.3
   Compiling rustc_version v0.2.3
   Compiling ring v0.16.20
   Compiling quote v1.0.9
   Compiling aho-corasick v0.7.18
   Compiling unicode-normalization v0.1.19
   Compiling atty v0.2.14
   Compiling getrandom v0.2.3
   Compiling sgx_urts v1.1.3 (https://github.com/apache/teaclave-sgx-sdk?rev=v1.1.3#a6a172e6)
   Compiling raw-cpuid v8.1.2
   Compiling clap v2.33.3
   Compiling rand_core v0.5.1
   Compiling rand_chacha v0.2.2
   Compiling regex v1.5.4
   Compiling rand v0.7.3
   Compiling idna v0.2.3
   Compiling env_logger v0.7.1
   Compiling thiserror-impl v1.0.26
   Compiling structopt-derive v0.4.15
   Compiling thiserror v1.0.26
   Compiling structopt v0.3.22
   Compiling toml v0.5.8
   Compiling url v2.2.2
   Compiling uuid v0.8.2
   Compiling teaclave_crypto v0.2.0 (/teaclave/build/cmake_tomls/sgx_untrusted_app/crypto)
   Compiling teaclave_types v0.2.0 (/teaclave/build/cmake_tomls/sgx_untrusted_app/types)
    Finished dev [unoptimized + debuginfo] target(s) in 20.73s
[  6%] Built target sgxapp-teaclave_sgx_tool
Scanning dependencies of target wamr_teaclave
[ 13%] Creating directories for 'wamr_teaclave'
[ 20%] No download step for 'wamr_teaclave'
[ 26%] No patch step for 'wamr_teaclave'
[ 33%] No update step for 'wamr_teaclave'
[ 40%] Performing configure step for 'wamr_teaclave'
-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Build Configurations:
     Build as target X86_64
     CMAKE_BUILD_TYPE Release
     WAMR Interpreter enabled
     WAMR AOT disabled
     WAMR JIT disabled
     Libc builtin disabled
     Libc WASI disabled
     Fast interpreter disabled
     Multiple modules disabled
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/cc
-- Configuring done
-- Generating done
-- Build files have been written to: /teaclave/third_party/wasm-micro-runtime/product-mini/platforms/teaclave-sgx/build
[ 46%] Performing build step for 'wamr_teaclave'
-- wamr_teaclave build command succeeded.  See also /teaclave/build/wamr_teaclave-prefix/src/wamr_teaclave-stamp/wamr_teaclave-build-*.log
[ 53%] No install step for 'wamr_teaclave'
[ 60%] Completed 'wamr_teaclave'
[ 60%] Built target wamr_teaclave
Scanning dependencies of target wamr
[ 66%] Generating intermediate/libvmlib.a
[ 66%] Built target wamr
Scanning dependencies of target mesapy
[ 73%] Generating intermediate/libpypy-c.a, intermediate/libffi.a, intermediate/libsgx_tlibc_ext.a, intermediate/libsgx_ulibc.a, intermediate/ffi.o
[ 73%] Built target mesapy
[ 80%] Generating mesapy ffi stubs
generating /teaclave/build/intermediate/acs_py_enclave.c
Scanning dependencies of target pycomponent
[ 86%] Building C object CMakeFiles/pycomponent.dir/intermediate/acs_py_enclave.c.o
[ 93%] Linking C static library intermediate/libpycomponent.a
[ 93%] Built target pycomponent
Scanning dependencies of target sgxlib-teaclave_sgx_tool
[100%] Building sgxlib-teaclave_sgx_tool, enclave info to /dev/null
   Compiling sgx_build_helper v0.1.3 (https://github.com/apache/teaclave-sgx-sdk?rev=v1.1.3#a6a172e6)
   Compiling sgx_types v1.1.3 (https://github.com/apache/teaclave-sgx-sdk?rev=v1.1.3#a6a172e6)
   Compiling cc v1.0.71
   Compiling sgx_tstd v1.1.3 (https://github.com/apache/teaclave-sgx-sdk?rev=v1.1.3#a6a172e6)
   Compiling sgx_demangle v1.1.3 (https://github.com/apache/teaclave-sgx-sdk?rev=v1.1.3#a6a172e6)
   Compiling hashbrown_tstd v0.9.0 (https://github.com/apache/teaclave-sgx-sdk?rev=v1.1.3#a6a172e6)
   Compiling sgx_alloc v1.1.3 (https://github.com/apache/teaclave-sgx-sdk?rev=v1.1.3#a6a172e6)
   Compiling proc-macro2 v1.0.32
   Compiling unicode-xid v0.2.2
   Compiling syn v1.0.81
   Compiling spin v0.5.2
   Compiling serde_derive v1.0.118 (https://github.com/mesalock-linux/serde-sgx#db0226f1)
   Compiling cfg-if v0.1.10
   Compiling serde v1.0.118 (https://github.com/mesalock-linux/serde-sgx#db0226f1)
   Compiling getrandom v0.1.14 (https://github.com/mesalock-linux/getrandom-sgx#0aa9cc20)
   Compiling autocfg v0.1.7
   Compiling untrusted v0.7.1
   Compiling log v0.4.14 (https://github.com/mesalock-linux/log-sgx#2ca9039a)
   Compiling cfg-if v1.0.0
   Compiling matches v0.1.8 (https://github.com/mesalock-linux/rust-std-candidates-sgx#5747bcf3)
   Compiling libc v0.2.105
   Compiling ryu v1.0.5
   Compiling ppv-lite86 v0.2.6 (https://github.com/mesalock-linux/cryptocorrosion-sgx#32d7de50)
   Compiling rand_core v0.4.2
   Compiling serde_json v1.0.60 (https://github.com/mesalock-linux/serde-json-sgx#38089381)
   Compiling autocfg v1.0.1
   Compiling percent-encoding v2.1.0 (https://github.com/mesalock-linux/rust-url-sgx#23832f31)
   Compiling proc-macro2 v0.4.30
   Compiling teaclave_config v0.2.0 (/teaclave/build/cmake_tomls/sgx_trusted_lib/config)
   Compiling httparse v1.5.1
   Compiling unicode-xid v0.1.0
   Compiling syn v0.15.44
   Compiling bit-vec v0.6.3
   Compiling hashbrown v0.3.1
   Compiling quick-error v1.2.2 (https://github.com/mesalock-linux/quick-error-sgx#468bf2cc)
   Compiling teaclave_binder v0.2.0 (/teaclave/build/cmake_tomls/sgx_trusted_lib/binder)
   Compiling lazy_static v1.4.0
   Compiling protected_fs_rs v0.2.0 (/teaclave/build/cmake_tomls/sgx_trusted_lib/common/protected_fs_rs)
   Compiling sgx_libc v1.1.3 (https://github.com/apache/teaclave-sgx-sdk?rev=v1.1.3#a6a172e6)
   Compiling sgx_tse v1.1.3 (https://github.com/apache/teaclave-sgx-sdk?rev=v1.1.3#a6a172e6)
   Compiling sgx_tcrypto v1.1.3 (https://github.com/apache/teaclave-sgx-sdk?rev=v1.1.3#a6a172e6)
   Compiling sgx_unwind v0.1.1 (https://github.com/apache/teaclave-sgx-sdk?rev=v1.1.3#a6a172e6)
   Compiling rdrand v0.6.0
   Compiling num-traits v0.2.10 (https://github.com/mesalock-linux/num-traits-sgx#af046e0b)
   Compiling num-integer v0.1.41 (https://github.com/mesalock-linux/num-integer-sgx#404c50e5)
   Compiling num-bigint v0.2.5 (https://github.com/mesalock-linux/num-bigint-sgx#76a5bed9)
   Compiling fnv v1.0.6 (https://github.com/mesalock-linux/rust-fnv-sgx#c3bd6153)
   Compiling sgx_trts v1.1.3 (https://github.com/apache/teaclave-sgx-sdk?rev=v1.1.3#a6a172e6)
   Compiling sgx_tprotected_fs v1.1.3 (https://github.com/apache/teaclave-sgx-sdk?rev=v1.1.3#a6a172e6)
   Compiling sgx_backtrace_sys v1.1.3 (https://github.com/apache/teaclave-sgx-sdk?rev=v1.1.3#a6a172e6)
   Compiling ring v0.16.19 (https://github.com/mesalock-linux/ring-sgx?tag=v0.16.5#844efe27)
   Compiling quote v1.0.10
   Compiling quote v0.6.13
   Compiling teaclave_binder_attribute v0.2.0 (/teaclave/build/cmake_tomls/sgx_trusted_lib/binder/attribute)
   Compiling thiserror-impl v1.0.9
   Compiling teaclave_rpc_proc_macro v0.2.0 (/teaclave/build/cmake_tomls/sgx_trusted_lib/rpc/proc_macro)
   Compiling teaclave_service_enclave_utils_proc_macro v0.2.0 (/teaclave/build/cmake_tomls/sgx_trusted_lib/services/utils/service_enclave_utils/proc_macro)
   Compiling smallvec v1.6.1 (https://github.com/mesalock-linux/rust-smallvec-sgx#b5925f10)
   Compiling itoa v0.4.5 (https://github.com/mesalock-linux/itoa-sgx#295ee451)
   Compiling unicode-bidi v0.3.4 (https://github.com/mesalock-linux/unicode-bidi-sgx#eb10728a)
   Compiling anyhow v1.0.28
   Compiling hex v0.4.0
   Compiling memchr v2.2.1 (https://github.com/mesalock-linux/rust-memchr-sgx#fb51ee32)
   Compiling thiserror v1.0.9
   Compiling base64 v0.13.0 (https://github.com/mesalock-linux/rust-base64-sgx#dc7389e1)
   Compiling thread_local v1.0.0 (https://github.com/mesalock-linux/thread_local-rs-sgx#a8e6e6ce)
   Compiling regex-syntax v0.6.12 (https://github.com/mesalock-linux/regex-sgx#76aef86f)
   Compiling termcolor v1.0.5 (https://github.com/mesalock-linux/termcolor-sgx#fee5ac79)
   Compiling humantime v1.3.0 (https://github.com/mesalock-linux/humantime-sgx#c5243dfa)
   Compiling sgx_rand v1.1.3 (https://github.com/apache/teaclave-sgx-sdk?rev=v1.1.3#a6a172e6)
   Compiling bytes v0.5.4 (https://github.com/mesalock-linux/bytes-sgx#63d1951a)
   Compiling threadpool v1.8.0 (https://github.com/mesalock-linux/rust-threadpool-sgx#098d98a8)
   Compiling rand_core v0.5.1 (https://github.com/mesalock-linux/rand-sgx?tag=v0.7.3_sgx1.1.3#83583f07)
   Compiling unicode-normalization v0.1.12 (https://github.com/mesalock-linux/unicode-normalization-sgx#c1b03061)
   Compiling aho-corasick v0.7.10 (https://github.com/mesalock-linux/aho-corasick-sgx#7558a97c)
   Compiling webpki v0.21.4 (https://github.com/mesalock-linux/webpki?branch=mesalock_sgx#8dbe6fbe)
   Compiling sct v0.6.0 (https://github.com/mesalock-linux/sct.rs?branch=mesalock_sgx#c4d859cc)
   Compiling rand_chacha v0.2.2 (https://github.com/mesalock-linux/rand-sgx?tag=v0.7.3_sgx1.1.3#83583f07)
   Compiling http v0.2.1
   Compiling chrono v0.4.11 (https://github.com/mesalock-linux/chrono-sgx#f964ae7f)
   Compiling rustls v0.16.0 (https://github.com/mesalock-linux/rustls?branch=mesalock_sgx-client-cert-verifier-patch#81834540)
   Compiling webpki-roots v0.21.0 (https://github.com/mesalock-linux/webpki-roots?branch=mesalock_sgx#6ff3be54)
   Compiling idna v0.2.0
   Compiling rand v0.7.3 (https://github.com/mesalock-linux/rand-sgx?tag=v0.7.3_sgx1.1.3#83583f07)
   Compiling yasna v0.3.1 (https://github.com/mesalock-linux/yasna.rs-sgx#a1f50714)
   Compiling regex v1.3.1 (https://github.com/mesalock-linux/regex-sgx#76aef86f)
   Compiling url v2.1.1
   Compiling toml v0.5.3 (https://github.com/mesalock-linux/toml-rs-sgx#5ec3bcf9)
   Compiling uuid v0.8.1 (https://github.com/mesalock-linux/uuid-sgx#9b425a8f)
   Compiling env_logger v0.7.1
   Compiling teaclave_crypto v0.2.0 (/teaclave/build/cmake_tomls/sgx_trusted_lib/crypto)
   Compiling teaclave_types v0.2.0 (/teaclave/build/cmake_tomls/sgx_trusted_lib/types)
   Compiling teaclave_attestation v0.2.0 (/teaclave/build/cmake_tomls/sgx_trusted_lib/attestation)
   Compiling teaclave_rpc v0.2.0 (/teaclave/build/cmake_tomls/sgx_trusted_lib/rpc)
   Compiling teaclave_service_enclave_utils v0.2.0 (/teaclave/build/cmake_tomls/sgx_trusted_lib/services/utils/service_enclave_utils)
   Compiling teaclave_sgx_tool_enclave v0.2.0 (/teaclave/build/cmake_tomls/sgx_trusted_lib/tool/enclave)
    Finished dev [unoptimized + debuginfo] target(s) in 35.28s
[100%] Built target sgxlib-teaclave_sgx_tool
Scanning dependencies of target teaclave_sgx_tool
Updating enclave signatures...
/teaclave/release/services/enclave_info.toml: No such file or directory
CMakeFiles/teaclave_sgx_tool.dir/build.make:61: recipe for target 'teaclave_sgx_tool' failed
make[3]: *** [teaclave_sgx_tool] Error 1
CMakeFiles/Makefile2:1598: recipe for target 'CMakeFiles/teaclave_sgx_tool.dir/all' failed
make[2]: *** [CMakeFiles/teaclave_sgx_tool.dir/all] Error 2
CMakeFiles/Makefile2:1605: recipe for target 'CMakeFiles/teaclave_sgx_tool.dir/rule' failed
make[1]: *** [CMakeFiles/teaclave_sgx_tool.dir/rule] Error 2
Makefile:677: recipe for target 'teaclave_sgx_tool' failed
make: *** [teaclave_sgx_tool] Error 2
```

I expected to see this happen: successfully build teaclave_sgx_tool

Instead, this happened: failed.


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/apache/incubator-teaclave/issues/576

Re: [apache/incubator-teaclave] Failed to directly build `teaclave_sgx_tool` only from scratch (Issue #576)

Posted by Mingshen Sun <no...@github.com.INVALID>.
Closed #576 via #595.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/apache/incubator-teaclave/issues/576#event-5802370092
You are receiving this because you are subscribed to this thread.

Message ID: <ap...@github.com>