Skip to content

Release x86_64-pc-windows-gnu target of mingw-w64 6.x #61710

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
songdongsheng opened this issue Jun 10, 2019 · 7 comments
Closed

Release x86_64-pc-windows-gnu target of mingw-w64 6.x #61710

songdongsheng opened this issue Jun 10, 2019 · 7 comments
Labels
O-windows-gnu Toolchain: GNU, Operating system: Windows

Comments

@songdongsheng
Copy link

Currently, x86_64-pc-windows-gnu target build on mingw-w64 v5.x (2 years ago):

`
x86_64-6.3.0-release-posix-seh-rt_v5-rev2.7z

GNU ld (GNU Binutils) 2.27
gcc version 6.3.0 (x86_64-posix-seh-rev2, Built by MinGW-W64 project)
`

Nowadays, Debian 10 and Msys2 provide mingw-w64 v6.x:

# dpkg -l | grep mingw-w64 ii binutils-mingw-w64-x86-64 2.31.1-11+8.3 amd64 Cross-binutils for Win64 (x64) using MinGW-w64 ii gcc-mingw-w64-base 8.3.0-6+21.2 amd64 GNU Compiler Collection for MinGW-w64 (base package) ii gcc-mingw-w64-x86-64 8.3.0-6+21.2 amd64 GNU C compiler for MinGW-w64 targeting Win64 ii mingw-w64-common 6.0.0-3 all Common files for Mingw-w64 ii mingw-w64-x86-64-dev 6.0.0-3 all Development files for MinGW-w64 targeting Win64

This caused error 'undefined reference to `__onexitend''.

@mati865
Copy link
Contributor

mati865 commented Jun 10, 2019

Related #47048
Latest toolchain release by mingw-w64 couldn't build LLVM: #51989

@rustbot modify labels: +O-windows-gnu

@rustbot rustbot added the O-windows-gnu Toolchain: GNU, Operating system: Windows label Jun 10, 2019
@gnzlbg
Copy link
Contributor

gnzlbg commented Jun 29, 2019

@mati865 is there an a script somewhere to workaround this in appveyor ?

@mati865
Copy link
Contributor

mati865 commented Jun 29, 2019

@gnzlbg I don't know if there is script that automatically fixes everything (there are different errors depending on many things), you'd have to try replacing various *.a and .o files and changing linker to use external compiler.
If you point me the repo I'll try to get it working later today or tomorrow.

For the ultimate fix I think Rust should prefer to use external toolchain libs if they are available but I didn't have time to understand all the code involved in the linking.

@gnzlbg
Copy link
Contributor

gnzlbg commented Jun 29, 2019

I was working on this ctest PR which started triggering the issue because it uses fprintf from C: gnzlbg/ctest#73

@mati865
Copy link
Contributor

mati865 commented Aug 12, 2020

This issue is now obsolete since Rust prefers system C toolchain instead of shipped one so builds no longer fail with undefined reference to __onexitend.

@mati865
Copy link
Contributor

mati865 commented Feb 17, 2023

Mingw-w64 has been updated to latest version on nightly.

@Mark-Simulacrum
Copy link
Member

Closing as resolved per above.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
O-windows-gnu Toolchain: GNU, Operating system: Windows
Projects
None yet
Development

No branches or pull requests

5 participants