alexcrichton / openssl-src-rs

Source code and logic to build OpenSSL from source
Apache License 2.0
68 stars 113 forks source link

v300.0.0+3.0.0 Failed to build from crates.io #105

Closed ValHeimer closed 2 years ago

ValHeimer commented 3 years ago

If I tried to cargo build your testcrate by replacing

[build-dependencies]
openssl-src = { path = ".." }

with

[build-dependencies]
openssl-src = "*"

I runned cargo build and I have the following error:

[/tmp/openssl-src-rs/testcrate] $ cargo build
    Updating crates.io index
   Compiling cc v1.0.70
   Compiling libc v0.2.101
   Compiling openssl-src v300.0.0+3.0.0
   Compiling testcrate v0.1.0 (/tmp/openssl-src-rs/testcrate)
error: failed to run custom build command for `testcrate v0.1.0 (/tmp/openssl-src-rs/testcrate)`

Caused by:
  process didn't exit successfully: `/tmp/openssl-src-rs/target/debug/build/testcrate-13aed75ca5398236/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-changed=build.rs
  CC_x86_64-unknown-linux-gnu = None
  CC_x86_64_unknown_linux_gnu = None
  HOST_CC = None
  CC = None
  CFLAGS_x86_64-unknown-linux-gnu = None
  CFLAGS_x86_64_unknown_linux_gnu = None
  HOST_CFLAGS = None
  CFLAGS = None
  CRATE_CC_NO_DEFAULTS = None
  DEBUG = Some("true")
  CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
  running "perl" "./Configure" "--prefix=/tmp/openssl-src-rs/target/debug/build/testcrate-bf767f3278c421fb/out/openssl-build/install" "no-dso" "no-shared" "no-ssl3" "no-unit-test" "no-comp" "no-zlib" "no-zlib-dynamic" "--libdir=lib" "no-legacy" "no-md2" "no-rc5" "no-weak-ssl-ciphers" "no-camellia" "no-idea" "no-seed" "linux-x86_64" "-O2" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-m64"
  Configuring OpenSSL version 3.0.0 for target linux-x86_64
  Using os-specific seed configuration

  --- stderr

  Failure!  Makefile wasn't produced.
  Please read INSTALL.md and associated NOTES-* files.  You may also have to
  look over your available compiler tool chain or change your configuration.

  Something went wrong with /tmp/openssl-src-rs/target/debug/build/testcrate-bf767f3278c421fb/out/openssl-build/build/src/fuzz/build.info: No such file or directory
  thread 'main' panicked at '

  Error configuring OpenSSL build:
      Command: "perl" "./Configure" "--prefix=/tmp/openssl-src-rs/target/debug/build/testcrate-bf767f3278c421fb/out/openssl-build/install" "no-dso" "no-shared" "no-ssl3" "no-unit-test" "no-comp" "no-zlib" "no-zlib-dynamic" "--libdir=lib" "no-legacy" "no-md2" "no-rc5" "no-weak-ssl-ciphers" "no-camellia" "no-idea" "no-seed" "linux-x86_64" "-O2" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-m64"
      Exit status: exit status: 2

      ', /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/openssl-src-300.0.0+3.0.0/src/lib.rs:482:13
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
alexcrichton commented 3 years ago

Indeed yeah this is being worked on in https://github.com/alexcrichton/openssl-src-rs/pull/104

ValHeimer commented 3 years ago

with v300.0.1+3.0.0 other error

comes from https://github.com/alexcrichton/openssl-src-rs/blob/7e9d7e9dabbdeee4a51037a7298bc32171a9dd03/Cargo.toml#L14

[/tmp/openssl-src-rs/testcrate] $ cargo build --all-features
   Compiling testcrate v0.1.0 (/tmp/openssl-src-rs/testcrate)
error: failed to run custom build command for `testcrate v0.1.0 (/tmp/openssl-src-rs/testcrate)`

Caused by:
  process didn't exit successfully: `/tmp/openssl-src-rs/target/debug/build/testcrate-fe4e7b0212f5c6e4/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-changed=build.rs
  CC_x86_64-unknown-linux-gnu = None
  CC_x86_64_unknown_linux_gnu = None
  HOST_CC = None
  CC = None
  CFLAGS_x86_64-unknown-linux-gnu = None
  CFLAGS_x86_64_unknown_linux_gnu = None
  HOST_CFLAGS = None
  CFLAGS = None
  CRATE_CC_NO_DEFAULTS = None
  DEBUG = Some("true")
  CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
  running "perl" "./Configure" "--prefix=/tmp/openssl-src-rs/target/debug/build/testcrate-01046a57072fa0ba/out/openssl-build/install" "no-dso" "no-shared" "no-ssl3" "no-tests" "no-comp" "no-zlib" "no-zlib-dynamic" "--libdir=lib" "no-legacy" "no-md2" "no-rc5" "no-weak-ssl-ciphers" "no-camellia" "no-idea" "no-seed" "linux-x86_64" "-O2" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-m64"
  Configuring OpenSSL version 3.0.0 for target linux-x86_64
  Using os-specific seed configuration

  --- stderr

  Failure!  Makefile wasn't produced.
  Please read INSTALL.md and associated NOTES-* files.  You may also have to
  look over your available compiler tool chain or change your configuration.

  Something went wrong with /tmp/openssl-src-rs/target/debug/build/testcrate-01046a57072fa0ba/out/openssl-build/build/src/doc/build.info: No such file or directory
  thread 'main' panicked at '

  Error configuring OpenSSL build:
      Command: "perl" "./Configure" "--prefix=/tmp/openssl-src-rs/target/debug/build/testcrate-01046a57072fa0ba/out/openssl-build/install" "no-dso" "no-shared" "no-ssl3" "no-tests" "no-comp" "no-zlib" "no-zlib-dynamic" "--libdir=lib" "no-legacy" "no-md2" "no-rc5" "no-weak-ssl-ciphers" "no-camellia" "no-idea" "no-seed" "linux-x86_64" "-O2" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-m64"
      Exit status: exit status: 2

      ', /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/openssl-src-300.0.1+3.0.0/src/lib.rs:486:13
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
alexcrichton commented 3 years ago

cc @lupine

lupine commented 3 years ago

That's unfortunate :grimacing:. That CI test must not be working correctly either, then.

I won't be able to look at this until the weekend.

sfackler commented 3 years ago

It looks like ci/run.sh isn't actually used anymore which is why the tests added there didn't catch this.