I try to compile the wolf ssl with GSX support with SIM mode uver Ubuntu GNU/Linux 16.04 LTS in order to build & run the example in https://github.com/wolfSSL/wolfssl-exam … /SGX_Linux
So far according to the documentation I must compile first the dependency located in https://github.com/wolfSSL/wolfssl/tree … /LINUX-SGX and to do that I must compile the library first in https://github.com/wolfSSL/wolfssl as single threaded according to the documentation. Also I have installed all the SGX dependencies from intel and generally I can run and build applications that run sgx enclaves.
So I order to build the main wolfssl library run the following commands:
./autogen.sh
./configure --enable-examples --enable-crypttests --enable-all --enable-singlethreaded
make
But on the last command I get the follwing error:
make -j2 all-am
make[1]: Entering directory '/home/user/wolfssl'
CC src/src_libwolfssl_la-crl.lo
CC examples/echoserver/echoserver.o
CC examples/server/server.o
src/crl.c: In function ‘InitCRL’:
src/crl.c:62:9: error: implicit declaration of function ‘pthread_cond_init’ [-Werror=implicit-function-declaration]
if (pthread_cond_init(&crl->cond, 0) != 0) {
^
src/crl.c:62:5: error: nested extern declaration of ‘pthread_cond_init’ [-Werror=nested-externs]
if (pthread_cond_init(&crl->cond, 0) != 0) {
^
src/crl.c: In function ‘FreeCRL’:
src/crl.c:174:13: error: implicit declaration of function ‘pthread_join’ [-Werror=implicit-function-declaration]
pthread_join(crl->tid, NULL);
^
src/crl.c:174:13: error: nested extern declaration of ‘pthread_join’ [-Werror=nested-externs]
src/crl.c:179:5: error: implicit declaration of function ‘pthread_cond_destroy’ [-Werror=implicit-function-declaration]
pthread_cond_destroy(&crl->cond);
^
src/crl.c:179:5: error: nested extern declaration of ‘pthread_cond_destroy’ [-Werror=nested-externs]
src/crl.c: In function ‘SignalSetup’:
src/crl.c:506:15: error: implicit declaration of function ‘pthread_cond_signal’ [-Werror=implicit-function-declaration]
ret = pthread_cond_signal(&crl->cond);
^
src/crl.c:506:9: error: nested extern declaration of ‘pthread_cond_signal’ [-Werror=nested-externs]
ret = pthread_cond_signal(&crl->cond);
^
src/crl.c: In function ‘StartMonitorCRL’:
src/crl.c:899:9: error: implicit declaration of function ‘pthread_create’ [-Werror=implicit-function-declaration]
if (pthread_create(&crl->tid, NULL, DoMonitor, crl) != 0) {
^
src/crl.c:899:5: error: nested extern declaration of ‘pthread_create’ [-Werror=nested-externs]
if (pthread_create(&crl->tid, NULL, DoMonitor, crl) != 0) {
^
src/crl.c:911:17: error: implicit declaration of function ‘pthread_cond_wait’ [-Werror=implicit-function-declaration]
if (pthread_cond_wait(&crl->cond, &crl->crlLock) != 0) {
^
src/crl.c:911:13: error: nested extern declaration of ‘pthread_cond_wait’ [-Werror=nested-externs]
if (pthread_cond_wait(&crl->cond, &crl->crlLock) != 0) {
^
CC wolfcrypt/test/testsuite_testsuite_test-test.o
cc1: all warnings being treated as errors
Makefile:3572: recipe for target 'src/src_libwolfssl_la-crl.lo' failed
make[1]: *** [src/src_libwolfssl_la-crl.lo] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/home/user/wolfssl'
Makefile:2247: recipe for target 'all' failed
make: *** [all] Error 2
So I would like to answer me on these questions:
Why I get the error?
How to overcome it?
Did I use wrong flags in the first place?
Thank you beforehand for your help?