Giter Club home page Giter Club logo

Comments (8)

xiaonan-INTC avatar xiaonan-INTC commented on May 27, 2024 1

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:

intel/linux-sgx#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

Thank you very much, @jovanbulck it works now!

from sgx-step.

jovanbulck avatar jovanbulck commented on May 27, 2024

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.

from sgx-step.

xiaonan-INTC avatar xiaonan-INTC commented on May 27, 2024

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.

@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

from sgx-step.

jovanbulck avatar jovanbulck commented on May 27, 2024

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!

from sgx-step.

xiaonan-INTC avatar xiaonan-INTC commented on May 27, 2024

Thanks a lot, @jovanbulck
It works now, I re-installed intel sgx at first, then re-installed sgx-step.

from sgx-step.

xiaonan-INTC avatar xiaonan-INTC commented on May 27, 2024

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

from sgx-step.

jovanbulck avatar jovanbulck commented on May 27, 2024

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:

intel/linux-sgx#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

from sgx-step.

jovanbulck avatar jovanbulck commented on May 27, 2024

glad to hear it works now!

from sgx-step.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.