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

no_std fails to build #95

Closed
brenzi opened this issue Sep 21, 2019 · 12 comments
Closed

no_std fails to build #95

brenzi opened this issue Sep 21, 2019 · 12 comments

Comments

@brenzi
Copy link

brenzi commented Sep 21, 2019

Reproduce:

build the following minimal crate:
https://github.com/scs/test-no-std/tree/ed25519-dalek

cargo build --no-default-features results in

error: duplicate lang item in crate `std`: `f32_runtime`.
  |
  = note: first defined in crate `sgx_tstd`.

error: duplicate lang item in crate `std`: `f64_runtime`.
  |
  = note: first defined in crate `sgx_tstd`.

error: duplicate lang item in crate `std`: `panic_impl`.
  |
  = note: first defined in crate `sgx_tstd`.

error: duplicate lang item in crate `std`: `begin_panic`.
  |
  = note: first defined in crate `sgx_tstd`.

error: duplicate lang item in crate `std`: `oom`.
  |
  = note: first defined in crate `sgx_tstd`.

error: aborting due to 5 previous errors

error: Could not compile `test_no_std`.

@tarcieri
Copy link
Contributor

You may be running into rust-lang/cargo#5730

@brenzi
Copy link
Author

brenzi commented Sep 21, 2019

I have no build-dependencies in my minimal example. Only this:

...

[lib]
name = "test_no_std"
crate-type = ["staticlib"]

[features]
default = []

[target.'cfg(not(target_env = "sgx"))'.dependencies]
sgx_tstd      = { rev = "v1.0.9", git = "https://github.com/baidu/rust-sgx-sdk", features = ["untrusted_fs","net","backtrace"] }


[dependencies.primitives]
git = "https://github.com/scs/substrate-api-client"
package = "substrate-primitives"
branch = "no_std_rstd"
default-features = false

[dependencies.ed25519-dalek]
version = "1.0.0-pre.1"
default-features = false
features = ["u64_backend"]

..and dropping the primitives dependency doesn't change a thing

@tarcieri
Copy link
Contributor

What does your Cargo.lock look like?

@brenzi
Copy link
Author

brenzi commented Sep 21, 2019

# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
[[package]]
name = "autocfg"
version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"

[[package]]
name = "bitflags"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"

[[package]]
name = "block-buffer"
version = "0.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
 "block-padding 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
 "byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
 "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
 "generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)",
]

[[package]]
name = "block-padding"
version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
 "byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
]

[[package]]
name = "byte-tools"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"

[[package]]
name = "byteorder"
version = "1.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"

[[package]]
name = "cc"
version = "1.0.45"
source = "registry+https://github.com/rust-lang/crates.io-index"

[[package]]
name = "clear_on_drop"
version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
 "cc 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)",
]

[[package]]
name = "cloudabi"
version = "0.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
 "bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
]

[[package]]
name = "curve25519-dalek"
version = "1.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
 "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
 "clear_on_drop 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
 "digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
 "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
 "subtle 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
]

[[package]]
name = "digest"
version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
 "generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)",
]

[[package]]
name = "ed25519-dalek"
version = "1.0.0-pre.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
 "clear_on_drop 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
 "curve25519-dalek 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
 "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
 "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
 "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
]

[[package]]
name = "failure"
version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"

[[package]]
name = "fake-simd"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"

[[package]]
name = "fuchsia-cprng"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"

[[package]]
name = "generic-array"
version = "0.12.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
 "typenum 1.11.2 (registry+https://github.com/rust-lang/crates.io-index)",
]

[[package]]
name = "libc"
version = "0.2.62"
source = "registry+https://github.com/rust-lang/crates.io-index"

[[package]]
name = "opaque-debug"
version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"

[[package]]
name = "rand"
version = "0.6.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
 "autocfg 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
 "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)",
 "rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
 "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
 "rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
 "rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
 "rand_jitter 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
 "rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
 "rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
 "rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
 "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
]

[[package]]
name = "rand_chacha"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
 "autocfg 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
 "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
]

[[package]]
name = "rand_core"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
 "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
]

[[package]]
name = "rand_core"
version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"

[[package]]
name = "rand_hc"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
 "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
]

[[package]]
name = "rand_isaac"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
 "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
]

[[package]]
name = "rand_jitter"
version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
 "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)",
 "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
 "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
]

[[package]]
name = "rand_os"
version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
 "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
 "fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
 "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)",
 "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
 "rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
 "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
]

[[package]]
name = "rand_pcg"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
 "autocfg 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
 "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
]

[[package]]
name = "rand_xorshift"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
 "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
]

[[package]]
name = "rdrand"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
 "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
]

[[package]]
name = "sgx_alloc"
version = "1.0.9"
source = "git+https://github.com/baidu/rust-sgx-sdk?rev=v1.0.9#078c686d6a44658077e2f6223bd77bae174790e4"
dependencies = [
 "sgx_trts 1.0.9 (git+https://github.com/baidu/rust-sgx-sdk?rev=v1.0.9)",
]

[[package]]
name = "sgx_backtrace_sys"
version = "1.0.9"
source = "git+https://github.com/baidu/rust-sgx-sdk?rev=v1.0.9#078c686d6a44658077e2f6223bd77bae174790e4"
dependencies = [
 "cc 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)",
 "sgx_build_helper 0.1.0 (git+https://github.com/baidu/rust-sgx-sdk?rev=v1.0.9)",
 "sgx_libc 1.0.9 (git+https://github.com/baidu/rust-sgx-sdk?rev=v1.0.9)",
]

[[package]]
name = "sgx_build_helper"
version = "0.1.0"
source = "git+https://github.com/baidu/rust-sgx-sdk?rev=v1.0.9#078c686d6a44658077e2f6223bd77bae174790e4"

[[package]]
name = "sgx_demangle"
version = "1.0.9"
source = "git+https://github.com/baidu/rust-sgx-sdk?rev=v1.0.9#078c686d6a44658077e2f6223bd77bae174790e4"

[[package]]
name = "sgx_libc"
version = "1.0.9"
source = "git+https://github.com/baidu/rust-sgx-sdk?rev=v1.0.9#078c686d6a44658077e2f6223bd77bae174790e4"
dependencies = [
 "sgx_types 1.0.9 (git+https://github.com/baidu/rust-sgx-sdk?rev=v1.0.9)",
]

[[package]]
name = "sgx_tprotected_fs"
version = "1.0.9"
source = "git+https://github.com/baidu/rust-sgx-sdk?rev=v1.0.9#078c686d6a44658077e2f6223bd77bae174790e4"
dependencies = [
 "sgx_trts 1.0.9 (git+https://github.com/baidu/rust-sgx-sdk?rev=v1.0.9)",
 "sgx_types 1.0.9 (git+https://github.com/baidu/rust-sgx-sdk?rev=v1.0.9)",
]

[[package]]
name = "sgx_trts"
version = "1.0.9"
source = "git+https://github.com/baidu/rust-sgx-sdk?rev=v1.0.9#078c686d6a44658077e2f6223bd77bae174790e4"
dependencies = [
 "sgx_libc 1.0.9 (git+https://github.com/baidu/rust-sgx-sdk?rev=v1.0.9)",
 "sgx_types 1.0.9 (git+https://github.com/baidu/rust-sgx-sdk?rev=v1.0.9)",
]

[[package]]
name = "sgx_tstd"
version = "1.0.9"
source = "git+https://github.com/baidu/rust-sgx-sdk?rev=v1.0.9#078c686d6a44658077e2f6223bd77bae174790e4"
dependencies = [
 "sgx_alloc 1.0.9 (git+https://github.com/baidu/rust-sgx-sdk?rev=v1.0.9)",
 "sgx_backtrace_sys 1.0.9 (git+https://github.com/baidu/rust-sgx-sdk?rev=v1.0.9)",
 "sgx_demangle 1.0.9 (git+https://github.com/baidu/rust-sgx-sdk?rev=v1.0.9)",
 "sgx_libc 1.0.9 (git+https://github.com/baidu/rust-sgx-sdk?rev=v1.0.9)",
 "sgx_tprotected_fs 1.0.9 (git+https://github.com/baidu/rust-sgx-sdk?rev=v1.0.9)",
 "sgx_trts 1.0.9 (git+https://github.com/baidu/rust-sgx-sdk?rev=v1.0.9)",
 "sgx_types 1.0.9 (git+https://github.com/baidu/rust-sgx-sdk?rev=v1.0.9)",
 "sgx_unwind 0.0.1 (git+https://github.com/baidu/rust-sgx-sdk?rev=v1.0.9)",
]

[[package]]
name = "sgx_types"
version = "1.0.9"
source = "git+https://github.com/baidu/rust-sgx-sdk?rev=v1.0.9#078c686d6a44658077e2f6223bd77bae174790e4"

[[package]]
name = "sgx_unwind"
version = "0.0.1"
source = "git+https://github.com/baidu/rust-sgx-sdk?rev=v1.0.9#078c686d6a44658077e2f6223bd77bae174790e4"
dependencies = [
 "sgx_build_helper 0.1.0 (git+https://github.com/baidu/rust-sgx-sdk?rev=v1.0.9)",
 "sgx_trts 1.0.9 (git+https://github.com/baidu/rust-sgx-sdk?rev=v1.0.9)",
]

[[package]]
name = "sha2"
version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
 "block-buffer 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)",
 "digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
 "fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
 "opaque-debug 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
]

[[package]]
name = "subtle"
version = "2.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"

[[package]]
name = "test_no_std"
version = "0.1.0"
dependencies = [
 "ed25519-dalek 1.0.0-pre.1 (registry+https://github.com/rust-lang/crates.io-index)",
 "sgx_tstd 1.0.9 (git+https://github.com/baidu/rust-sgx-sdk?rev=v1.0.9)",
]

[[package]]
name = "typenum"
version = "1.11.2"
source = "registry+https://github.com/rust-lang/crates.io-index"

[[package]]
name = "winapi"
version = "0.3.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
 "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
 "winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
]

[[package]]
name = "winapi-i686-pc-windows-gnu"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"

[[package]]
name = "winapi-x86_64-pc-windows-gnu"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"

[metadata]
"checksum autocfg 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "b671c8fb71b457dd4ae18c4ba1e59aa81793daacc361d82fcd410cef0d491875"
"checksum bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3d155346769a6855b86399e9bc3814ab343cd3d62c7e985113d46a0ec3c281fd"
"checksum block-buffer 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b"
"checksum block-padding 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "6d4dc3af3ee2e12f3e5d224e5e1e3d73668abbeb69e566d361f7d5563a4fdf09"
"checksum byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7"
"checksum byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a7c3dd8985a7111efc5c80b44e23ecdd8c007de8ade3b96595387e812b957cf5"
"checksum cc 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)" = "4fc9a35e1f4290eb9e5fc54ba6cf40671ed2a2514c3eeb2b2a908dda2ea5a1be"
"checksum clear_on_drop 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "97276801e127ffb46b66ce23f35cc96bd454fa311294bced4bbace7baa8b1d17"
"checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f"
"checksum curve25519-dalek 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8b7dcd30ba50cdf88b55b033456138b7c0ac4afdc436d82e1b79f370f24cc66d"
"checksum digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5"
"checksum ed25519-dalek 1.0.0-pre.1 (registry+https://github.com/rust-lang/crates.io-index)" = "81956bcf7ef761fb4e1d88de3fa181358a0d26cbcb9755b587a08f9119824b86"
"checksum failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "795bd83d3abeb9220f257e597aa0080a508b27533824adf336529648f6abf7e2"
"checksum fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed"
"checksum fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba"
"checksum generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c68f0274ae0e023facc3c97b2e00f076be70e254bc851d972503b328db79b2ec"
"checksum libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)" = "34fcd2c08d2f832f376f4173a231990fa5aef4e99fb569867318a227ef4c06ba"
"checksum opaque-debug 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c"
"checksum rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca"
"checksum rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef"
"checksum rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b"
"checksum rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc"
"checksum rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4"
"checksum rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08"
"checksum rand_jitter 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "1166d5c91dc97b88d1decc3285bb0a99ed84b05cfd0bc2341bdf2d43fc41e39b"
"checksum rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071"
"checksum rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44"
"checksum rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c"
"checksum rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2"
"checksum sgx_alloc 1.0.9 (git+https://github.com/baidu/rust-sgx-sdk?rev=v1.0.9)" = "<none>"
"checksum sgx_backtrace_sys 1.0.9 (git+https://github.com/baidu/rust-sgx-sdk?rev=v1.0.9)" = "<none>"
"checksum sgx_build_helper 0.1.0 (git+https://github.com/baidu/rust-sgx-sdk?rev=v1.0.9)" = "<none>"
"checksum sgx_demangle 1.0.9 (git+https://github.com/baidu/rust-sgx-sdk?rev=v1.0.9)" = "<none>"
"checksum sgx_libc 1.0.9 (git+https://github.com/baidu/rust-sgx-sdk?rev=v1.0.9)" = "<none>"
"checksum sgx_tprotected_fs 1.0.9 (git+https://github.com/baidu/rust-sgx-sdk?rev=v1.0.9)" = "<none>"
"checksum sgx_trts 1.0.9 (git+https://github.com/baidu/rust-sgx-sdk?rev=v1.0.9)" = "<none>"
"checksum sgx_tstd 1.0.9 (git+https://github.com/baidu/rust-sgx-sdk?rev=v1.0.9)" = "<none>"
"checksum sgx_types 1.0.9 (git+https://github.com/baidu/rust-sgx-sdk?rev=v1.0.9)" = "<none>"
"checksum sgx_unwind 0.0.1 (git+https://github.com/baidu/rust-sgx-sdk?rev=v1.0.9)" = "<none>"
"checksum sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b4d8bfd0e469f417657573d8451fb33d16cfe0989359b93baf3a1ffc639543d"
"checksum subtle 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "01f40907d9ffc762709e4ff3eb4a6f6b41b650375a3f09ac92b641942b7fb082"
"checksum typenum 1.11.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6d2783fe2d6b8c1101136184eb41be8b1ad379e4657050b8aaff0c79ee7575f9"
"checksum winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6"
"checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
"checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"

@brenzi
Copy link
Author

brenzi commented Sep 21, 2019

just in case this helps: rustup show

Default host: x86_64-unknown-linux-gnu
rustup home:  /home/abrenzikofer/.rustup

installed toolchains
--------------------

stable-x86_64-unknown-linux-gnu
nightly-2019-05-22-x86_64-unknown-linux-gnu
nightly-2019-07-15-x86_64-unknown-linux-gnu
nightly-2019-08-01-x86_64-unknown-linux-gnu (default)
nightly-x86_64-unknown-linux-gnu

installed targets for active toolchain
--------------------------------------

wasm32-unknown-unknown
x86_64-unknown-linux-gnu

active toolchain
----------------

nightly-2019-08-01-x86_64-unknown-linux-gnu (default)
rustc 1.38.0-nightly (8a58268b5 2019-07-31)

@tarcieri
Copy link
Contributor

byteorder seems like a plausible culprit dalek-cryptography/curve25519-dalek#248

@tarcieri
Copy link
Contributor

cc @hdevalence

@brenzi
Copy link
Author

brenzi commented Sep 22, 2019

The interaction seems to be complex, because curve25519-dalek builds fine with no_std in my minimal crate:
https://github.com/scs/test-no-std/tree/curve25519-dalek

@brenzi
Copy link
Author

brenzi commented Sep 22, 2019

I think I made it work by removing dev-deps and adding two default-features=false in my fork of ed25519-dalek:
https://github.com/scs/ed25519-dalek/tree/no_std_sgx

test it with:
https://github.com/scs/test-no-std/tree/ed25519-dalek

@isislovecruft
Copy link
Member

Hi! I similarly suspect you're running into the cargo build-dependencies features issue. However, you'll also want to ensure you're using ed25519-dalek's nightly and u64_backend (or another backend) features if you're trying to build for no_std (and possibly alloc as well). Also 1342e2a may help you, which ended up in version 1.0.0-pre.2.

@burdges
Copy link

burdges commented Oct 7, 2019

I think rand_os activates std before 0.2.1, so before rand 0.7. As rand_core 0.4 alone works, your library crate could pass its own tests no_std, but break no_std inside application: w3f/schnorrkel#31 (comment)

@isislovecruft
Copy link
Member

Hi @brenzi! Are you still running into this issue? If so, please feel free to reopen (I'm trying to triage out old bugs that are no longer relevant).

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

No branches or pull requests

4 participants