Etcommon-rlp compile issue when running Enigma network


#1

Hi, I started running into an issue with the enigma docker setup when I followed Adi’s instructions to rebuild the docker containers here: How to calculate average of some numbers in the secret contract of Enigma?. When I run docker-compose build --no-cache, I see this error:

  Compiling etcommon-rlp v0.2.4
error[E0432]: unresolved import `alloc::collections`
  --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/etcommon-rlp-0.2.4/src/compression.rs:10:41
   |
10 | #[cfg(not(feature = "std"))] use alloc::collections::{BTreeMap as Map};
   |                                         ^^^^^^^^^^^ Could not find `collections` in `alloc`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0432`.
error: Could not compile `etcommon-rlp`.
warning: build failed, waiting for other jobs to finish...
error: build failed
Makefile:16: recipe for target 'libenclave.a' failed
make[1]: Leaving directory '/root/enigma-core/enigma-core/enclave'
make[1]: *** [libenclave.a] Error 101
make: *** [enclave] Error 2
Makefile:137: recipe for target 'enclave' failed


**** This is a known error. Ignore for now. Will succeed upon retry ***

I know it says it will succeed upon retry, and the build continues and completes successfully. However. when I do ./launch.bash -s -t, I see the error come up again in enigma core, and the service stops running:

core_1      |     Finished release [optimized] target(s) in 6.61 secs
core_1      | Cargo  =>  bin/app
core_1      | mkdir -p ./bin
core_1      | cp ./app/target/release/enigma-core-app ./bin/enigma-core-app
core_1      | make -C ./enclave/
core_1      | make[1]: Entering directory '/root/enigma-core/enigma-core/enclave'
core_1      | cargo build --release
core_1      |    Compiling etcommon-rlp v0.2.4
core_1      |    Compiling rustc_version v0.2.3
core_1      | error[E0432]: unresolved import `alloc::collections`
core_1      |   --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/etcommon-rlp-0.2.4/src/compression.rs:10:41
core_1      |    |
core_1      | 10 | #[cfg(not(feature = "std"))] use alloc::collections::{BTreeMap as Map};
core_1      |    |                                         ^^^^^^^^^^^ Could not find `collections` in `alloc`
core_1      |
core_1      | error: aborting due to previous error
core_1      |
core_1      | For more information about this error, try `rustc --explain E0432`.
core_1      | error: Could not compile `etcommon-rlp`.
core_1      | warning: build failed, waiting for other jobs to finish...
core_1      | error: build failed
core_1      | Makefile:16: recipe for target 'libenclave.a' failed
core_1      | make[1]: *** [libenclave.a] Error 101
core_1      | make[1]: Leaving directory '/root/enigma-core/enigma-core/enclave'
core_1      | Makefile:137: recipe for target 'enclave' failed
core_1      | make: *** [enclave] Error 2
core_1      | [+] Home dir is /root
core_1      | [+] Home dir is /root
core_1      | [+] Created new .enigma folder => "/root/.enigma"
core_1      | [-] Open token file /root/.enigma/enclave.token error! Will create one.
core_1      | [-] Init Enclave Failed SGX_ERROR_ENCLAVE_FILE_ACCESS!
core_1      | root@enigma_core_1:~# aesm_service[119]: SGX Service unavailable
core_1      | aesm_service[119]: Fail to start service.

I would appreciate some advice on how to work around this issue.


#2

Hi @crypto_mentions, thanks for pointing this out. A dependency got upgraded, which is throwing this error now. @elichai2 is working to resolve it now, and will post an update soon.


#3

Yep, So one of the dependencies that we’re using got updated and doesn’t support out rust compiler version.
I fixed this by forcing it to use the previous version (nothing related to us was changed)
I merged the change here: https://github.com/enigmampc/enigma-core/pull/18
And i’m releasing a new version 0.1.5


#4

#5

#6

@crypto_mentions just to clarify, there is nothing special you have to do now. Just rebuild the source again with docker-compose build --no-cache (which will pull the newest source that @elichai2 fixed) and run again ./launch.bash -s -t, which will not error out this time. I just tried it, and it worked fine for me.


#7

Thank you Elichai and Victor! The Enigma containers are now being brought up successfully.


#8