Intel® Software Guard Extensions (Intel® SGX)
Discussion board focused on hardware-based isolation and memory encryption to provide extended code protection in solutions.
1540 讨论

Intel SGX, SampleCommonLoader sample code error sgx_enclave_common.h: No such file or directory

donaldi95
新手
2,617 次查看

I wanted also to ask about an error i get.

 

It Is because of a library called sgx_enclave_common.h.

When i run the SampleCommonLoader code sample in HW mode, it gives me the following error:

App/sample.cpp:36:10: fatal error: sgx_enclave_common.h: No such file or directory 36 | #include "sgx_enclave_common.h"

Any idea on what should i do?

PS: I am following the SGX tutorial for Linux 20.04. My laptop had I7-8U generation. SGX is enabled, but it doesn't support DCAP.

Best Regards, Donald

0 项奖励
1 解答
JesusG_Intel
主持人
2,608 次查看

Hello Donald,


Copy sgx_enclave_common.h from <sgxsdk>/include/ to <sgxsdk>/SampleCode/SampleCommonLoader/Include/


Sincerely,

Jesus G.

Intel Customer Support


在原帖中查看解决方案

0 项奖励
5 回复数
JesusG_Intel
主持人
2,609 次查看

Hello Donald,


Copy sgx_enclave_common.h from <sgxsdk>/include/ to <sgxsdk>/SampleCode/SampleCommonLoader/Include/


Sincerely,

Jesus G.

Intel Customer Support


0 项奖励
donaldi95
新手
2,598 次查看

 Hello Jesus G.

 

I did this and i run into an other error.

 

GEN => App/sample.o
GEN => App/enclave_entry.o
/usr/local/bin/ld: cannot find -lsgx_enclave_common
collect2: error: ld returned 1 exit status
make: *** [Makefile:35: sample] Error 1

 

I also did make clean, and when i make again same error.

I did GEN => App/sample.o
GEN => App/enclave_entry.o
/usr/local/bin/ld: cannot find -lsgx_enclave_common
collect2: error: ld returned 1 exit status
make: *** [Makefile:35: sample] Error 1


i also did again Source {sgxsdk}/environent. And nothing changed.

 

Best Regards,

Donald

0 项奖励
JesusG_Intel
主持人
2,588 次查看

Hello Donald,


Check if /usr/lib/x86_64-linux-gnu/libsgx_enclave_common.so exists. If it does not exist, run:

$ sudo ln -s /usr/lib/x86_64-linux-gnu/libsgx_enclave_common.so.1 /usr/lib/x86_64-linux-gnu/libsgx_enclave_common.so


Run make again.


It seems that the SampleCommonLoader sample in the SGX SDK for Linux is buggy. It works fine in Windows.


Please open an issue in https://github.com/intel/linux-sgx/issues detailing these two problems. You will get the attention of the SGX engineering team in Github.


Sincerely,

Jesus G.

Intel Customer Support


donaldi95
新手
2,583 次查看

Hello Jesus G.

 

Thank you so much for your help it finally worked. I will report it on their git repo asap.

 

Best Regards,

Donald

0 项奖励
JesusG_Intel
主持人
2,570 次查看

This thread has been marked as answered and Intel will no longer monitor this thread. If you want a response from Intel in a follow-up question, please open a new thread.


0 项奖励
回复