-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
undefined symbol: sgx_get_aep #24
Comments
HI shujiecui, This error indicates that the linker doesn't find the customly patched SGX SDK. Did you make sure to patch and install the SGX SDK? This should be automatically taken care of when you use the "install_sdk.sh" script. The Makefiles by default expect a system-wide SDK installation under jo@breuer:~$ objdump -D /opt/intel/sgxsdk/lib64/libsgx_urts.so | grep sgx_get_aep
0000000000000ab6 <sgx_get_aep>: Let me know if this works for you! |
Yes, I installed the driver and SDK with the scripts. |
Okay, so since the objdump lists the symbol, patching and installing went fine indeed. Did you make sure to Re C-States and SpeedStep: no, that's not crucial. Not needed at all if you don't do single-stepping and eg only page-table manipulations. In general speedstep may somewhat improve predictability when doing timer-based single-stepping, but I found that this is not required in practice. Current versions of sgx-step furthermore already try to fix the processor clock at runtime through the MSR interface. |
yes, I did all that, but still not work |
Without more information, I can only guess what's going wrong on your system. I suspect you may have another SGX-SDK installed earlier through apt or so that may interfere and leave global symbolic links and make that the default path will not find the patched SDK under /opt/intel/. You should check this and/or provide more details. Particularly, try finding out which dynamic library is being used by jo@breuer:~/sgx-step-fresh/app/aep-redirect$ ldd ./app
linux-vdso.so.1 (0x00007ffebeb60000)
libsgx_urts.so => /usr/lib/libsgx_urts.so (0x00007f8330ee2000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f8330cc3000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f83308d2000)
libsgx_enclave_common.so.1 => /usr/lib/libsgx_enclave_common.so.1 (0x00007f83306cd000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f83304c9000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f8330140000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f832ff28000)
/lib64/ld-linux-x86-64.so.2 (0x00007f833130f000)
libsgx_launch.so.1 => /usr/lib/libsgx_launch.so.1 (0x00007f832fcdd000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f832f93f000)
libprotobuf.so.10 => /usr/lib/x86_64-linux-gnu/libprotobuf.so.10 (0x00007f832f4e6000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f832f2c9000)
jo@breuer:~/sgx-step-fresh/app/aep-redirect$ nm -g /usr/lib/libsgx_urts.so | grep aep
000000000000c070 T sgx_get_aep
000000000000c090 T sgx_set_aep
jo@breuer:~/sgx-step-fresh/app/aep-redirect$ LD_LIBRARY_PATH=/opt/intel/sgxsdk/lib64/ ldd ./app
linux-vdso.so.1 (0x00007ffc2d69c000)
libsgx_urts.so => /opt/intel/sgxsdk/lib64/libsgx_urts.so (0x00007fa3dce26000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fa3dcc07000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fa3dc816000)
/lib64/ld-linux-x86-64.so.2 (0x00007fa3dd231000)
jo@breuer:~/sgx-step-fresh/app/aep-redirect$ nm -g /opt/intel/sgxsdk/lib64/libsgx_urts.so | grep aep
0000000000000ab6 T sgx_get_aep
0000000000000acd T sgx_set_aep |
Aha, you are right. LLD doesn't link to /opt../libsgx_urts.so. Instead, it links to /user/.../libsgx_urts.so, and this one doesn't have sgx_get_aep. |
glad it got figured out, closing this issue ^^ |
Hi there,
I installed SGX-step by following the steps, and tried to test the samples in /app, but I always get the following errors. How could I solve it? Thanks.
./app: symbol lookup error: ./app: undefined symbol: sgx_get_aep
The text was updated successfully, but these errors were encountered: