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

fix: invalid -L path for build artifact search #223

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

poliorcetics
Copy link
Contributor

I haven't managed to link boring for either Linux, windows or macOS without this modification recently, which I find strange

Do you have any idea of what could be happening ?

During the 3.x to 4.x update, boring-sys rewrote most of its build script and as a result broke our
own builds. I suspect shenagigans due to nix or our cargo profile.

Inspecting the `OUT_DIR` showed that `OUT_DIR/build/{Release,crypto,ssl}` don't exist, instead all
the artifacts are in `OUT_DIR/build/` directly, so use that in the build script instead.
@rushilmehra
Copy link
Collaborator

What's the build error? And what version of boringssl are you building with?

@Guiguiprim
Copy link

The error is error: could not find native static library crypto, perhaps an -L flag is missing? when building an app using boring 4.5.0 on windows.

@PaulDance
Copy link

@rushilmehra would it be possible to review this again, please? I haven't tested recently, but I'm pretty sure we still have the issue. Thanks in advance.

@PaulDance
Copy link

Just tested it under 4.12.0 from crates.io and the issue persists.

@PaulDance
Copy link

Considering the patch on our end is now simply:

diff --git a/boring-sys/build/main.rs b/boring-sys/build/main.rs
index 86075d3c..3ff818b3 100644
--- a/boring-sys/build/main.rs
+++ b/boring-sys/build/main.rs
@@ -663,6 +663,10 @@ fn main() {
             bssl_dir.display(),
             build_path
         );
+        println!(
+            "cargo:rustc-link-search=native={}/build",
+            bssl_dir.display(),
+        );
     }
 
     if config.features.fips_link_precompiled {

this should probably be closed and re-opened @rushilmehra, as I have neither the possibility to change the source branch nor close this PR.

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 this pull request may close these issues.

4 participants