Intel® Software Guard Extensions (Intel® SGX)
Use hardware-based isolation and memory encryption to provide more code protection in your solutions.

Please use the correct SGX EPID library from PSW package.

Will23
Novice
1,091 Views

Hello,

I am trying to install ObliDB (https://github.com/SabaEskandarian/ObliDB) on an Azure virtual machine. I have talked to the authors of the code and they confirmed that the system doesn't work on the newest version of SGX so I am trying to update the code. After making a few tweaks, I can get the code to build but when I try to run the app, it prints "Please use the correct SGX EPID library from PSW package.

Error, call sgx_get_extended_epid_group_id fail [main]."

I took a look at the older documentation and it shows that sgx_get_extended_epid_group_id() is included in sgx_uae_service.h but in the newest update of SGX it's included in sgx_uae_epid.h. Thinking that might be the error, I changed the code to say #include "sgx_uae_epid.h" rather than #include "sgx_uae_service.h". I still get the same error. 

Running "ldd ./app" gives me: 


linux-vdso.so.1 (0x00007ffc2eff1000)
libsgx_urts.so => /usr/lib/x86_64-linux-gnu/libsgx_urts.so (0x00007fed2256c000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fed22170000)
libservice_provider.so => /home/<my_name>/ObliDB/libservice_provider.so (0x00007fed22550000)
libsgx_uae_service.so => /usr/lib/x86_64-linux-gnu/libsgx_uae_service.so (0x00007fed2254b000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fed21de7000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fed21bcf000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fed217de000)
libsgx_enclave_common.so.1 => /usr/lib/x86_64-linux-gnu/libsgx_enclave_common.so.1 (0x00007fed22541000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fed215da000)
/lib64/ld-linux-x86-64.so.2 (0x00007fed2238f000)
libsample_libcrypto.so => /home/<my_name>/ObliDB/sample_libcrypto/libsample_libcrypto.so (0x00007fed21331000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fed20f93000)

 

One thing I should point out is that /usr/lib/x86_64-linux-gnu did not originally include libsgx_uae_service.so (I've tried reinstalling and that file never appears to be created there) so instead I copied it from /opt/intel/sgxsdk/lib64. I am running the newest updates of SGX on Ubuntu 18.04. Additionally, I am able to navigate to /opt/intel/sgxsdk/SampleCode and successfully run the code samples available there.

There have been a couple previous questions similar to this but none of them seemed to be able to fix the issue I'm having. I appreciate any help you can give.

0 Kudos
1 Solution
Will23
Novice
1,053 Views

I seem to have fixed the problem by updating the Makefile. Some of the libraries it was relying on are listed in the documentation as "being phased out". I replaced them with their updated counterparts.

View solution in original post

6 Replies
JesusG_Intel
Moderator
1,074 Views

Hi, please make sure your AESM service is running correctly using


sudo service aesmd status


Did you specifically try to run the LocalAttestation and RemoteAttestation samples?


Ensure the the Linux SGX Driver and PSW are installed correctly per these instructions: https://github.com/intel/linux-sgx.


Regards,


Will23
Novice
1,064 Views

If I run that command, it tells me that the AESM service is "active (running)". Also, both /opt/intel/sgxsdk/SampleCode/RemoteAttestation and /opt/intel/sgxsdk/SampleCode/LocalAttestation succeed when I build and run them in hardware mode.

Will23
Novice
1,054 Views

I seem to have fixed the problem by updating the Makefile. Some of the libraries it was relying on are listed in the documentation as "being phased out". I replaced them with their updated counterparts.

View solution in original post

fyuan12
Beginner
529 Views

Which part of the Makefile did you have to update? I'm running into a similar problem.

Will23
Novice
518 Views

I pushed my changes to their GitHub and they merged them so it should be updated now. 

JesusG_Intel
Moderator
1,049 Views

Thanks for letting us know how you fixed it.


Reply