• Bug#1109669: rustc: Please add patch to fix FTBFS on x32

    From John Paul Adrian Glaubitz@21:1/5 to All on Mon Jul 21 16:40:01 2025
    This is a multi-part MIME message sent by reportbug.


    Source: rustc
    Version: 1.86.0+dfsg1-1~exp2
    Severity: normal
    Tags: ftbfs patch
    X-Debbugs-Cc: debian-amd64@lists.debian.org
    User: debian-x32@lists.debian.org
    Usertags: x32

    Hi,

    I was finally able to bootstrap rustc on x32 again. \o/

    However, it needs the following attached patch to fully build.

    I will open a pull request on Github get it fixed upstream as well.

    Thanks,
    Adrian

    --
    .''`. John Paul Adrian Glaubitz
    : :' : Debian Developer
    `. `' Physicist
    `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913

    --- rustc-1.86.0+dfsg1.orig/src/tools/rust-analyzer/crates/hir-def/src/hir/type_ref.rs
    +++ rustc-1.86.0+dfsg1/src/tools/rust-analyzer/crates/hir-def/src/hir/type_ref.rs
    @@ -170,7 +170,7 @@ pub enum TypeRef {
    Error,
    }

    -#[cfg(target_arch = "x86_64")]
    +#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
    const _: () = assert!(size_of::<TypeRef>() == 16);

    pub type TypeRefId = Idx<TypeRef>;
    --- rustc-1.86.0+dfsg1.orig/src/tools/rust-analyzer/crates/hir-def/src/path.rs +++ rustc-1.86.0+dfsg1/src/tools/rust-analyzer/crates/hir-def/src/path.rs
    @@ -65,7 +65,7 @@ pub enum Path {
    }

    // This type is being used a lot, make sure it doesn't grow unintentionally. -#[cfg(target_arch = "x86_64")]
    +#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
    const _: () = {
    assert!(size_of::<Path>() == 16);
    assert!(size_of::<Option<Path>>() == 16);

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)