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 native builds fail to find crypto.lib and ssl.lib #55

Closed
LPardue opened this issue Jun 1, 2019 · 1 comment · Fixed by #57
Closed

Windows native builds fail to find crypto.lib and ssl.lib #55

LPardue opened this issue Jun 1, 2019 · 1 comment · Fixed by #57

Comments

@LPardue
Copy link
Contributor

LPardue commented Jun 1, 2019

I thought is would be "fun" to try and build quiche natively on Windows. After getting a bunch of perequisites installed (mainly for BoringSSL), I tried cargo build and saw a failure about linking crypto.lib and ssl.lib. A snipped build log

Running `rustc --edition=2018 --crate-name quiche src\lib.rs --color always --crate-type lib --crate-type staticlib --crate-type cdylib --emit=dep-info,link -C debuginfo=2 -C metadata=8d06e7d205e490ea --out-dir C:\Users\lucas\dev\GitHub\quiche\target\debug\deps -C incremental=C:\Users\lucas\dev\GitHub\quiche\target\debug\incremental -L dependency=C:\Users\lucas\dev\GitHub\quiche\target\debug\deps --extern lazy_static=C:\Users\lucas\dev\GitHub\quiche\target\debug\deps\liblazy_static-bb983748a81ac3f1.rlib --extern libc=C:\Users\lucas\dev\GitHub\quiche\target\debug\deps\liblibc-017498fec30aa81b.rlib --extern log=C:\Users\lucas\dev\GitHub\quiche\target\debug\deps\liblog-59ca255ca262bf24.rlib --extern ring=C:\Users\lucas\dev\GitHub\quiche\target\debug\deps\libring-8cd0ab404e521245.rlib -L native=C:\Users\lucas\dev\GitHub\quiche\target\debug\build\quiche-ef19236eef6de95c\out/build/crypto -L native=C:\Users\lucas\dev\GitHub\quiche\target\debug\build\quiche-ef19236eef6de95c\out/build/ssl -l static=crypto -l static=ssl -L native=C:\Users\lucas\dev\GitHub\quiche\target\debug\build\ring-7f8077d125f4de1f\out`

error: could not find native static library `crypto`, perhaps an -L flag is missing?

This seems to be an issue caused by the way Cmake is building BoringSSL. The files are actually dumped into a Debug folder e.g.

C:\Users\lucas\dev\GitHub\quiche\target\debug\build\quiche-ef19236eef6de95c\out/build/ssl/Debug

and for the release build, the output is dumped in a RelWithDebInfo folder e.g.

C:\Users\lucas\dev\GitHub\quiche\target\release\build\quiche-ef19276eef6de95c\out/build/ssl/RelWithDebInfo

Hacking these values manually into src/build.rs lets me do a successful build e.g.

let crypto_dir = format!("{}/build/crypto/RelWithDebInfo", bssl_dir);

However, that is not a viable solution.

@ghedo
Copy link
Member

ghedo commented Jun 2, 2019

This is probably because of a known bug in the cmake crate rust-lang/cmake-rs#18

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

Successfully merging a pull request may close this issue.

2 participants