intel / linux-sgx

Intel SGX for Linux*
https://www.intel.com/content/www/us/en/developer/tools/software-guard-extensions/linux-overview.html
Other
1.33k stars 544 forks source link

Build fails on Ubuntu 18.04 #707

Closed jtakeshi-nd closed 3 years ago

jtakeshi-nd commented 3 years ago

Compiling fails after update on Ubuntu 18.04 with in-kernel driver. "make sdk_install_pkg" gives the following error: ipp/ipp_disp/ippcpsgx_disp00389.c:53:18: error: conflicting types for ‘sgx_disp_ippsECCPSignSM2’

IPPFUN(IppStatus,sgx_disp_ippsECCPSignSM2,(const IppsBigNumState pMsgDigest, const IppsBigNumState pRegPrivate, IppsBigNumState pEphPrivate, IppsBigNumState pSignR, IppsBigNumState pSignS, IppsECCPState pEC))

              ^

ipp/ipp_disp/ippcpsgx_disp00389.c:34:55: note: in definition of macro ‘IPPFUN’

define IPPFUN(type,name,arg) extern type IPP_STDCALL name arg

                                                   ^~~~

In file included from /home/jtakeshi/linux-sgx/external/ippcp_internal/inc/ippcp.h:58:0, from ipp/ipp_disp/ippcpsgx_disp00389.c:32:

/home/jtakeshi/linux-sgx/external/ippcp_internal/inc/sgx_ippcp.h:428:27: note: previous declaration of ‘sgx_disp_ippsECCPSignSM2’ was here

define ippsECCPSignSM2 sgx_disp_ippsECCPSignSM2

                       ^

/home/jtakeshi/linux-sgx/external/ippcp_internal/inc/ippcpdefs.h:72:63: note: in definition of macro ‘IPPAPI’

 #define   IPPAPI( type,name,arg )        type IPP_STDCALL name arg;
                                                           ^~~~

/home/jtakeshi/linux-sgx/external/ippcp_internal/inc/ippcp.h:1125:19: note: in expansion of macro ‘ippsECCPSignSM2’

IPPAPI(IppStatus, ippsECCPSignSM2,(const IppsBigNumState* pMsgDigest, ^~~~~~~

Full output is attached. SDK and PSW were successfully built on this machine before, so the error is due to an update. out.txt

lzha101 commented 3 years ago

Seems you forgot to download the prebuilt packages for latest release. So the header file 'ippcp.h' in your repo is old and not compatible with latest code. Please run "make preparation" to refresh the prebuilt packages before build SGX. To avoid other potential issues, suggest to make your code repo clean before build.

jtakeshi-nd commented 3 years ago

Seems you forgot to download the prebuilt packages for latest release. So the header file 'ippcp.h' in your repo is old and not compatible with latest code. Please run "make preparation" to refresh the prebuilt packages before build SGX. To avoid other potential issues, suggest to make your code repo clean before build.

This fixed it, though I had to delete my existing local repository and repull.