intel / intel/confidential-computing.sgx.sdk

Undefined error in SampleEnclaveGMIPP

Open
#100 2 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
C++
Stars
2
Forks
3
PR merge metrics
No merged PRs in 30d

Description

I'm getting following undefined error even after including IPP header in the Makefile of SampleEnclaveGMIPP.

`/usr/bin/ld: Enclave/Enclave.o: in function `new_ECC_sm2()':
/test/SampleCode/SampleEnclaveGMIPP/Enclave/Enclave.cpp:68: undefined reference to `sgx_disp_ippsECCPGetSizeStdSM2'
/usr/bin/ld: /test/SampleCode/SampleEnclaveGMIPP/Enclave/Enclave.cpp:82: undefined reference to `sgx_disp_ippsECCPInitStdSM2'
/usr/bin/ld: /test/SampleCode/SampleEnclaveGMIPP/Enclave/Enclave.cpp:90: undefined reference to `sgx_disp_ippsECCPSetStdSM2'
/usr/bin/ld: Enclave/Enclave.o: in function `new_ECC_Point()':
/test/SampleCode/SampleEnclaveGMIPP/Enclave/Enclave.cpp:107: undefined reference to `sgx_disp_ippsECCPPointGetSize'
/usr/bin/ld: /test/SampleCode/SampleEnclaveGMIPP/Enclave/Enclave.cpp:119: undefined reference to `sgx_disp_ippsECCPPointInit'
/usr/bin/ld: Enclave/Enclave.o: in function `new_BN(int, unsigned int const*)':
/test/SampleCode/SampleEnclaveGMIPP/Enclave/Enclave.cpp:136: undefined reference to `sgx_disp_ippsBigNumGetSize'
/usr/bin/ld: /test/SampleCode/SampleEnclaveGMIPP/Enclave/Enclave.cpp:148: undefined reference to `sgx_disp_ippsBigNumInit'
/usr/bin/ld: /test/SampleCode/SampleEnclaveGMIPP/Enclave/Enclave.cpp:156: undefined reference to `sgx_disp_ippsSet_BN'
/usr/bin/ld: Enclave/Enclave.o: in function `new_PRNG()':
/test/SampleCode/SampleEnclaveGMIPP/Enclave/Enclave.cpp:168: undefined reference to `sgx_disp_ippsPRNGGetSize'
/usr/bin/ld: /test/SampleCode/SampleEnclaveGMIPP/Enclave/Enclave.cpp:180: undefined reference to `sgx_disp_ippsPRNGInit'
/usr/bin/ld: Enclave/Enclave.o: in function `ecall_sm2':
/test/SampleCode/SampleEnclaveGMIPP/Enclave/Enclave.cpp:234: undefined reference to `sgx_disp_ippsPRNGen'
/usr/bin/ld: /test/SampleCode/SampleEnclaveGMIPP/Enclave/Enclave.cpp:252: undefined reference to `sgx_disp_ippsMod_BN'
/usr/bin/ld: /test/SampleCode/SampleEnclaveGMIPP/Enclave/Enclave.cpp:286: undefined reference to `sgx_disp_ippsPRNGen'
/usr/bin/ld: /test/SampleCode/SampleEnclaveGMIPP/Enclave/Enclave.cpp:286: undefined reference to `sgx_disp_ippsECCPGenKeyPair'
/usr/bin/ld: /test/SampleCode/SampleEnclaveGMIPP/Enclave/Enclave.cpp:292: undefined reference to `sgx_disp_ippsPRNGen'
/usr/bin/ld: /test/SampleCode/SampleEnclaveGMIPP/Enclave/Enclave.cpp:292: undefined reference to `sgx_disp_ippsECCPGenKeyPair'
/usr/bin/ld: /test/SampleCode/SampleEnclaveGMIPP/Enclave/Enclave.cpp:300: undefined reference to `sgx_disp_ippsECCPSetKeyPair'
/usr/bin/ld: /test/SampleCode/SampleEnclaveGMIPP/Enclave/Enclave.cpp:318: undefined reference to `sgx_disp_ippsECCPSignSM2'
/usr/bin/ld: /test/SampleCode/SampleEnclaveGMIPP/Enclave/Enclave.cpp:326: undefined reference to `sgx_disp_ippsECCPSetKeyPair'
/usr/bin/ld: /test/SampleCode/SampleEnclaveGMIPP/Enclave/Enclave.cpp:332: undefined reference to `sgx_disp_ippsECCPVerifySM2'
/usr/bin/ld: Enclave/Enclave.o: in function `ecall_sm3':
/test/SampleCode/SampleEnclaveGMIPP/Enclave/Enclave.cpp:370: undefined reference to `sgx_disp_ippsSM3GetSize'
/usr/bin/ld: /test/SampleCode/SampleEnclaveGMIPP/Enclave/Enclave.cpp:386: undefined reference to `sgx_disp_ippsSM3Init'
/usr/bin/ld: /test/SampleCode/SampleEnclaveGMIPP/Enclave/Enclave.cpp:395: undefined reference to `sgx_disp_ippsSM3Update'
/usr/bin/ld: /test/SampleCode/SampleEnclaveGMIPP/Enclave/Enclave.cpp:404: undefined reference to `sgx_disp_ippsSM3GetTag'
/usr/bin/ld: /test/SampleCode/SampleEnclaveGMIPP/Enclave/Enclave.cpp:413: undefined reference to `sgx_disp_ippsSM3Final'
/usr/bin/ld: Enclave/Enclave.o: in function `ecall_sm4_cbc':
/test/SampleCode/SampleEnclaveGMIPP/Enclave/Enclave.cpp:455: undefined reference to `sgx_disp_ippsSMS4GetSize'
/usr/bin/ld: /test/SampleCode/SampleEnclaveGMIPP/Enclave/Enclave.cpp:471: undefined reference to `sgx_disp_ippsSMS4Init'
/usr/bin/ld: /test/SampleCode/SampleEnclaveGMIPP/Enclave/Enclave.cpp:479: undefined reference to `sgx_disp_ippsSMS4EncryptCBC'
/usr/bin/ld: /test/SampleCode/SampleEnclaveGMIPP/Enclave/Enclave.cpp:485: undefined reference to `sgx_disp_ippsSMS4DecryptCBC'
/usr/bin/ld: Enclave/Enclave.o: in function `ecall_sm4_ctr':
/test/SampleCode/SampleEnclaveGMIPP/Enclave/Enclave.cpp:528: undefined reference to `sgx_disp_ippsSMS4GetSize'
/usr/bin/ld: /test/SampleCode/SampleEnclaveGMIPP/Enclave/Enclave.cpp:544: undefined reference to `sgx_disp_ippsSMS4Init'
/usr/bin/ld: /test/SampleCode/SampleEnclaveGMIPP/Enclave/Enclave.cpp:555: undefined reference to `sgx_disp_ippsSMS4EncryptCTR'
/usr/bin/ld: /test/SampleCode/SampleEnclaveGMIPP/Enclave/Enclave.cpp:564: undefined reference to `sgx_disp_ippsSMS4DecryptCTR'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:255: enclave.so] Error 1`

For some of the functions, I get deprecated warning like below
`Enclave/Enclave.cpp:68:41: warning: 'IppStatus sgx_disp_ippsECCPGetSizeStdSM2(int*)' is deprecated: is deprecated. This API is considered obsolete and will be removed in one of future Intel IPP Cryptography releases. Use the following link for opening a ticket and providing feedback: https://supporttickets.intel.com/ if you have concerns.`

OS: Debian GNU/Linux 11 (bullseye)
SDK version: 2.15.1

Contributor guide

Open the contributing guide

Research direction

Start with SampleEnclaveGMIPP/Makefile and the enclave.so link step, then compare its IPP-related link settings with the calls in Enclave/Enclave.cpp. Rebuild the sample and verify that the undefined sgx_disp_ipps symbols no longer occur and that the enclave links successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
build-system, cryptography
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.