generated from amazon-archives/__template_Custom
-
Notifications
You must be signed in to change notification settings - Fork 94
Open
Description
Problem:
I want to use this library in a rust project (for its fips feature), and I also want to use https://github.com/aws/aws-nitro-enclaves-sdk-c. Since aws-nitro-enclaves-sdk-c has no rust-port, I have to call it through ffi.
The problem is aws-nitro-enclaves-sdk-c also depends on aws-lc, thus I have to include this line in my build.rs
println!("cargo:rustc-link-lib=dylib=crypto");
Then my project will fail when linking with cc
= note: some arguments are omitted. use `--verbose` to show all linker arguments
= note: /usr/lib/gcc/x86_64-redhat-linux/7/../../../../lib64/libcrypto.a(bcm.c.o): In function `is_fips_build':
/tmp/crt-builder/aws-lc/build/../crypto/fipsmodule/service_indicator/service_indicator.c:12: multiple definition of `is_fips_build'
/target/x86_64-unknown-linux-gnu/debug/deps/libaws_lc_fips_sys-b54d10fa53b14c20.rlib(bcm.o):/home/sify/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/aws-lc-fips-sys-0.13.8/aws-lc/crypto/fipsmodule/service_indicator/service_indicator.c:12: first defined here
collect2: error: ld returned 1 exit status
I don't know how to get around this problem.
Solution:
A possible solution would be that aws-lc-rs provides a feature which turns off the internal building of aws-lc by itself, and depends on system library that I specified in my project. I don't know if it's possible.
Metadata
Metadata
Assignees
Labels
No labels