- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am trying to run a simple code using the enclave and when I try to run it, I get this error: 'sgx_uae_service.dll' not found. I checked the Intel SGX Enclave directory and that specific file is there. I was wondering how to go about fixing this error.
I am running the code on Visual Studio Pro 15.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It sounds like you have the SGX SDK installed, but not the runtime (SGX PSW). If the SGX PSW is installed that binary should be in the c:\windows\system32 dir.
Is your machine SGX-capable and SGX-enabled? What OS are you running?
Thanks,
Francisco
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes my machine is SGX capable and it was a developer NUC machine that was bought directly from Intel. I am running Windows 10 Pro.
I am trying to install the latest PSW from Intel installer using admin rights, it gives me an error that it doesn't support enterprise windows even though I am running windows 10 pro...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The installer mechanism varies based on the release/build number of Windows 10 (it changed in the Fall Creators Update aka Version 1709 aka RS3). Which one are you using?
There are more details here:
If you are running a recent version of Windows 10 you cannot install the PSW using the .exe installer. The PSW will be automatically installed (via Windows Update) when SGX is enabled in the BIOS. Is SGX enabled in the BIOS?
Thanks,
Francisco
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It is enabled in the BIOS and I think I was able to fix it.
But now I have a new error when I try to debug using Local Windows Debugger: [sgx_create_enclave_exa_ c:\sgxwindows\src_release\trunk\psw\urts\win\urts.cpp:164] Couldn't open file with CreateFile()
I changed the debugger working directory to $(OutDir) and that didn't not fix it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Did you change the settings for the Local Windows Debugger or for the Intel(R) SGX Debugger?
The working dir settings are different for each debugger. I would double check that you changed the one for the Intel(R) SGX Debugger and that that is the debugger you are using when debugging your application.
Thanks,
Francisco
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I made sure change that in the Intel SGX Debugger settings AND used the Intel Compiler and still get this error once the application builds and runs:
[sgx_create_enclave_exa_ c:\sgxwindows\src_release\trunk\psw\urts\win\urts.cpp:164] Couldn't open file with CreateFile()
Am I missing something obvious here?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You stated that you changed the Intel SGX Debugger settings, but also indicated you "try to debug using Local Windows Debugger".
Can you double check that when it is time to debug, you are using "Intel SGX Debugger" and not the "Local Windows Debugger"?
And to double check, you can open a command-prompt to the $(OutDir) and run your app from the command-line (without a debugger) right?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I haven't tried to run it from the command line, I only used Visual Studio 2015 to run my project.
I did make sure it is using Intel SGX Debugger when I try to run it and its Working Dir is $(OutDir) on both App and Enclave properties.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I actually fixed it. My project builds and runs without any errors now. Thanks for helping me!
One of the things I am doing in my code is using the sgx_read_rand and I am calling it correctly. I included the header #include "sgx_trts.h" and I call it like this:
if (SGX_SUCCESS != sgx_read_rand((unsigned char *)&val, 4))
printf("\nApp: error, failed to generate a random number in enclave.\n");
Am I doing something wrong because I am getting unresolved external symbol and 1 unresolved externals error.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
int a = 0;
for (int i = 0; i<4; ++i){
sgx_status_t status = sgx_read_rand((unsigned char *)&a, sizeof(a));
printf("random:%d\n", a);
}
I tried this returning Error LNK2019 unresolved external symbol _sgx_read_rand referenced in function _main. I added #include<sgx_trts.h> but don't know how and where i add sgx_trts.lib. Do i need to define it in edl?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Golam.
In Visual Studio, you should add sgx_trts.lib in your enclave project->Properties->Configuration Properties->Linker->Input->Additional Dependencies.
Regards.
Scott
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Francisco C. (Intel) wrote:It sounds like you have the SGX SDK installed, but not the runtime (SGX PSW). If the SGX PSW is installed that binary should be in the c:\windows\system32 dir.
Is your machine SGX-capable and SGX-enabled? What OS are you running?
Thanks,
Francisco
I have some error information however my computer does not support PSW,I have been used sdk and visual studio 2017 to get it . can I run it without PSW on my computer?
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page