Summary
Quick steps to compile and run the SampleCommonLoader in Linux*
Description
- Installed the Intel® Software Guard Extensions (Intel® SGX) SDK for Linux*
- Ran make in <SGXSDK>/SampleCode/SampleCommonLoader
- Received errors:
- App/sample.cpp:36:10: fatal error: sgx_enclave_common.h: No such file or directory 36 | #include "sgx_enclave_common.h"
- /usr/local/bin/ld: cannot find -lsgx_enclave_common
Resolution
- Copy sgx_encalve_common.h from the SGX SDK's include directory to the SampleCommonLoader's include directory:
$cp <SGXSDK>/include/sgx_enclave_common.h <SGXSDK>/SampleCode/SampleCommonLoader/Include/
- Install the libsgx_enclave_common library:
$sudo apt-get install libsgx-enclave-common - If /usr/lib/x86_64-linux-gnu/libsgx_enclave_common.so 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 - Make and run the sample program:
$make
$./sample