-
Notifications
You must be signed in to change notification settings - Fork 210
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
Upgrade to cargo-c v0.10.0 + fix for cargo-c#383 #2228
Upgrade to cargo-c v0.10.0 + fix for cargo-c#383 #2228
Conversation
cmake/Modules/LocalRav1e.cmake
Outdated
# v0.9.32 is the highest version of cargo-c we can upgrade to without a build | ||
# failure (on Windows). See https://github.com/AOMediaCodec/libavif/pull/2223. | ||
set(AVIF_LOCAL_CARGOC_GIT_TAG v0.9.32) | ||
set(AVIF_LOCAL_CARGOC_GIT_TAG v0.10.0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @amyspark,
We (libavif) get a build error on Windows when we upgrade to cargo-c v0.10.0:
https://github.com/AOMediaCodec/libavif/actions/runs/9668355268/job/26672314397#step:6:1924
It is apparently related to your change "Implement installing MSVC debug symbols" in cargo-c v0.10.0. Could you take a look at this and see if you know what might be wrong?
I will try to reproduce the build error locally on my Windows laptop when I go home.
Thank you for your help!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi! From the looks of it I never thought of the case when Rust could not generate the PDB file on linking. However, I couldn't find what profile libavif's building rav1e with. Do you know if libavif is setting strip
to something other than none
, or alternatively, where it's selecting the build profile for rav1e?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @amyspark,
Thanks for taking a look! I am not familiar with Rust or rav1e, but you can find the relevant code by searching for "rav1e" in https://github.com/AOMediaCodec/libavif/blob/main/cmake/Modules/LocalRav1e.cmake.
I haven't had a chance to reproduce this build error on my Windows laptop.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I reproduced the error locally. There is no rav1e.pdb. I tested with both the release and debug profile. The contents of the output directory is:
[.] [..] .cargo-lock [.fingerprint] [build]
cargo-c-rav1e.cache [deps] [examples] [include] [incremental]
rav1e-uninstalled.pc rav1e.d rav1e.h rav1e.lib rav1e.pc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems that rav1e.pdb is not generated if --library-type=staticlib
is passed to cargo cinstall
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In lu-zero/cargo-c#279, we have:
tl;dr: if you install foo.dll you must also install foo.pdb next to it. Same with foo.exe. You can ignore static libraries.
Perhaps lu-zero/cargo-c@19ec991 should ignore static libraries?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One could still set on the release
profile to not generate debugging information for shared libraries, so I'd go with making this step skippable if the PDB file is not present.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right. It is best to assume the PDB file may not be present. Could you write a pull request for cargo-c? Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @amyspark, I filed a bug report for cargo-c v0.10.0: lu-zero/cargo-c#383
3b337bd
to
40ca934
Compare
No description provided.