- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
OS: ubuntu 16.04
GCC/G++: 5.5 and 7.4
SGX SDK: 2.6.100.51363
When compile the sample code(path/to/sgx-sdk/installation/directory/SampleCode/SealedData) on ubuntu 16.04, run below command:
make SGX_MODE=SIM
I met some errors like below:
make[1]: Entering directory '/usr/local/intel-sgx-sdk/sgxsdk/SampleCode/SealedData'
GEN => DRM_app/DRM_enclave_u.h
CC <= DRM_app/DRM_enclave_u.c
In file included from /usr/include/x86_64-linux-gnu/c++/5/bits/gthr.h:148:0,
from /usr/include/c++/5/ext/atomicity.h:35,
from /usr/include/c++/5/bits/ios_base.h:39,
from /usr/include/c++/5/ios:42,
from /usr/include/c++/5/ostream:38,
from /usr/include/c++/5/iostream:39,
from DRM_app/TimeBasedDRM.cpp:38:
/usr/include/x86_64-linux-gnu/c++/5/bits/gthr-default.h:101:1: error: ‘pthread_once’ was not declared in this scope
__gthrw(pthread_once)
^
/usr/include/x86_64-linux-gnu/c++/5/bits/gthr-default.h:102:1: error: ‘pthread_getspecific’ was not declared in this scope
__gthrw(pthread_getspecific)
^
/usr/include/x86_64-linux-gnu/c++/5/bits/gthr-default.h:103:1: error: ‘pthread_setspecific’ was not declared in this scope
__gthrw(pthread_setspecific)
^
/usr/include/x86_64-linux-gnu/c++/5/bits/gthr-default.h:105:1: error: ‘pthread_create’ was not declared in this scope
__gthrw(pthread_create)
^
........................
/usr/include/x86_64-linux-gnu/c++/5/bits/gthr-default.h: In function ‘int __gthread_create(__gthread_t*, void* (*)(void*), void*)’:
/usr/include/x86_64-linux-gnu/c++/5/bits/gthr-default.h:662:68: error: ‘__gthrw_pthread_create’ cannot be used as a function
return __gthrw_(pthread_create) (__threadid, NULL, __func, __args);
^
/usr/include/x86_64-linux-gnu/c++/5/bits/gthr-default.h: In function ‘int __gthread_join(__gthread_t, void**)’:
/usr/include/x86_64-linux-gnu/c++/5/bits/gthr-default.h:668:57: error: ‘__gthrw_pthread_join’ cannot be used as a function
return __gthrw_(pthread_join) (__threadid, __value_ptr);
^
........................
Makefile:234: recipe for target 'DRM_app/TimeBasedDRM.o' failed
make[1]: *** [DRM_app/TimeBasedDRM.o] Error 1
make[1]: Leaving directory '/usr/local/intel-sgx-sdk/sgxsdk/SampleCode/SealedData'
Makefile:186: recipe for target 'all' failed
make: *** [all] Error 2
I tried to upgrade gcc and g++ version to 7.4 and recompile, but same errors still met.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
After I deleted the file "/path/to/sgx-sdk/install/dir/include/pthread.h", compile successfully.
![](/skins/images/C4F7392A5C68ACA60290C9576F107044/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page