Open florianbecker opened 4 years ago
What is the version of the SGXSDK under /opt/intel/sgxsdk? From the build log, it should be an old version. Could you please reinstall an updated SDK and then try PSW build?
You are right, the sgxsdk was 2.9 - so installing 2.11 fixes the build error, but not the needed second run of make rpm_psw_pkg to create all psw packages. Is there also a solution to fix this?
Real issue is, that my dockerfile will abort here. PSW 2.9 builded correctly and complete.
but not the needed second run of make rpm_psw_pkg to create all psw packages. Is there also a solution to fix this?
Not very clear about this question. You can try to cleanup your repo and then build again.
This is a dockerfile for sgxsdk and psw build - you can see the build commands and the preinstall things. Dockerfile_rhel82.txt
This will result in: Ausführung(%clean): /bin/sh -e /var/tmp/rpm-tmp.B1ytp3
The container is not build correctly. Also, this happens, if you build it on a fresh RHEL8.2 installation. If you use the sgx_2.9 tag everything is fine. If you build it manually you can just rerun make rpm_psw_pkg and everything seems fine.
Build:
cd /tmp && \ git clone -b sgx_2.11 --depth 1 https://github.com/intel/linux-sgx.git linux-sgx-psw && \ cd linux-sgx-psw && \ ./download_prebuilt.sh && \ make preparation && \ \cp external/toolset/rhel8.2/{as,ld,ld.gold,objdump} /usr/local/bin && \ make -j
nprocrpm_psw_pkg
Will result with aesmd rpm and nothing else - also exit the build with error code: `....
The command '/bin/sh -c cd /tmp && git clone -b sgx_2.11 --depth 1 https://github.com/intel/linux-sgx.git && cd linux-sgx && ./download_prebuilt.sh && make preparation && \cp external/toolset/rhel8.2/{as,ld,ld.gold,objdump} /usr/local/bin && make -j
nprocrpm_sdk_pkg && rpm -i linux/installer/rpm/sdk/sgxsdk-2.11.100.2-1.el8.x86_64.rpm && make -j
nproc` rpm_psw_pkg' returned a non-zero code: 2If you run manually second try:
make -j
nprocrpm_psw_pkg
You will receive this build error: `[ 56%] Building CXX object bundles/epid_quote_service_bundle/CMakeFiles/epid_quote_service_bundle.dir/epid_provision_msg1.cpp.o /tmp/linux-sgx-psw/psw/ae/aesm_service/source/bundles/epid_quote_service_bundle/epid_provision_msg1.cpp: In Funktion »ae_error_t aesm_rsa_oaep_encrypt(const uint8_t, uint32_t, const void, uint8_t)«: /tmp/linux-sgx-psw/psw/ae/aesm_service/source/bundles/epid_quote_service_bundle/epid_provision_msg1.cpp:122:51: Fehler: ungültige Umwandlung von »const void« in »void« [-fpermissive] sgx_status_t res = sgx_rsa_pub_encrypt_sha256(rsa, NULL, &dst_len, src, src_len); ^~~ In file included from /tmp/linux-sgx-psw/psw/ae/aesm_service/source/../../inc/internal/pce_cert.h:34, from /tmp/linux-sgx-psw/psw/ae/aesm_service/source/common/type_length_value.h:78, from /tmp/linux-sgx-psw/psw/ae/aesm_service/source/bundles/epid_quote_service_bundle/epid_provision_msg1.cpp:33: /opt/intel/sgxsdk/include/sgx_tcrypto.h:828:51: Anmerkung: Argument 1 von »sgx_status_t sgx_rsa_pub_encrypt_sha256(void, unsigned char, size_t, const unsigned char, size_t)« wird initialisiert sgx_status_t sgx_rsa_pub_encrypt_sha256(void rsa_key, unsigned char pout_data, size_t pout_len, const unsigned char* pin_data, const size_t pin_len);