Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#1019234: rustc: cross-build to windows?

486 views
Skip to first unread message

Samuel Thibault

unread,
Sep 5, 2022, 6:50:04 PM9/5/22
to
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.

Sylvestre Ledru

unread,
Sep 6, 2022, 1:50:03 AM9/6/22
to
Salut Samuel,

Le 06/09/2022 à 00:38, Samuel Thibault a écrit :
> I don't know how we can progress on this?

We have been disabling windows & mac features to decrease the
maintenance cost on the rust ecosystem...

I would use the upstream rust/cargo infra to do it. It will be probably
easier.

Cheers

S

Samuel Thibault

unread,
Sep 6, 2022, 3:30:03 AM9/6/22
to
Sylvestre Ledru, le mar. 06 sept. 2022 07:38:42 +0200, a ecrit:
> Le 06/09/2022 à 00:38, Samuel Thibault a écrit :
> > I don't know how we can progress on this?
>
> We have been disabling windows & mac features to decrease the maintenance
> cost on the rust ecosystem...

You mean "in Debian"?

> I would use the upstream rust/cargo infra to do it. It will be probably
> easier.

Ok, but then it wouldn't be buildable on buildds?

Or you mean through using the rust-src package and such?

Samuel

Sylvestre Ledru

unread,
Sep 6, 2022, 3:40:04 AM9/6/22
to
Le 06/09/2022 à 09:19, Samuel Thibault a écrit :
> Sylvestre Ledru, le mar. 06 sept. 2022 07:38:42 +0200, a ecrit:
>> Le 06/09/2022 à 00:38, Samuel Thibault a écrit :
>>> I don't know how we can progress on this?
>>
>> We have been disabling windows & mac features to decrease the maintenance
>> cost on the rust ecosystem...
>
> You mean "in Debian"?
yeah

>> I would use the upstream rust/cargo infra to do it. It will be probably
>> easier.
>
> Ok, but then it wouldn't be buildable on buildds?
Correct

>
> Or you mean through using the rust-src package and such?
no, rustup + upstream rustc/cargo

Sylvestre
0 new messages