Intel® Software Guard Extensions (Intel® SGX)
Discussion board focused on hardware-based isolation and memory encryption to provide extended code protection in solutions.
1481 Discussions

Please use the correct SGX EPID library from PSW package.

Will23
Novice
3,405 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
3,369 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

0 Kudos
6 Replies
JesusG_Intel
Moderator
3,390 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,


0 Kudos
Will23
Novice
3,380 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.

0 Kudos
Will23
Novice
3,370 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.

0 Kudos
fyuan12
Beginner
2,845 Views

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

0 Kudos
Will23
Novice
2,834 Views

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

JesusG_Intel
Moderator
3,365 Views

Thanks for letting us know how you fixed it.


0 Kudos
Reply