Skip To Main Content
Support Knowledge Base

Unable to Compile Intel® Software Guard Extensions (Intel® SGX) Enclave Using the Intel® SGX Trusted Pthread Library

Content Type: Product Information & Documentation   |   Article ID: 000058009   |   Last Reviewed: 04/11/2022

Environment

Ubuntu*

Description

  1. Added -lsgx_pthread to link options in Makefile
  2. Compiler could not find pthread_create() and other pthread function calls

Resolution

  1. Copy sgxsdk/include/sgx_pthread.edl to the Enclave source directory.
  2. In Enclave.edl, add: from "sgx_pthread.edl" import *;
  3. In Enclave.cpp, add: #include "pthread.h"
  4. In Makefile, add -lsgx_pthread to link statement