Skip to content

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
Contributor

@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
Contributor

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

@PaulDance
Copy link
Contributor

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.

@PaulDance PaulDance mentioned this pull request Nov 27, 2024
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