briansmith / ring

Safe, fast, small crypto using Rust
Other
3.73k stars 703 forks source link

unable to build on stable-x86_64-unknown-linux-gnu #2132

Closed pitoniak32 closed 2 months ago

pitoniak32 commented 2 months ago

I'm not sure why there is a random capital R? I was looking at the code and it doesn't seem like it was ever in the code, it seems like a corrupted release?

build logs:

The following warnings were emitted during compilation:

warning: ring@0.17.8: In file included from crypto/curve25519/internal.h:20,
warning: ring@0.17.8:                  from crypto/curve25519/curve25519.c:24:
warning: ring@0.17.8: crypto/curve25519/../internal.h:277:52: error: unknown type name ‘crypto_woRd_t’; did you mean ‘crypto_word_t’?
warning: ring@0.17.8:   277 | static inline crypto_word_t constant_time_select_w(crypto_woRd_t mask,
warning: ring@0.17.8:       |                                                    ^~~~~~~~~~~~~
warning: ring@0.17.8:       |                                                    crypto_word_t

error: failed to run custom build command for `ring v0.17.8`

Caused by:
  process didn't exit successfully: `/home/davidpi/Projects/authn-ex/target/debug/build/ring-0e7e3f44420dc76e/build-script-build` (exit status: 1)
  --- stdout
  cargo:rerun-if-env-changed=RING_PREGENERATE_ASM
  cargo:rustc-env=RING_CORE_PREFIX=ring_core_0_17_8_
  OPT_LEVEL = Some(0)
  TARGET = Some(x86_64-unknown-linux-gnu)
  OUT_DIR = Some(/home/davidpi/Projects/authn-ex/target/debug/build/ring-50ca91f0390d0d2e/out)
  HOST = Some(x86_64-unknown-linux-gnu)
  cargo:rerun-if-env-changed=CC_x86_64-unknown-linux-gnu
  CC_x86_64-unknown-linux-gnu = None
  cargo:rerun-if-env-changed=CC_x86_64_unknown_linux_gnu
  CC_x86_64_unknown_linux_gnu = None
  cargo:rerun-if-env-changed=HOST_CC
  HOST_CC = None
  cargo:rerun-if-env-changed=CC
  CC = None
  cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
  RUSTC_WRAPPER = None
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  DEBUG = Some(true)
  CARGO_CFG_TARGET_FEATURE = Some(fxsr,sse,sse2)
  cargo:rerun-if-env-changed=CFLAGS_x86_64-unknown-linux-gnu
  CFLAGS_x86_64-unknown-linux-gnu = None
  cargo:rerun-if-env-changed=CFLAGS_x86_64_unknown_linux_gnu
  CFLAGS_x86_64_unknown_linux_gnu = None
  cargo:rerun-if-env-changed=HOST_CFLAGS
  HOST_CFLAGS = None
  cargo:rerun-if-env-changed=CFLAGS
  CFLAGS = None
  cargo:warning=In file included from crypto/curve25519/internal.h:20,
  cargo:warning=                 from crypto/curve25519/curve25519.c:24:
  cargo:warning=crypto/curve25519/../internal.h:277:52: error: unknown type name ‘crypto_woRd_t’; did you mean ‘crypto_word_t’?
  cargo:warning=  277 | static inline crypto_word_t constant_time_select_w(crypto_woRd_t mask,
  cargo:warning=      |                                                    ^~~~~~~~~~~~~
  cargo:warning=      |                                                    crypto_word_t

  --- stderr

  error occurred: Command "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-4" "-fno-omit-frame-pointer" "-m64" "-I" "include" "-I" "/home/davidpi/Projects/authn-ex/target/debug/build/ring-50ca91f0390d0d2e/out" "-Wall" "-Wextra" "-fvisibility=hidden" "-std=c1x" "-Wall" "-Wbad-function-cast" "-Wcast-align" "-Wcast-qual" "-Wconversion" "-Wmissing-field-initializers" "-Wmissing-include-dirs" "-Wnested-externs" "-Wredundant-decls" "-Wshadow" "-Wsign-compare" "-Wsign-conversion" "-Wstrict-prototypes" "-Wundef" "-Wuninitialized" "-g3" "-DNDEBUG" "-o" "/home/davidpi/Projects/authn-ex/target/debug/build/ring-50ca91f0390d0d2e/out/fad98b632b8ce3cc-curve25519.o" "-c" "crypto/curve25519/curve25519.c" with args cc did not execute successfully (status code exit status: 1).
pitoniak32 commented 2 months ago

I was very confused why this would be happening. cargo clean didn't do anything, I got more aggressive and installed cargo install cargo-cache and did cargo cache -a and now everything builds fine... Not sure where / how I got that corrupted package from.

briansmith commented 2 months ago

I was very confused why this would be happening. cargo clean didn't do anything, I got more aggressive and installed cargo install cargo-cache and did cargo cache -a and now everything builds fine... Not sure where / how I got that corrupted package from.

Thanks for reporting back. Indeed, it seems like one bit flipped from 1 to 0 to make the lowercase 'r' an uppercase 'R'. But that seems to be local to your system, as you noticed.