Closed xiaonan-INTC closed 2 years ago
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?
Please have a look at #24 and follow steps there, and let me know if this works for you so this issue can be closed.
If problems remain, please post output using ldd
and LD_LIBRARY_PATH
.
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?
Please have a look at #24 and follow steps there, and let me know if this works for you so this issue can be closed.
If problems remain, please post output using
ldd
andLD_LIBRARY_PATH
.
@jovanbulck
Hello, when I did “2. Patch and install SGX SDK”, I met following error:
$sudo service aesmd status
● aesmd.service - Intel(R) Architectural Enclave Service Manager Loaded: loaded (/lib/systemd/system/aesmd.service; disabled; vendor preset: enabled) Active: inactive (dead) 4月 20 01:15:33 systemd[1]: Failed to start Intel(R) Architectural Enclave Servi> 4月 20 01:15:49 systemd[1]: aesmd.service: Scheduled restart job, restart counte> 4月 20 01:15:49 systemd[1]: Stopped Intel(R) Architectural Enclave Service Manag> 4月 20 01:15:49 systemd[1]: Starting Intel(R) Architectural Enclave Service Mana> 4月 20 01:15:49 systemd[588511]: aesmd.service: Failed to determine user credent> 4月 20 01:15:49 systemd[588511]: aesmd.service: Failed at step USER spawning /op> 4月 20 01:15:49 systemd[1]: aesmd.service: Control process exited, code=exited, > 4月 20 01:15:49 systemd[1]: aesmd.service: Failed with result 'exit-code'. 4月 20 01:15:49 systemd[1]: Failed to start Intel(R) Architectural Enclave Servi> 4月 20 01:15:55 systemd[1]: Stopped Intel(R) Architectural Enclave Service Manag>
$sudo service aesmd stop $sudo service aesmd start
Job for aesmd.service failed because the control process exited with error code. See "systemctl status aesmd.service" and "journalctl -xe" for details.
$systemctl status aesmd.service
● aesmd.service - Intel(R) Architectural Enclave Service Manager Loaded: loaded (/lib/systemd/system/aesmd.service; disabled; vendor preset: enabled) Active: activating (auto-restart) (Result: exit-code) since Wed 2022-04-20 01:28:25 CST; 11s ago Process: 658964 ExecStartPre=/opt/intel/sgxpsw/aesm/linksgx.sh (code=exited, status=217/USER)
Then did "3. Build and run test applications", met following error:
[main.c] Creating enclave... [init ../../../psw/ae/aesm_service/source/core/ipc/UnixCommunicationSocket.cpp:225] Failed to connect to socket /var/run/aesmd/aesm.socket Error calling enclave at main.c:120 (rv=0x4001) make: *** [Makefile:45: run] Aborted
Now it seems you linked to all required dependencies, but there seems to be an issue with you SGX PSW installation, as the aesmd
service is not running. The app then crashes naturally as it cannot communicate with the aesmd service.
I am not sure why your SGX PSW is not working, but I expect it is an issue in the linux-sgx project. This service used to crash frequently, and sometimes could be brought up successfully by $sudo service aesmd stop; $sudo service aesmd start
repeatedly until it works.
Also make sure your SGX driver is loaded correctly and check dmesg
?
Hope it helps!
Thanks a lot, @jovanbulck It works now, I re-installed intel sgx at first, then re-installed sgx-step.
Sorry, @jovanbulck
I copy libsgx_urts.so from /opt/intel/sgxsdk/lib64 to the app uses, but met following error:
[main.c] Creating enclave... Please use the correct uRTS library from PSW package. Error calling enclave at main.c:120 (rv=0x1) make: *** [Makefile:45: run] Aborted
Glad to hear re-installing SGX-SDK helped. The last error means you are not linking to the PSW library, but to the SDK one.
Have a look at this issue in the linux-sgx repo:
https://github.com/intel/linux-sgx/issues/47
I think you ought not to link to /opt/intel/sgxsdk/lib64
, and you should definitely not copy files(!)
Normally this is all not needed when you do the $ source /opt/intel/sgxsdk/environment # add to ~/.bashrc to preserve across terminal sessions
from the SGX-Step README before you do the make, and every time you start a new bash session.
Hope it helps. Let me know if things work now, or if problems persist, please output the full exact commands and output, including the output of ldd ./app
Glad to hear re-installing SGX-SDK helped. The last error means you are not linking to the PSW library, but to the SDK one.
Have a look at this issue in the linux-sgx repo:
I think you ought not to link to
/opt/intel/sgxsdk/lib64
, and you should definitely not copy files(!)Normally this is all not needed when you do the
$ source /opt/intel/sgxsdk/environment # add to ~/.bashrc to preserve across terminal sessions
from the SGX-Step README before you do the make, and every time you start a new bash session.Hope it helps. Let me know if things work now, or if problems persist, please output the full exact commands and output, including the output of
ldd ./app
Thank you very much, @jovanbulck it works now!
glad to hear it works now!
After SGX-Step using the latest version v2.14, step 1 and 2 succeeded, but step 3.Build and run test applications has an error:
$ cd app/aep-redirect $ make run
...