You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am not sure if this is an issue with cargo-auditable, or with cargo-xwin, but since the backtrace suggests the culprit is cargo-auditable, I have opened an issue here.
I am on Linux, with cargo/rustc 1.83.0, cargo-auditable 0.6.6, and cargo-xwin 0.18.2.
Trying to run cargo auditable xwin build --target x86_64-pc-windows-msvc fails with
error: linker flavor `lld-link` is incompatible with the current target
Create a dummy build script and observe the command fail
$ echo"fn main() {}"> build.rs
$ cargo auditable xwin build --target x86_64-pc-windows-msvc...--- stderrerror: linker flavor `lld-link` is incompatible with the current target | = note: compatible flavors are: gnu, gnu-lld, gnu-cc, gnu-lld-cc, gcc, ld, ld.llderror: aborting due to 1 previous error
I believe this issue resides with cargo-auditable interacting (or even just buildling?) the build script, but being unhappy with the linker set by cargo-xwin? I know nothing of either internals, but I found a weird workaround: running cargo-auditable once withoutcargo-xwin ensures that subsequent invocations of the full command work, at least until the build script is modified again.
In the same project as above (with the build script), run cargo-auditable without xwin
After modifying the build script, the full command fails again
$ touch build.rs
$ cargo auditable xwin build --target x86_64-pc-windows-msvc...--- stderrerror: linker flavor `lld-link` is incompatible with the current target | = note: compatible flavors are: gnu, gnu-lld, gnu-cc, gnu-lld-cc, gcc, ld, ld.llderror: aborting due to 1 previous error
I have confirmed that when using the workaround the created binary is actually runnable on windows, and cargo audit bin finds the auditable metadata in the binary, so it seems that the workaround actually works, and not just silently fails somehow.
The text was updated successfully, but these errors were encountered:
Well, that looks like an intersection of cargo xwin, cargo auditable and Cargo's own caching. That's going to be fun to debug, I can already tell.
Could you also post the output of cargo +nightly config -Z unstable-options get in the sample project? I want to see if there are any local configuration values possibly affecting the build.
I am not sure if this is an issue with
cargo-auditable
, or withcargo-xwin
, but since the backtrace suggests the culprit iscargo-auditable
, I have opened an issue here.I am on Linux, with cargo/rustc 1.83.0, cargo-auditable 0.6.6, and cargo-xwin 0.18.2.
Trying to run
cargo auditable xwin build --target x86_64-pc-windows-msvc
fails witherror: linker flavor `lld-link` is incompatible with the current target
I can only reproduce this when using a build script:
cargo auditable xwin build --target x86_64-pc-windows-msvc
I believe this issue resides with
cargo-auditable
interacting (or even just buildling?) the build script, but being unhappy with the linker set bycargo-xwin
? I know nothing of either internals, but I found a weird workaround: runningcargo-auditable
once withoutcargo-xwin
ensures that subsequent invocations of the full command work, at least until the build script is modified again.cargo-auditable
without xwinI have confirmed that when using the workaround the created binary is actually runnable on windows, and
cargo audit bin
finds the auditable metadata in the binary, so it seems that the workaround actually works, and not just silently fails somehow.The text was updated successfully, but these errors were encountered: