Article ID: 000059237 Content Type: Error Messages Last Reviewed: 02/08/2022

Unable to Run the SampleCommonLoader Sample from the Intel® Software Guard Extensions (Intel® SGX) SDK for Linux*

Environment

Intel SGX SDK for Linux 2.13.103.1

Linux*

BUILT IN - ARTICLE INTRO SECOND COMPONENT
Summary

Quick steps to compile and run the SampleCommonLoader in Linux*

Description
  1. Installed the Intel® Software Guard Extensions (Intel® SGX) SDK for Linux*
  2. Ran make in <SGXSDK>/SampleCode/SampleCommonLoader
  3. 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
  1. 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/
  1. Install the libsgx_enclave_common library:
    $sudo apt-get install libsgx-enclave-common
  2. 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
  3. Make and run the sample program:
    $make
    $./sample

Related Products

This article applies to 1 products