Quick step to set environment variables before compiling and running Intel® Software Guard Extensions (Intel® SGX) applications
The sample code in the Intel® Software Guard Extensions (Intel® SGX) SDK does not compile, even after installing the SDK at /opt/intel/sgxsdk.
Error:
/usr/bin/ld: warning: libsgx_uae_service_sim.so, needed by /opt/intel/sgxsdk/lib64/libsgx_urts_sim.so, not found
(try using -rpath or -rpath-link)
/opt/intel/sgxsdk/lib64/libsgx_urts_sim.so: undefined reference to `get_launch_token'
collect2: error: ld returned 1 exit status
Makefile:235: recipe for target 'app' failed
make[1]: * [app]
Error 1 make[1]: Leaving directory '/opt/intel/sgxsdk/SampleCode/SampleEnclave'
Makefile:180: recipe for target 'all' failed make: * [all] Error 2
Before compiling or running an Intel® Software Guard Extensions (Intel® SGX) application, source the Intel SGX SDK environment file to set the correct paths to the Intel SGX libraries that are required to compile and link enclaves:
$source /opt/intel/sgxsdk/environment