Closed erenon closed 1 month ago
Thanks for the report! I put up a PR to address this.
I'm curious which platform are you compiling for? I'll look more closely at the compiler output to see what other messages need to be dealt with.
Platform: Ubuntu 22.04, x86_64, clang 14. Anything specific you are interested in?
Ok, I wasn't finding the warning messages you reported at first b/c I was using gcc. When I switched the compiler to clang, I saw them.
I confirmed that on the PR branch that those messages are now gone. The remaining compiler warning messages are intentional for debug/diagnostic purposes:
❯ cargo build -p aws-lc-sys
Compiling libc v0.2.156
Compiling once_cell v1.19.0
Compiling fs_extra v1.3.0
Compiling dunce v1.0.5
Compiling paste v1.0.15
Compiling jobserver v0.1.32
Compiling cc v1.0.105
Compiling cmake v0.1.51
Compiling aws-lc-sys v0.22.0 (/home/justsmth/repos/aws-lc-rs/aws-lc-sys)
warning: aws-lc-sys@0.22.0: Building with: CC
warning: aws-lc-sys@0.22.0: Symbol Prefix: Some("aws_lc_0_22_0")
warning: aws-lc-sys@0.22.0: Compilation of 'c11.c' succeeded - Ok(["/home/justsmth/repos/aws-lc-rs/target/debug/build/aws-lc-sys-901ad5fa76471ad9/out/out-c11/65c584faa52a237e-c11.o"]).
warning: aws-lc-sys@0.22.0: CC environment variable set: clang
warning: aws-lc-sys@0.22.0: CXX environment variable set: clang++
warning: aws-lc-sys@0.22.0: Compilation of 'stdalign_check.c' succeeded - Ok(["/home/justsmth/repos/aws-lc-rs/target/debug/build/aws-lc-sys-901ad5fa76471ad9/out/out-stdalign_check/65c584faa52a237e-stdalign_check.o"]).
warning: aws-lc-sys@0.22.0: Compilation of 'builtin_swap_check.c' succeeded - Ok(["/home/justsmth/repos/aws-lc-rs/target/debug/build/aws-lc-sys-901ad5fa76471ad9/out/out-builtin_swap_check/65c584faa52a237e-builtin_swap_check.o"]).
Finished `dev` profile [unoptimized + debuginfo] target(s) in 11.47s
I'm facing a similar issue building on Windows & Visual studio.
I updated both VS Code and CMake to the latest versions.
warning: aws-lc-sys@0.22.0: Building with: CMake
warning: aws-lc-sys@0.22.0: Symbol Prefix: Some("aws_lc_0_22_0")
warning: aws-lc-sys@0.22.0: CMAKE environment variable set: cmake
warning: aws-lc-sys@0.22.0: cl : Command line error D8021 : invalid numeric argument '/Wno-unused-parameter'
Unfortunately the workaround for me was to switch from rustls
to native-tls
in my project's dependencies using crate features
Hello @leontoeides -- I've seen the warning about '/Wno-unused-parameter'
occur on Windows, but I wouldn't expect it to cause the build to fail. (You can see the same warning in our CI builds for Windows, but the build and subsequent tests succeed.) I'm curious whether there might be more information you can provide about your build failure?
We hope to have a patch out to soon to correct these issues. Thanks for contacting us!
Apologies - I inadvertently fixed the issue when I realigned some features across a few crates I use. I'm not able to duplicate the build error anymore. If it happens again I will post the full log. Thanks for the response
I managed ran into this error again on a completely separate project. Here is the output:
The output indicates that there are 1 Warning and 4 Errors:
1 Warning(s)
4 Error(s)
From what I've seen the warning would not cause an MSVC build to fail, but the errors would.
The 4 Errors appear to all be of the same type error C1083: Cannot open source file
, referring to a file (e.g.) Bowker\.cargo\registry\src\index.crates.io-6f17d22bba15001f\aws-lc-sys-0.22.0\generated-include
, with a subsequent message of No such file or directory
. The first such error is this:
/Bowker/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-sys-0.22.0/generated-include(1,1): error C1083: Cannot open source file: 'Bowker\.cargo\registry\src\index.crates.io-6f17d22bba15001f\aws-lc-sys-0.22.0\generated-include': No such file or directory [D:\Rust\redacted\target\debug\build\aws-lc-sys-7dad5723691bd22f\out\build\CMakeFiles\CMakeScratch\TryCompile-botd3j\cmTC_640e0.vcxproj]
(compiling source file '/Bowker/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-sys-0.22.0/generated-include')
Since the file it's looking for is under Bowker\.cargo\registry
, this seems like it might be an issue related to the local registry index getting corrupted somehow? Does the problem go away after a cargo update
or a cargo clean
?
Hello Justin, I tried cargo clean
and and I tried compiling on a different disk. No dice in either case. I moved the crate onto my work computer and compiled on there. It successfully compiled on my work laptop but I feel like I might be hearing from cybersecurity soon lol. It seems to be an issue with my personal computer. I will try reinstalling VS and CMake and see what happens. Thank you for helping look into this
Problem:
When building with bazel (using rules_rust bzlmod crate_universe), the following warning is printed many times:
I suspect it is coming from here: https://github.com/aws/aws-lc-rs/blob/671415fa90145746e4424275806ae0946504d044/aws-lc-sys/builder/cc_builder.rs#L108
Is there a reason pthread is added there like this (and not
-pthread
). To silence the warning,-Wno-unused-command-line-argument
should be specified.I can send a PR if any solution is deemed ok. thanks!
Relevant details
AWS-LC for Rust version: 0.21.2. Linux, x86_64.