Skip to content

mismatched ABI error on proc-macro expansion for source built rustc #20242

@Spector-Studios

Description

@Spector-Studios

Duplicated from termux/termux-packages#25360

rust-analyzer shows mismatched ABI on proc-macro expansion when rustc is built from source, but cargo build finishes without error.

The mismatch is:

expected: `rustc 1.88.0 (6b00bc388 2025-06-23)`
got `rustc 1.88.0 (6b00bc388 2025-06-23) (built from a source tarball)`
Full error

proc macro server error: Cannot create expander for /data/data/com.termux/files/home/acode/rust_tmp/target/debug/deps/libserde_derive-5cb703e84601d172.so: mismatched ABI expected: `rustc 1.88.0 (6b00bc388 2025-06-23)`, got `rustc 1.88.0 (6b00bc388 2025-06-23) (built from a source tarball)`
proc macro server error: Cannot create expander for /data/data/com.termux/files/home/acode/rust_tmp/target/debug/deps/libserde_derive-5cb703e84601d172.so: mismatched ABI expected: `rustc 1.88.0 (6b00bc388 2025-06-23)`, got `rustc 1.88.0 (6b00bc388 2025-06-23) (built from a source tarball)`

Screenshot Image

rust-analyzer version: 20250714

rustc version: rustc 1.88.0 (6b00bc388 2025-06-23) (built from a source tarball)

editor: helix

relevant settings: NA

code snippet to reproduce:

use serde::Deserialize;
use serde::Serialize;

fn main() {
    println!("test");
}

#[derive(Serialize, Deserialize, Debug)]
struct Test {
    name: String,
    x: f32,
    y: f32,
    height: f32,
    width: f32,
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions