Skip to content

i686-pc-windows-gnu std tests complain about duplicate symbol #59

@RalfJung

Description

@RalfJung
$ ./run-test.sh std --target i686-pc-windows-gnu --lib f32
[...]
error: multiple definitions of symbol `lgammaf_r`
    --> /home/r/.rustup/toolchains/miri/lib/rustlib/src/rust/library/std/src/f32.rs:1196:26
     |
1196 |         let x = unsafe { cmath::lgammaf_r(self, &mut signgamp) };
     |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ multiple definitions of symbol `lgammaf_r`
     |
help: it's first defined here, in crate `compiler_builtins`
    --> /home/r/.cargo/registry/src/index.crates.io-6f17d22bba15001f/compiler_builtins-0.1.108/src/math.rs:102:1
     |
102  | / intrinsics! {
103  | |     pub extern "C" fn lgamma_r(x: f64, s: &mut i32) -> f64 {
104  | |         let r = self::libm::lgamma_r(x);
105  | |         *s = r.1;
...    |
113  | |     }
114  | | }
     | |_^
help: then it's defined here again, in crate `compiler_builtins`
    --> /home/r/.cargo/registry/src/index.crates.io-6f17d22bba15001f/compiler_builtins-0.1.108/src/math.rs:102:1
     |
102  | / intrinsics! {
103  | |     pub extern "C" fn lgamma_r(x: f64, s: &mut i32) -> f64 {
104  | |         let r = self::libm::lgamma_r(x);
105  | |         *s = r.1;
...    |
113  | |     }
114  | | }
     | |_^
     = note: BACKTRACE (of the first span) on thread `f32::tests::test_ln_gamma`:
     = note: inside `realstd::f32::<impl f32>::ln_gamma` at /home/r/.rustup/toolchains/miri/lib/rustlib/src/rust/library/std/src/f32.rs:1196:26: 1196:63
note: inside `f32::tests::test_ln_gamma`
    --> library/std/src/f32/tests.rs:677:23
     |
677  |     assert_approx_eq!(1.0f32.ln_gamma().0, 0.0f32);
     |                       ^^^^^^^^^^^^^^^^^
note: inside closure
    --> library/std/src/f32/tests.rs:676:19
     |
675  | #[test]
     | ------- in this procedural macro expansion
676  | fn test_ln_gamma() {
     |                   ^
     = note: this error originates in the macro `intrinsics` which comes from the expansion of the attribute macro `test` (in Nightly builds, run with -Z macro-backtrace for more info)

note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

error: aborting due to 1 previous error

test f32::tests::test_ln_gamma ... error: test failed, to rerun pass `--lib`

This is of course twice the same symbol. But apparently we're getting compiler_builtins duplicated the same way core/alloc/std are duplicated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions