Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parallel build broken for PCKRetrievalTool #142

Open
jurobystricky opened this issue Nov 6, 2020 · 2 comments
Open

Parallel build broken for PCKRetrievalTool #142

jurobystricky opened this issue Nov 6, 2020 · 2 comments

Comments

@jurobystricky
Copy link
Contributor

There is a race condition in PCKRetrievalTool Makefile. On my system it is 100% reproducible.
(The build fails on less than 16 CPUs as well)
Steps to reproduce:

$ cd ~/SGXDataCenterAttestationPrimitives/tools/PCKRetrievalTool
$ make clean
$ make -j 16

Edited result:

...
g++ -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -UDEBUG -DNDEBUG -ffunction-sections -fdata-sections -Wall -Wextra -Winit-self -Wpointer-arith -Wreturn-type -Waddress -Wsequence-point -Wformat-security -Wmissing-include-dirs -Wfloat-equal -Wundef -Wshadow -Wcast-align -Wconversion -Wredundant-decls -fPIC -Wno-attributes -I/opt/intel/sgxsdk/include -I./App -I ./App/inc -I ../../QuoteGeneration/common/inc/internal -I ../../QuoteGeneration/quote_wrapper/ql/inc  -I ../../QuoteGeneration/pce_wrapper/inc -I ../../QuoteGeneration/quote_wrapper/common/inc -I ../SGXPlatformRegistration/include -std=c++11 -c App/utility.cpp -o App/utility.o
Enclave/Enclave.cpp:34:10: fatal error: Enclave_t.h: No such file or directory
 #include "Enclave_t.h"
          ^~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:218: Enclave/Enclave.o] Error 1
make: *** Waiting for unfinished jobs....

Running using a single CPU works fine:

$ make clean
$ make

Edited result:

...
Succeed.
SIGN =>  pck_id_retrieval_tool_enclave.signed.so
make -C Qpl/linux
make[1]: Entering directory '/home/juro/pr/SGXDataCenterAttestationPrimitives/tools/PCKRetrievalTool/Qpl/linux'
CXX  <=  ../sgx_quote_provider.cpp
g++ -Wnon-virtual-dtor -std=c++11 ../sgx_quote_provider.o -shared -Wl,-soname=libdcap_quoteprov.so.1 -pthread -Wl,-z,relro,-z,now,-z,noexecstack -Wl,--gc-sections  -L/opt/intel/sgxsdk/lib64 -lpthread -ldl  -Wl,-rpath=. -o libdcap_quoteprov.so.1
make[1]: Leaving directory '/home/juro/pr/SGXDataCenterAttestationPrimitives/tools/PCKRetrievalTool/Qpl/linux'
The project has been built in release hardware mode.

@jsun39
Copy link

jsun39 commented Nov 10, 2020

Thanks for your findings, I will double check it.

@jsun39
Copy link

jsun39 commented Dec 23, 2020

will address it in next release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants