Skip to content
This repository has been archived by the owner on Jun 21, 2020. It is now read-only.

expected value, found struct variant EnumVariation::Rust #181

Closed
lacabra opened this issue Jun 26, 2019 · 2 comments
Closed

expected value, found struct variant EnumVariation::Rust #181

lacabra opened this issue Jun 26, 2019 · 2 comments
Labels
bug Something isn't working

Comments

@lacabra
Copy link
Contributor

lacabra commented Jun 26, 2019

Describe the bug
Trying to compile core on the latest develop branch errors out, but interestingly km builds just fine.

To Reproduce
Build core with:

cd enigma-core/enigma-core
make full-clean
SGX_MODE=HW RUSTFLAGS=-Awarnings RUST_BACKTRACE=1 make DEBUG=1

Expected behavior
The build should succeed.

Backtrace

   Compiling tokio-core v0.1.17
   Compiling flate2 v1.0.9
   Compiling failure v0.1.5
   Compiling which v2.0.1
   Compiling async-zmq-types v0.3.2
   Compiling publicsuffix v1.5.2
   Compiling tokio-zmq v0.9.0
   Compiling cookie_store v0.7.0
   Compiling enigma-crypto v0.1.0 (/root/enigma-core/enigma-crypto)
   Compiling ethabi v6.1.0
   Compiling hyper-tls v0.3.2
   Compiling reqwest v0.9.18
   Compiling web3 v0.6.0
   Compiling enigma-tools-m v0.1.0 (/root/enigma-core/enigma-tools-m)
   Compiling librocksdb-sys v5.18.3 (https://github.com/rust-rocksdb/rust-rocksdb.git?rev=067c72a#067c72a0)
   Compiling enigma-core-app v0.1.3 (/root/enigma-core/enigma-core/app)
error[E0423]: expected value, found struct variant `EnumVariation::Rust`
  --> build.rs:34:29
   |
34 |         .default_enum_style(EnumVariation::Rust)
   |                             ^^^^^^^^^^^^^^^^^^^ did you mean `EnumVariation::Rust { /* fields */ }`?

error: aborting due to previous error

For more information about this error, try `rustc --explain E0423`.
error: Could not compile `enigma-core-app`.
warning: build failed, waiting for other jobs to finish...
error: build failed
Makefile:147: recipe for target 'enigma-core-app' failed
make: *** [enigma-core-app] Error 101


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

mkdir -p ./lib
make -C ./enclave/ CARGO_FLAGS=  Rust_target_dir=debug
make[1]: Entering directory '/root/enigma-core/enigma-core/enclave'
cargo build -p enigma-types # Meant to make sure `enigma-types.h` already exists and can be included.
    Finished dev [unoptimized + debuginfo] target(s) in 0.11s
bindgen Enclave_t.h --default-enum-style=rust --rust-target=nightly --no-recursive-whitelist --use-array-pointers-in-arguments --whitelist-function ocall_.*  --raw-line "#![allow(dead_code)] use enigma_types::*; use sgx_types::*;" -- -I/opt/sgxsdk/include -I/root/sgx/edl > src/auto_ffi.rs
rustfmt  src/auto_ffi.rs
cargo build 
    Finished dev [unoptimized + debuginfo] target(s) in 0.15s
cp ./target/debug/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'
    Finished dev [unoptimized + debuginfo] target(s) in 0.12s
   Compiling enigma-core-app v0.1.3 (/root/enigma-core/enigma-core/app)
   Compiling librocksdb-sys v5.18.3 (https://github.com/rust-rocksdb/rust-rocksdb.git?rev=067c72a#067c72a0)
   Compiling enigma-tools-u v0.1.3 (/root/enigma-core/enigma-tools-u)
error[E0423]: expected value, found struct variant `EnumVariation::Rust`
  --> build.rs:34:29
   |
34 |         .default_enum_style(EnumVariation::Rust)
   |                             ^^^^^^^^^^^^^^^^^^^ did you mean `EnumVariation::Rust { /* fields */ }`?

error: aborting due to previous error

For more information about this error, try `rustc --explain E0423`.
error: Could not compile `enigma-core-app`.
warning: build failed, waiting for other jobs to finish...
error: build failed
make: *** [enigma-core-app] Error 101
Makefile:147: recipe for target 'enigma-core-app' failed

Desktop (please complete the following information):

  • OS: Ubuntu
  • Version: 16.04
@lacabra lacabra added the bug Something isn't working label Jun 27, 2019
@AvishaiW
Copy link
Contributor

bumped into this yesterday as well... fixed on #180

@lacabra
Copy link
Contributor Author

lacabra commented Jul 10, 2019

Resolved.

@lacabra lacabra closed this as completed Jul 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants