Skip to content

Rust windows toolchain has broken libraries #499

Open
@staticfloat

Description

@staticfloat

This seems to be an upstream problem, but there also seems to be a workaround:

With $target = i686-w64-mingw32:

# rustc -o ${prefix}/bin/hello_world${exeext} -g /usr/share/testsuite/rust/hello_world/hello_world.rs
...
[00:15:41]   = note: /opt/x86_64-linux-gnu/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/i686-pc-windows-gnu/lib/crt2.o:crtexe.c:(.text+0x75): undefined reference to `__onexitend'
[00:15:41]           /opt/x86_64-linux-gnu/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/i686-pc-windows-gnu/lib/crt2.o:crtexe.c:(.text+0x7a): undefined reference to `__onexitbegin'
[00:15:41]           /opt/i686-w64-mingw32/bin/../lib/gcc/i686-w64-mingw32/4.8.5/../../../../i686-w64-mingw32/bin/ld: /opt/x86_64-linux-gnu/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/i686-pc-windows-gnu/lib/crt2.o: bad reloc address 0x0 in section `.CRT$XCAA'
[00:15:41]           collect2: error: ld returned 1 exit status

X-ref: rust-lang/rust#32859 (comment)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions