CCF
CCF copied to clipboard
Error building CCF with ninja
trafficstars
Describe the bug
I am trying to build CCF from source. I am using the docker ghcr.io/microsoft/ccf/ci/default:build-25-07-2024. I have installed open-enclave sdk inside the docker. Further, I am using ccf-5.0.6 release for the build. I am getting the following error when running ninja
root@0e857000726d:~/CCF/build# ninja
[538/720] Generating signing_key.pem
Generating RSA private key, 3072 bit long modulus (2 primes)
..................................................++++*......++++*..............................................................++++
......++++
e is 3 (0x03)
[539/720] Generating code from EDL, and renaming to .cpp
Generating edge routine, for the Open Enclave SDK.
Processing /root/CCF/edl/ccf.edl.
Processing /opt/openenclave/include/openenclave/edl/sgx/platform.edl.
Processing /opt/openenclave/include/openenclave/edl/sgx/attestation.edl.
Processing /opt/openenclave/include/openenclave/edl/sgx/cpu.edl.
Processing /opt/openenclave/include/openenclave/edl/sgx/debug.edl.
Processing /opt/openenclave/include/openenclave/edl/sgx/thread.edl.
Processing /opt/openenclave/include/openenclave/edl/sgx/switchless.edl.
Processing /opt/openenclave/include/openenclave/edl/sgx/tdx_verification.edl.
Processing /opt/openenclave/include/openenclave/edl/time.edl.
Success.
[544/720] Building CXX object CMakeFiles/js_generic.enclave.dir/src/apps/js_generic/js_generic.cpp.o
FAILED: CMakeFiles/js_generic.enclave.dir/src/apps/js_generic/js_generic.cpp.o
/usr/bin/c++ -DCCF_DISABLE_VERBOSE_LOGGING -DCCF_LOGGER_NO_DEPRECATE -DHAVE_ARPA_INET_H=1 -DINSIDE_ENCLAVE -DNGHTTP2_STATICLIB -DOE_BUILD_ENCLAVE -DPLATFORM_SGX -DSGX_ATTESTATION_VERIFICATION -D_LIBCPP_HAS_THREAD_API_PTHREAD -Djs_generic_enclave_EXPORTS -I../include -I../src -I../3rdparty/exported/QCBOR -I../3rdparty/exported/t_cose/inc -I../3rdparty/exported/quickjs -I../3rdparty/exported/nghttp2/includes -isystem ../3rdparty/exported -isystem ../3rdparty/internal -isystem /opt/openenclave/include -isystem /opt/openenclave/include/openenclave/3rdparty/libcxx -isystem /opt/openenclave/include/openenclave/3rdparty/libc -isystem /opt/openenclave/include/openenclave/3rdparty/openssl_3 -isystem /opt/openenclave/include/openenclave/3rdparty -isystem generated -O2 -g -DNDEBUG -fPIC -fcolor-diagnostics -Wall -Wextra -Werror -Wundef -Wpedantic -Wno-unused -Wno-unused-parameter -Wshadow -mlvi-cfi -nostdinc -nostdinc++ -m64 -fPIE -fstack-protector-strong -fvisibility=hidden -fno-omit-frame-pointer -ffunction-sections -fdata-sections -ftls-model=local-exec -DCONFIG_VERSION=\"2024-01-13\" -DEMSCRIPTEN -DCONFIG_STACK_CHECK -DCONFIG_BIGNUM -std=gnu++2a -MD -MT CMakeFiles/js_generic.enclave.dir/src/apps/js_generic/js_generic.cpp.o -MF CMakeFiles/js_generic.enclave.dir/src/apps/js_generic/js_generic.cpp.o.d -o CMakeFiles/js_generic.enclave.dir/src/apps/js_generic/js_generic.cpp.o -c ../src/apps/js_generic/js_generic.cpp
clang: error: unknown argument: '-mlvi-cfi'
[557/720] Building CXX object CMakeFiles/frontend_test.dir/src/node/rpc/test/frontend_test.cpp.o
ninja: build stopped: subcommand failed.
root@0e857000726d:~/CCF/build#
To Reproduce
docker run -it --privileged ghcr.io/microsoft/ccf/ci/default:build-25-07-2024- Install
open-enclaveinside docker. Note that I had to--force-overwritethe latest version of open-enclave. - clone CCF repo from github and checkout ccf-5.0.6
cmake -GNinja ..ninja
Expected behavior All the builds should be completed successfully.
Environment information
- CCF v5.0.6
- docker environment
-root@0e857000726d:~/CCF/build# c++ --version
clang version 10.0.0-4ubuntu1
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Additional context
openenclave is present in /opt/openenclave