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/06/17 04:06:01 UTC

[GitHub] [incubator-teaclave] yc-huang commented on issue #360: build error while following the document

yc-huang commented on issue #360:
URL: https://github.com/apache/incubator-teaclave/issues/360#issuecomment-645135037


   Following is the log with VERBOSE=1, thanks for you help:
   -----------------------------------------------------
   docker run --rm -v $(pwd):/teaclave -w /teaclave \
   >   -it teaclave/teaclave-build-ubuntu-1804-sgx-2.9.1:latest \
   >    bash -c ". /root/.cargo/env && \
   >      . /opt/sgxsdk/environment && \
   >      mkdir -p build && cd build && \
   >      cmake -DTEST_MODE=ON -DSGX_SIM_MODE=ON .. && \
   >      make"
   -- Submodule update
   SGX_SDK=/opt/sgxsdk
   SGX_MODE=SW
   RUSTUP_TOOLCHAIN=nightly-2020-04-07
   DCAP=OFF
   BUILD_TYPE=debug
   TEACLAVE_SYMLINKS=/tmp/teaclave_symlinks.3wK9WFJtKIG8
   -- ====== /teaclave/build/environment GENERATED ======
   -- Configuring done
   -- Generating done
   -- Build files have been written to: /teaclave/build
   [  0%] Built target prep
   [ 12%] Built target pycomponent
   [ 16%] Building sgxlib-teaclave_unit_tests, enclave info to /teaclave/build/intermediate/teaclave_unit_tests_enclave_info.toml
      Compiling crc v2.0.0
   error: could not compile `crc`.
   
   Caused by:
     process didn't exit successfully: `/teaclave/cmake/scripts/rustc_wrapper.sh --crate-name crc --edition=2018 /teaclave/build/cmake_tomls/sgx_trusted_lib/third_party/crates-sgx/vendor/crc/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C debuginfo=2 -C metadata=00442ba3caacd126 -C extra-filename=-00442ba3caacd126 --out-dir /teaclave/build/target/trusted/debug/deps -L dependency=/teaclave/build/target/trusted/debug/deps --cap-lints allow --cfg test_mode --cfg sgx_sim --cfg test_mode` (signal: 9, SIGKILL: kill)
   /usr/bin/ld: cannot find -lteaclave_unit_tests_enclave
   collect2: error: ld returned 1 exit status
   CMakeFiles/sgxlib-teaclave_unit_tests.dir/build.make:57: recipe for target 'CMakeFiles/sgxlib-teaclave_unit_tests' failed
   make[2]: *** [CMakeFiles/sgxlib-teaclave_unit_tests] Error 1
   CMakeFiles/Makefile2:68: recipe for target 'CMakeFiles/sgxlib-teaclave_unit_tests.dir/all' failed
   make[1]: *** [CMakeFiles/sgxlib-teaclave_unit_tests.dir/all] Error 2
   Makefile:83: recipe for target 'all' failed
   make: *** [all] Error 2
   [centos@ip-172-31-19-164 incubator-teaclave]$ docker run --rm -v $(pwd):/teaclave -w /teaclave \
   >    -it teaclave/teaclave-build-ubuntu-1804-sgx-2.9.1:latest \
   >     bash -c ". /root/.cargo/env && \
   >       . /opt/sgxsdk/environment && \
   >       mkdir -p build && cd build && \
   >       cmake -DTEST_MODE=ON -DSGX_SIM_MODE=ON .. && \
   >       make VERBOSE=1"
   -- Submodule update
   SGX_SDK=/opt/sgxsdk
   SGX_MODE=SW
   RUSTUP_TOOLCHAIN=nightly-2020-04-07
   DCAP=OFF
   BUILD_TYPE=debug
   TEACLAVE_SYMLINKS=/tmp/teaclave_symlinks.yV1IxJrrQAGG
   -- ====== /teaclave/build/environment GENERATED ======
   -- Configuring done
   -- Generating done
   -- Build files have been written to: /teaclave/build
   /usr/bin/cmake -H/teaclave -B/teaclave/build --check-build-system CMakeFiles/Makefile.cmake 0
   /usr/bin/cmake -E cmake_progress_start /teaclave/build/CMakeFiles /teaclave/build/CMakeFiles/progress.marks
   make -f CMakeFiles/Makefile2 all
   make[1]: Entering directory '/teaclave/build'
   make -f CMakeFiles/prep.dir/build.make CMakeFiles/prep.dir/depend
   make[2]: Entering directory '/teaclave/build'
   cd /teaclave/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /teaclave /teaclave /teaclave/build /teaclave/build /teaclave/build/CMakeFiles/prep.dir/DependInfo.cmake --color=
   make[2]: Leaving directory '/teaclave/build'
   make -f CMakeFiles/prep.dir/build.make CMakeFiles/prep.dir/build
   make[2]: Entering directory '/teaclave/build'
   /usr/bin/cmake -E env TEACLAVE_PROJECT_ROOT=/teaclave TEACLAVE_BUILD_ROOT=/teaclave/build TEACLAVE_OUT_DIR=/teaclave/build/intermediate TEACLAVE_SERVICE_INSTALL_DIR=/teaclave/release/services TEACLAVE_EXAMPLE_INSTALL_DIR=/teaclave/release/examples TEACLAVE_BIN_INSTALL_DIR=/teaclave/release/bin TEACLAVE_CLI_INSTALL_DIR=/teaclave/release/cli TEACLAVE_DCAP_INSTALL_DIR=/teaclave/release/dcap TEACLAVE_LIB_INSTALL_DIR=/teaclave/release/lib TEACLAVE_DOC_INSTALL_DIR=/teaclave/release/docs TEACLAVE_TEST_INSTALL_DIR=/teaclave/release/tests TEACLAVE_AUDITORS_DIR=/teaclave/release/services/auditors TEACLAVE_EXAMPLE_AUDITORS_DIR=/teaclave/release/examples/auditors TEACLAVE_TARGET_DIR=/teaclave/build/target TEACLAVE_CFG_DIR=/teaclave TEACLAVE_BUILD_CFG_DIR=/teaclave TEACLAVE_EDL_DIR=/teaclave/edl TEACLAVE_SYMLINKS=/tmp/teaclave_symlinks.yV1IxJrrQAGG SGX_SDK=/opt/sgxsdk SGX_MODE=SW DCAP=OFF ENCLAVE_OUT_DIR=/teaclave/build/intermediate RUSTUP_TOOLCHAIN=nightly-2020-04-07 RUST_SGX_SDK=/teaclave/third_party/rust-sgx-sdk MT_SCRIPT_DIR=/teaclave/cmake/scripts MT_SGXAPP_TOML_DIR=/teaclave/build/cmake_tomls/sgx_untrusted_app CARGO_INCREMENTAL= CMAKE_C_COMPILER=/usr/bin/cc CC=/teaclave/cmake/scripts/cc_wrapper.sh MT_RUSTC_WRAPPER=/teaclave/cmake/scripts/rustc_wrapper.sh CMAKE_SOURCE_DIR=/teaclave CMAKE_BINARY_DIR=/teaclave/build MESAPY_VERSION=eb769f13d6f9947b62aa04c2fb34496082bdadeb SGX_EDGER8R=/opt/sgxsdk/bin/x64/sgx_edger8r CMAKE_AR=/usr/bin/ar DCAP=OFF SGX_UNTRUSTED_CFLAGS=-m64\ -O2\ -fPIC\ -Wno-attributes\ -I/opt/sgxsdk/include\ -I/teaclave/third_party/rust-sgx-sdk/edl SGX_TRUSTED_CFLAGS=-m64\ -O2\ -nostdinc\ -fvisibility=hidden\ -fpie\ -fstack-protector\ -I/teaclave/third_party/rust-sgx-sdk/edl\ -I/teaclave/third_party/rust-sgx-sdk/common/inc\ -I/opt/sgxsdk/include\ -I/opt/sgxsdk/include/tlibc\ -I/opt/sgxsdk/include/stlport\ -I/opt/sgxsdk/include/epid /teaclave/cmake/scripts/prep.sh
   make[2]: Leaving directory '/teaclave/build'
   [  0%] Built target prep
   make -f CMakeFiles/pycomponent.dir/build.make CMakeFiles/pycomponent.dir/depend
   make[2]: Entering directory '/teaclave/build'
   cd /teaclave/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /teaclave /teaclave /teaclave/build /teaclave/build /teaclave/build/CMakeFiles/pycomponent.dir/DependInfo.cmake --color=
   make[2]: Leaving directory '/teaclave/build'
   make -f CMakeFiles/pycomponent.dir/build.make CMakeFiles/pycomponent.dir/build
   make[2]: Entering directory '/teaclave/build'
   make[2]: Nothing to be done for 'CMakeFiles/pycomponent.dir/build'.
   make[2]: Leaving directory '/teaclave/build'
   [ 12%] Built target pycomponent
   make -f CMakeFiles/sgxlib-teaclave_unit_tests.dir/build.make CMakeFiles/sgxlib-teaclave_unit_tests.dir/depend
   make[2]: Entering directory '/teaclave/build'
   cd /teaclave/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /teaclave /teaclave /teaclave/build /teaclave/build /teaclave/build/CMakeFiles/sgxlib-teaclave_unit_tests.dir/DependInfo.cmake --color=
   make[2]: Leaving directory '/teaclave/build'
   make -f CMakeFiles/sgxlib-teaclave_unit_tests.dir/build.make CMakeFiles/sgxlib-teaclave_unit_tests.dir/build
   make[2]: Entering directory '/teaclave/build'
   [ 16%] Building sgxlib-teaclave_unit_tests, enclave info to /teaclave/build/intermediate/teaclave_unit_tests_enclave_info.toml
   cd /teaclave/build/cmake_tomls/sgx_trusted_lib && /usr/bin/cmake -E env TEACLAVE_PROJECT_ROOT=/teaclave TEACLAVE_BUILD_ROOT=/teaclave/build TEACLAVE_OUT_DIR=/teaclave/build/intermediate TEACLAVE_SERVICE_INSTALL_DIR=/teaclave/release/services TEACLAVE_EXAMPLE_INSTALL_DIR=/teaclave/release/examples TEACLAVE_BIN_INSTALL_DIR=/teaclave/release/bin TEACLAVE_CLI_INSTALL_DIR=/teaclave/release/cli TEACLAVE_DCAP_INSTALL_DIR=/teaclave/release/dcap TEACLAVE_LIB_INSTALL_DIR=/teaclave/release/lib TEACLAVE_DOC_INSTALL_DIR=/teaclave/release/docs TEACLAVE_TEST_INSTALL_DIR=/teaclave/release/tests TEACLAVE_AUDITORS_DIR=/teaclave/release/services/auditors TEACLAVE_EXAMPLE_AUDITORS_DIR=/teaclave/release/examples/auditors TEACLAVE_TARGET_DIR=/teaclave/build/target TEACLAVE_CFG_DIR=/teaclave TEACLAVE_BUILD_CFG_DIR=/teaclave TEACLAVE_EDL_DIR=/teaclave/edl TEACLAVE_SYMLINKS=/tmp/teaclave_symlinks.yV1IxJrrQAGG SGX_SDK=/opt/sgxsdk SGX_MODE=SW DCAP=OFF ENCLAVE_OUT_DIR=/teaclave/build/intermediate RUSTUP_TOOLCHAIN=nightly-2020-04-07 RUST_SGX_SDK=/teaclave/third_party/rust-sgx-sdk MT_SCRIPT_DIR=/teaclave/cmake/scripts MT_SGXAPP_TOML_DIR=/teaclave/build/cmake_tomls/sgx_untrusted_app CARGO_INCREMENTAL= CMAKE_C_COMPILER=/usr/bin/cc CC=/teaclave/cmake/scripts/cc_wrapper.sh MT_RUSTC_WRAPPER=/teaclave/cmake/scripts/rustc_wrapper.sh RUSTFLAGS=\ --cfg\ test_mode\ --cfg\ sgx_sim\ --cfg\ test_mode /teaclave/cmake/scripts/cargo_build_ex.sh -p teaclave_unit_tests_enclave --target-dir /teaclave/build/target/trusted -Z package-features --features mesalock_sgx
      Compiling crc v2.0.0
   error: could not compile `crc`.
   
   Caused by:
     process didn't exit successfully: `/teaclave/cmake/scripts/rustc_wrapper.sh --crate-name crc --edition=2018 /teaclave/build/cmake_tomls/sgx_trusted_lib/third_party/crates-sgx/vendor/crc/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C debuginfo=2 -C metadata=00442ba3caacd126 -C extra-filename=-00442ba3caacd126 --out-dir /teaclave/build/target/trusted/debug/deps -L dependency=/teaclave/build/target/trusted/debug/deps --cap-lints allow --cfg test_mode --cfg sgx_sim --cfg test_mode` (signal: 9, SIGKILL: kill)
   cd /teaclave/build/cmake_tomls/sgx_trusted_lib && /usr/bin/cmake -E env TEACLAVE_PROJECT_ROOT=/teaclave TEACLAVE_BUILD_ROOT=/teaclave/build TEACLAVE_OUT_DIR=/teaclave/build/intermediate TEACLAVE_SERVICE_INSTALL_DIR=/teaclave/release/services TEACLAVE_EXAMPLE_INSTALL_DIR=/teaclave/release/examples TEACLAVE_BIN_INSTALL_DIR=/teaclave/release/bin TEACLAVE_CLI_INSTALL_DIR=/teaclave/release/cli TEACLAVE_DCAP_INSTALL_DIR=/teaclave/release/dcap TEACLAVE_LIB_INSTALL_DIR=/teaclave/release/lib TEACLAVE_DOC_INSTALL_DIR=/teaclave/release/docs TEACLAVE_TEST_INSTALL_DIR=/teaclave/release/tests TEACLAVE_AUDITORS_DIR=/teaclave/release/services/auditors TEACLAVE_EXAMPLE_AUDITORS_DIR=/teaclave/release/examples/auditors TEACLAVE_TARGET_DIR=/teaclave/build/target TEACLAVE_CFG_DIR=/teaclave TEACLAVE_BUILD_CFG_DIR=/teaclave TEACLAVE_EDL_DIR=/teaclave/edl TEACLAVE_SYMLINKS=/tmp/teaclave_symlinks.yV1IxJrrQAGG SGX_SDK=/opt/sgxsdk SGX_MODE=SW DCAP=OFF ENCLAVE_OUT_DIR=/teaclave/build/intermediate RUSTUP_TOOLCHAIN=nightly-2020-04-07 RUST_SGX_SDK=/teaclave/third_party/rust-sgx-sdk MT_SCRIPT_DIR=/teaclave/cmake/scripts MT_SGXAPP_TOML_DIR=/teaclave/build/cmake_tomls/sgx_untrusted_app CARGO_INCREMENTAL= CMAKE_C_COMPILER=/usr/bin/cc CC=/teaclave/cmake/scripts/cc_wrapper.sh MT_RUSTC_WRAPPER=/teaclave/cmake/scripts/rustc_wrapper.sh SGX_LIBRARY_PATH=/opt/sgxsdk/lib64 SGX_ENCLAVE_SIGNER=/opt/sgxsdk/bin/x64/sgx_sign Service_Library_Name=sgx_tservice_sim Trts_Library_Name=sgx_trts_sim TRUSTED_TARGET_DIR=/teaclave/build/target/trusted TARGET=debug SGX_COMMON_CFLAGS=-m64\ -O2 CUR_PKG_NAME=teaclave_unit_tests_enclave CUR_PKG_PATH=tests/unit/enclave CUR_INSTALL_DIR=/teaclave/release/tests /teaclave/cmake/scripts/sgx_link_sign.sh Enclave_fa_t
   /usr/bin/ld: cannot find -lteaclave_unit_tests_enclave
   collect2: error: ld returned 1 exit status
   CMakeFiles/sgxlib-teaclave_unit_tests.dir/build.make:57: recipe for target 'CMakeFiles/sgxlib-teaclave_unit_tests' failed
   make[2]: *** [CMakeFiles/sgxlib-teaclave_unit_tests] Error 1
   make[2]: Leaving directory '/teaclave/build'
   CMakeFiles/Makefile2:68: recipe for target 'CMakeFiles/sgxlib-teaclave_unit_tests.dir/all' failed
   make[1]: *** [CMakeFiles/sgxlib-teaclave_unit_tests.dir/all] Error 2
   make[1]: Leaving directory '/teaclave/build'
   Makefile:83: recipe for target 'all' failed
   make: *** [all] Error 2


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