I’m trying to launch the network for the first time in simulation mode with sudo ./launch.bash -t -s but I am getting SGX_ERROR_UNEXPECTED in enigma_core_1, and enigma_surface_1 stays on

enigma_surface_1: Waiting for enigma_core_1...

Here is the output of enigma_core_1:

    Finished release [optimized] target(s) in 6.77 secs
Cargo  =>  bin/app
mkdir -p ./bin
cp ./app/target/release/enigma-core-app ./bin/enigma-core-app
make -C ./enclave/
make[1]: Entering directory '/root/enigma-core/enigma-core/enclave'
cargo build --release  
   Compiling enigma-core-enclave v0.1.5 (file:///root/enigma-core/enigma-core/enclave)
    Finished release [optimized] target(s) in 9.5 secs
cp ./target/release/libenigmacoreenclave.a ../lib/libenclave.a
make[1]: Leaving directory '/root/enigma-core/enigma-core/enclave'
make -C /root/sgx/compiler-rt/ 2> /dev/null
make[1]: Entering directory '/root/sgx/compiler-rt'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/root/sgx/compiler-rt'
cp /root/sgx/compiler-rt/libcompiler-rt-patch.a ./lib
LINK =>  enclave/
<!-- Please refer to User's Guide for the explanation of each field -->
tcs_num 1, tcs_max_num 1, tcs_min_pool 1
The required memory is 3497984B.
SIGN =>  bin/
[+] Home dir is /root
[+] Home dir is /root
[+] Created new .enigma folder => "/root/.enigma"
[-] Open token file /root/.enigma/enclave.token error! Will create one.
[-] Init Enclave Failed SGX_ERROR_UNEXPECTED!
root@enigma_core_1:~# aesm_service[135]: SGX Service unavailable
aesm_service[135]: Fail to start service.

Why is an enclave not intialized? My processors are AMD not Intel.


After further investigation, it seems that SGX may not run on an AMD processor, even in simulation mode. I tried the helloworld example code from the SGX package and it still did not work.

I tried to run the nodes on an Intel processor and I had no problems.

If you get the above error, make sure you are using an Intel processor, you can check with lscpu.


Thanks @myked for reporting this error and tracking it down to the processor manufacturer, I am sure it will be of help to others that wonder if they can run it in other architectures.