apache / incubator-teaclave

Apache Teaclave (incubating) is an open source universal secure computing platform, making computation on privacy-sensitive data safe and simple.
https://teaclave.apache.org
Apache License 2.0
757 stars 159 forks source link

An error occurred while compiling teaclave with docker #708

Closed digitalinformation closed 1 year ago

digitalinformation commented 1 year ago

错误

-- Submodule update fatal: detected dubious ownership in repository at '/teaclave' To add an exception for this directory, call:

git config --global --add safe.directory /teaclave CMake Error at cmake/TeaclaveUtils.cmake:55 (message): git submodule update --init failed with 128, please checkout submodules Call Stack (most recent call first): CMakeLists.txt:52 (init_submodules)

-- Configuring incomplete, errors occurred! See also "/teaclave/build/CMakeFiles/CMakeOutput.log".

henrysun007 commented 1 year ago

Can you post the latest error log after calling git config --global --add safe.directory /teaclave?

digitalinformation commented 1 year ago

Hello, there is no change after entering the command, as follows: QQ图片20230718200532 Here are the error logs: CMakeOutput.log

hiroki-chen commented 1 year ago

@digitalinformation I think you need to execute this command inside docker, not on the host machine. You may change the docker command to

docker run --rm -v $(pwd):/teaclave -w /teaclave \
  -it teaclave/teaclave-build-ubuntu-2004-sgx-2.17.1:0.2.0 \
   bash -c ". /root/.cargo/env && \
     . /opt/sgxsdk/environment && \                        
     mkdir -p build && cd build && \            
     git config --global --add safe.directory '*' && \ # <--- Add this line
     cmake -DTEST_MODE=ON .. && \            
     make -j"

or you can enter docker with an interactive shell like bash or something.

BTW, I think the build documentation on the website should be updated.

digitalinformation commented 1 year ago

I have solved my problem, thank you very much.