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

Windows build fails on Github Actions due to openssl-sys #1191

Closed
clux opened this issue Apr 8, 2023 · 0 comments · Fixed by #1261
Closed

Windows build fails on Github Actions due to openssl-sys #1191

clux opened this issue Apr 8, 2023 · 0 comments · Fixed by #1261
Labels
bug Something isn't working help wanted Not immediately prioritised, please help! openssl openssl-tls related

Comments

@clux
Copy link
Member

clux commented Apr 8, 2023

Current and expected behavior

Sometimes the unit-test ci's basic cargo build step fails on windows-latest on Github Actions.
Some PRs worked after it originally failed in #1079 (which obviously is innocent),
but now it fails everywhere. Possible this is due to some update in the action's windows image, but really have no idea.

Error output:

error: failed to run custom build command for `openssl-sys v0.9.84`

Caused by:
  process didn't exit successfully: `D:\a\kube\kube\target\debug\build\openssl-sys-1b735a2c3ed0f4a1\build-script-main` (exit code: 101)
  --- stdout
  cargo:rerun-if-env-changed=X86_64_PC_WINDOWS_MSVC_OPENSSL_LIB_DIR
  X86_64_PC_WINDOWS_MSVC_OPENSSL_LIB_DIR unset
  cargo:rerun-if-env-changed=OPENSSL_LIB_DIR
  OPENSSL_LIB_DIR = C:/Program Files/OpenSSL-Win64/lib
  cargo:rerun-if-env-changed=X86_64_PC_WINDOWS_MSVC_OPENSSL_INCLUDE_DIR
  X86_64_PC_WINDOWS_MSVC_OPENSSL_INCLUDE_DIR unset
  cargo:rerun-if-env-changed=OPENSSL_INCLUDE_DIR
  OPENSSL_INCLUDE_DIR = C:/Program Files/OpenSSL-Win64/include

  --- stderr
  thread 'main' panicked at 'OpenSSL library directory does not exist: ["C:/Program Files/OpenSSL-Win64/lib"]', C:\Users\runneradmin\.cargo\registry\src\git.luolix.top-1ecc6299db9ec823\openssl-sys-0.9.84\build/main.rs:83:9
  stack backtrace:
     0: std::panicking::begin_panic_handler
               at /rustc/9eb3afe9ebe9c7d2b84b71002d44f4a0edac95e0/library\std\src\panicking.rs:575
     1: core::panicking::panic_fmt
               at /rustc/9eb3afe9ebe9c7d2b84b71002d44f4a0edac95e0/library\core\src\panicking.rs:64
     2: build_script_main::main
               at .\build\main.rs:83
     3: core::ops::function::FnOnce::call_once<void (*)(),tuple$<> >
               at /rustc/9eb3afe9ebe9c7d2b84b71002d44f4a0edac95e0\library\core\src\ops\function.rs:250
  note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
warning: build failed, waiting for other jobs to finish...
Error: Process completed with exit code 1.

From a search in upstream; this issue seems very similar: sfackler/rust-openssl#1525 which was closed without solutions. This one also has the same error at some point: sfackler/rust-openssl#1737, as does this: sfackler/rust-openssl#1600

Possible solution

Fix the issue with some windows magic. Not my speciality, but could be an easy fix for someone who knows how it works.

Alternatives involve more rustls #1192

Environment

GHA windows-latest

Configuration and features

default features cargo build

Affected crates

kube

Would you like to work on fixing this bug?

No

@clux clux added bug Something isn't working openssl openssl-tls related help wanted Not immediately prioritised, please help! labels Apr 8, 2023
clux added a commit that referenced this issue Apr 16, 2023
Signed-off-by: clux <sszynrae@gmail.com>
clux added a commit that referenced this issue May 5, 2023
* Path filter CI jobs

wanted to test a thing.

Signed-off-by: clux <sszynrae@gmail.com>

* ok only one of these are allowed

Signed-off-by: clux <sszynrae@gmail.com>

* ok need to run the required ones

Signed-off-by: clux <sszynrae@gmail.com>

* ok include ci configuration files

Signed-off-by: clux <sszynrae@gmail.com>

* lift tls default into facade crate

Signed-off-by: clux <sszynrae@gmail.com>

* try to hack around openssl on windows ci for #1191

Signed-off-by: clux <sszynrae@gmail.com>

* ping hooks - 2023-04-16

Signed-off-by: clux <sszynrae@gmail.com>

* not sure why this does not work..

Signed-off-by: clux <sszynrae@gmail.com>

* ah, syntax

Signed-off-by: clux <sszynrae@gmail.com>

* even hackier

Signed-off-by: clux <sszynrae@gmail.com>

* forgot one

Signed-off-by: clux <sszynrae@gmail.com>

* tired

Signed-off-by: clux <sszynrae@gmail.com>

* remove codecov status checks

Signed-off-by: clux <sszynrae@gmail.com>

* status limit nesting

Signed-off-by: clux <sszynrae@gmail.com>

* try another coverage permutation

Signed-off-by: clux <sszynrae@gmail.com>

* ..don't change default yet

Signed-off-by: clux <sszynrae@gmail.com>

* debug

Signed-off-by: clux <sszynrae@gmail.com>

* simpler sed for windows runner...

Signed-off-by: clux <sszynrae@gmail.com>

* try again with explicit shell

Signed-off-by: clux <sszynrae@gmail.com>

* remove old line

Signed-off-by: clux <sszynrae@gmail.com>

* wtf

Signed-off-by: clux <sszynrae@gmail.com>

* giving up

Signed-off-by: clux <sszynrae@gmail.com>

---------

Signed-off-by: clux <sszynrae@gmail.com>
@clux clux linked a pull request Jul 20, 2023 that will close this issue
@clux clux closed this as completed in #1261 Sep 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Not immediately prioritised, please help! openssl openssl-tls related
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant