-
Notifications
You must be signed in to change notification settings - Fork 5
Description
Describe the bug
First discovered in #7 (comment), and posted upstream cloudflare/boring#121.
The windows build of the quic native module uses the MSVC toolchain for rust. Everything is working until it hits something involving boring-sys crate. This crate is for the tls stack, and the -sys packages always involves deeper compiler tools. In this case, being something that uses C/C++ and even the assembler.
The error being:
thread 'main' panicked at '"enum_(unnamed_at_deps/boringssl/src/include\\openssl/err_h_291_1)" is not a valid Ident', C:\Users\gitlab_runner\.cargo\registry\src\github.com-1ecc6299db9ec823\proc-macro2-1.0.56\src\fallback.rs:811:9
stack backtrace:
0: std::panicking::begin_panic_handler
at /rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library\std\src\panicking.rs:575
1: core::panicking::panic_fmt
at /rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library\core\src\panicking.rs:64
2: proc_macro2::fallback::is_ident_continue
3: <proc_macro2::fallback::Group as core::fmt::Debug>::fmt
4: proc_macro2::fallback::Ident::new
5: proc_macro2::imp::Ident::new
6: proc_macro2::Ident::new
7: bindgen::ir::context::BindgenContext::rust_ident_raw
8: bindgen::ir::context::BindgenContext::rust_ident
9: <bindgen::ir::enum_ty::Enum as bindgen::codegen::CodeGenerator>::codegen
10: <bindgen::ir::ty::Type as bindgen::codegen::CodeGenerator>::codegen
11: <bindgen::ir::item::Item as bindgen::codegen::CodeGenerator>::codegen
12: <bindgen::ir::module::Module as bindgen::codegen::CodeGenerator>::codegen::{{closure}}
13: <bindgen::ir::module::Module as bindgen::codegen::CodeGenerator>::codegen
14: <bindgen::ir::item::Item as bindgen::codegen::CodeGenerator>::codegen
15: bindgen::codegen::codegen::{{closure}}
16: bindgen::ir::context::BindgenContext::gen
17: bindgen::codegen::codegen
18: <bindgen::BindgenOptions as core::default::Default>::default
19: bindgen::Builder::generate
20: <core::slice::iter::Iter<T> as core::iter::traits::iterator::Iterator>::next
21: core::ops::function::FnOnce::call_once{{vtable.shim}}
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Right now there's no clues on what to do here... except perhaps to try and match the GitHub action CI that is being used on the https://github.com/cloudflare/boring project. In particular their CI is actually building something and then testing it on Windows.
The last successful build is: https://github.com/cloudflare/boring/actions/runs/4949623099/jobs/8852046264.
Somethings to investigate:
- We're using a much later version of LLVM/clang. They are using:
Installing LLVM and Clang 11.0 (11.0.1)... Downloading and extracting 'https://github.com/llvm/llvm-project/releases/download/llvmorg-11.0.1/LLVM-11.0.1-win64.exe'... - Consider matching the NASM versions too
If all else fails, we could try cross-compiling everything. Furthermore I haven't tested this on our local windows computer, that may provide more clues and this may be something specific to the Gitlab windows CI machine.
To Reproduce
- Reproduced here: https://gitlab.com/MatrixAI/open-source/js-quic/-/jobs/4300087852
Expected behavior
Should just build like macos and linux atm.