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
Hello, I am trying to cross compile x86_64-pc-windows-gnu from my main arch linux machine x86_64-unknown-linux-gnu. Currently compilation of a binary depended on windows crate does not work, I get this error.
error: linker `clang` not found
|
= note: No such file or directory (os error 2)
error: could not compile `windows_x86_64_gnu` (build script) due to previous error
My system:
cross: 0.2.5
cargo: 1.71.0-nightly (09276c703 2023-05-16)
rustc: 1.71.0-nightly (9d871b061 2023-05-21)
What target(s) are you cross-compiling for?
x86_64-pc-windows-gnu
Which operating system is the host (e.g computer cross is on) running?
macOS
Windows
Linux / BSD
other OS (specify in description)
What architecture is the host?
x86_64 / AMD64
arm32
arm64 (including Mac M1)
What container engine is cross using?
docker
podman
other container engine (specify in description)
cross version
cross 0.2.5
Example
# cargo.toml
[package]
name = "crosswin"version = "0.1.0"edition = "2021"
[dependencies]
windows = "0.48.0"
// main.rsfnmain(){}
Additional information / notes
Builds fine without windows crate
The text was updated successfully, but these errors were encountered:
looks like something needs clang
I can't replicate your issue using the example you've provided, do you maybe have a .cargo/config.toml file with a custom linker set? cc #621
Hm, the only cargo config I have is in my home folder which has this. Should I create a repo to reproduce the issue? For me it breaks just as I add windows = "0.48.0" to dependencies of a hello world binary.
EDIT: I'm blind, i see clang, imma try without this 🤦
EDIT2: Yea it works
Checklist
Describe your issue
Hello, I am trying to cross compile
x86_64-pc-windows-gnu
from my main arch linux machinex86_64-unknown-linux-gnu
. Currently compilation of a binary depended onwindows
crate does not work, I get this error.My system:
0.2.5
1.71.0-nightly (09276c703 2023-05-16)
1.71.0-nightly (9d871b061 2023-05-21)
What target(s) are you cross-compiling for?
x86_64-pc-windows-gnu
Which operating system is the host (e.g computer cross is on) running?
What architecture is the host?
What container engine is cross using?
cross version
cross 0.2.5
Example
Additional information / notes
Builds fine without
windows
crateThe text was updated successfully, but these errors were encountered: