1) At first I did not set LD_LIBRARY_PATH at all and got the message "This system does not support Intel SGX."
2) Then I debugged a bit and found that the client tries to find the libraries "libsgx_uae_service.so" and "libsgx_urts.so" but cannot due to the unset LD_LIBRARY_PATH. So I ran locate for both and received the following results
- locate libsgx_urts.so
- locate libsgx_uae_service.so
So I set LD_LIBRARY_PATH=/opt/intel/sgxsdk/lib64. But then I get the message "Please use the correct uRTS library from PSW package."
3) So I googled a bit and found this issue where a user says "Do not set LD_LIBRARY_PATH=/opt/intel/sgxsdk/lib64/ ". But since "libsgx_uae_service.so" is only present in this folder I could not, but instead I set it to LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/:/opt/intel/sgxsdk/lib64/ so the sample would at least find the uRTS at the correct point.
Basically this is working now, but the enclave always returns m1.gid=0 (not EGID, the gid which should not be 0 in HW mode, which I used to built it). I suspect that it has something to do with the fact that the LD_LIBRARY_PATH also contains the libraries for SGX_MODE=SIM but I do not know how to get around linking /opt/intel/sgxsdk/lib64/
If you need any further information about installation/configuration/host or have any other ideas: Please go ahead, however I don't know how to get this example to work.
Grateful for any help,
- General Support
The libraries in the /opt/intel/sgxsdk/lib64 are used in compile time. If you want to execute your App, you need install PSW package: all of needed libraries has been installed in the folder /user/lib/x86_64-linux-gnu
thanks for your answer!
Should I install that manually? I installed PSW according to the installation guide using
"sudo apt-get install libsgx-epid libsgx-urts"
I also tried installing libsgx-epid-dev to no avail. By manually I mean installing it from here
Update: I directly installed this package, it said unmet dependencies, so I decided to install with apt and dependecies and still after that I get
> locate libsgx_uae_service.so
> locate libsgx_uae_service
Is it related to the fact, that I use the machine for development as well and SDK and the driver are installed on this machine?
My bad. locate doesn't seem to reliably find the files. After this installation they are now present in /usr/lib/x86_64-linux-gnu and when I set that for LD_LIBRARY_PATH everything works fine.
This can be marked as resolved. Thanks Junli!