intel / SGXDataCenterAttestationPrimitives

Other
279 stars 166 forks source link

dcap_quoteverify build fails -- missing include path #424

Closed bvavala closed 1 month ago

bvavala commented 1 month ago

Hi, I am interested in the static versions of the libraries, I noticed a compile issue and I should have spotted where the issue is.

Problem.

ar: creating libsgx_dcap_qvl_attestation.a
ln -sf ../../../QuoteGeneration/build/linux/libsgx_dcap_quoteverify.so ../../../QuoteGeneration/build/linux/libsgx_dcap_quoteverify.so.1
make[3]: Entering directory '/tmp/SGXDataCenterAttestationPrimitives/QuoteVerification/dcap_quoteverify/linux'
../sgx_dcap_pcs_com.cpp:45:10: fatal error: sgx_default_quote_provider.h: No such file or directory
   45 | #include "sgx_default_quote_provider.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

This problem shows up with the DCAP_1.18 tag (DCAP_1.17 works fine) and beyond. Looking at the changes in DCAP_1.18 (https://github.com/intel/SGXDataCenterAttestationPrimitives/commit/6882afad8644c27db162b40994402c8ad2a7fb32#diff-9eb05970f3bf53a41ace7668dd8712b08ae0dfff9456d5e868de3f31ed357d47), it appears that in QuoteVerification/buildenv.mk the -I$(DCAP_QG_DIR)/qpl/inc include path was removed from the following line

QVL_LIB_INC := -I$(QVL_COMMON_PATH)/include -I$(QVL_COMMON_PATH)/include/Utils -I$(QVL_LIB_PATH)/include -I$(QVL_LIB_PATH)/src -I$(QVL_PARSER_PATH)/include -I$(QVL_SRC_PATH)/ThirdParty/rapidjson/include

The library compiles once the include path is restored.

bvavala commented 1 month ago

It turns out that installing libsgx-dcap-default-qpl-dev also results in a successful build, as it provides the required header.

It is not clear however if the build should use the in-repo headers (solution above) or the package-provided headers.

Closing this for now.