Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

duplicate lang item issue with no_std build #7951

Closed
brenzi opened this issue Feb 29, 2020 · 2 comments
Closed

duplicate lang item issue with no_std build #7951

brenzi opened this issue Feb 29, 2020 · 2 comments
Labels
C-bug Category: bug

Comments

@brenzi
Copy link

brenzi commented Feb 29, 2020

Problem
When building
encointer/encointer-worker@7252e20

I get an error:

error: duplicate lang item in crate `sgx_tstd` (which `palette_support` depends on): `f32_runtime`.
  |
  = note: first defined in crate `std` (which `pallet_encointer_ceremonies` depends on).

error: duplicate lang item in crate `sgx_tstd` (which `palette_support` depends on): `f64_runtime`.
  |
  = note: first defined in crate `std` (which `pallet_encointer_ceremonies` depends on).

error: duplicate lang item in crate `sgx_tstd` (which `palette_support` depends on): `panic_impl`.
  |
  = note: first defined in crate `std` (which `pallet_encointer_ceremonies` depends on).

error: duplicate lang item in crate `sgx_tstd` (which `palette_support` depends on): `begin_panic`.
  |
  = note: first defined in crate `std` (which `pallet_encointer_ceremonies` depends on).

error: duplicate lang item in crate `sgx_tstd` (which `palette_support` depends on): `oom`.
  |
  = note: first defined in crate `std` (which `pallet_encointer_ceremonies` depends on).

error: aborting due to 5 previous errors

The strange thing is that it is caused by the last commit, introducing the dependency on
https://github.com/encointer/pallet-encointer-ceremonies
but that crate has no dependencies (and no new features) that were not present in the previous commit.

Steps
(you may need to install Intel SGX SDK first) or binary install

git clone https://github.com/encointer/encointer-worker
cd encointer worker
git checkout 7252e20264e63c7dce11470922d7c2965378842e
cd enclave
make

You should see the error above

Whereas the following should work

git checkout 5220a7560dde3cdd893aa913c73c561e0969e5f3
make

Notes
cargo 1.41.0-nightly (8280633 2019-11-11)

cargo nono check:
cargo nono check warns about exactly the same crates in both commits

webpki: FAILURE
log: FAILURE
serde_json: FAILURE
sgx-externalities: FAILURE
env_logger: FAILURE
rustls: FAILURE
num-bigint: FAILURE
webpki-roots: FAILURE
substratee-stf: FAILURE
chrono: FAILURE
base64: FAILURE
yasna: FAILURE
serde: FAILURE
bit-vec: FAILURE
rust-base58: FAILURE

whereas none of them are dependencies of pallet-encointer-ceremonies.

However, serde is a dev-dependency, but I've already checked if I'm running into #5730 or one of the similar issues. I just removed all dev-dependencies in pallet-encointer-ceremonies. To no success

@brenzi
Copy link
Author

brenzi commented Feb 29, 2020

This is a stupid bug on my side. I forgot to put #![no_std] in the new crate.

@brenzi brenzi closed this as completed Feb 29, 2020
@brenzi
Copy link
Author

brenzi commented Feb 29, 2020

This is a stupid bug on my side. I forgot to put #![no_std] in the new crate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug
Projects
None yet
Development

No branches or pull requests

1 participant