[Pkg-rust-maintainers] Bug#1019234: rustc: cross-build to windows?

Samuel Thibault sthibault at debian.org
Mon Sep 5 23:38:54 BST 2022


Package: rustc
Version: 1.59.0+dfsg1-2
Severity: normal

Hello,

I am trying to have a look at shipping
https://github.com/RastislavKish/nvda2speechd/ in Debian, to make
applications running in wine get access to the Debian-provided speech
syntheses. The README file basically says:

rustup target add x86_64-pc-windows-gnu
rustup target add i686-pc-windows-gnu

cd src/client
cargo build --release --target x86_64-pc-windows-gnu
cargo build --release --target i686-pc-windows-gnu


This is however failing:

$ cargo build --release --target x86_64-pc-windows-gnu  -j 1
   Compiling cfg-if v1.0.0
error[E0463]: can't find crate for `core`
  |
  = note: the `x86_64-pc-windows-gnu` target may not be installed
  = help: consider downloading the target with `rustup target add x86_64-pc-windows-gnu`

error[E0463]: can't find crate for `compiler_builtins`

For more information about this error, try `rustc --explain E0463`.
error: could not compile `cfg-if` due to 2 previous errors


This is quite expected that Debian doesn't ship the windows core by
default. I'm not sure if that could be something that could be
done?

AIUI using rustup is not the way Debian will go for shipping rust piece.



Alternatively, rustc --explain E0463 tells one can use -Z build-std to
build the core on the fly. This is however failing:

$ cargo build --release --target x86_64-pc-windows-gnu -Z build-std          
error: "/usr/lib/rustlib/src/rust/Cargo.lock" does not exist, unable to build with the standard library, try:
        rustup component add rust-src


Copying by hand Cargo.lock there brings further, but then we have:

$ cargo build --release --target x86_64-pc-windows-gnu -Z build-std  -j1
   Compiling cfg-if v1.0.0
error: the option `Z` is only accepted on the nightly compiler

error: could not compile `cfg-if`

which also seems like a no-go.


I don't know how we can progress on this?

Samuel

-- System Information:
Debian Release: bookworm/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable-debug'), (500, 'testing-debug'), (500, 'stable-security'), (500, 'stable-debug'), (500, 'proposed-updates-debug'), (500, 'proposed-updates'), (500, 'oldstable-proposed-updates-debug'), (500, 'oldstable-proposed-updates'), (500, 'oldoldstable'), (500, 'buildd-unstable'), (500, 'unstable'), (500, 'stable'), (500, 'oldstable'), (1, 'experimental-debug'), (1, 'buildd-experimental'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386, arm64

Kernel: Linux 5.19.0 (SMP w/8 CPU threads; PREEMPT)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages rustc depends on:
ii  binutils              2.38.90.20220713-2
ii  gcc                   4:12.1.0-3
ii  libc6                 2.34-7
ii  libc6-dev [libc-dev]  2.34-7
ii  libgcc-s1             12.2.0-1
ii  libstd-rust-dev       1.59.0+dfsg1-2

Versions of packages rustc recommends:
ii  cargo    0.57.0-7+b1
ii  llvm-13  1:13.0.1-7

Versions of packages rustc suggests:
ii  clang-13  1:13.0.1-7
ii  lld-13    1:13.0.1-7

-- no debconf information

-- 
Samuel
---
Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'Inria.



More information about the Pkg-rust-maintainers mailing list