BinaryBuilder.jl
BinaryBuilder.jl copied to clipboard
Single-member struct uses wrong ABI on win64
This is a gcc bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64243
From https://github.com/JuliaLang/julia/issues/28325
cc: @barche
I dream of using clang everywhere (if only flang was production ready)
We can build clang
for windows and ship it with our BinaryBuilder so that users can opt into it with CC=clang
.
Another possible workaround is building with MSVC, this is pretty easy using AppVeyor. But then there are other caveats due to not using the exact same compiler as the one used for Julia. Since this bug was reported with GCC in 2014 already, it doesn't seem to have a very high priority...
We now ship a bevvy of compilers; you can opt-in to clang
at any time, so I'm going to close this as fixed.
With CxxWrap fully relying on BinaryBuilder binaries now, this came up again in the tests:
https://github.com/JuliaInterop/CxxWrap.jl/pull/274/checks?check_run_id=1622273928#step:5:54
I don't know if anyone reading this knows the GCC internals well enough to patch this? I could switch to clang for libcxxwrap-julia, but that would mean all the dependents need to make the switch too. Seems overkill for what appears to be a simple bug on the surface. Alternatively, I could attempt to pad the struct used for strictly typed numbers with an integer or something on Windows, but that seems like an ugly workaround, and it won't solve hard-to-catch errors if this manifests elsewhere.
This is actually resolved upstream: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64243
But GCC 9.1 is still affected, any chance we could upgrade the 9 series to 9.3 and maybe add GCC 10 too? Where and how are these compiler shards defined and built?
and maybe add GCC 10 too?
https://github.com/JuliaPackaging/Yggdrasil/pull/2301
Do we have the patch which fixed the issue? It might be worth backporting it as far as possible
I have no idea when and in what commit this was fixed, unfortunately.
@barche you can try GCC 10 ~here: https://github.com/JuliaPackaging/BinaryBuilderBase.jl/pull/96~ with BinaryBuilderBase#master
What's the status of this?
Should be fixed with GCC 10, the problem is that we can't really use GCC to build any C++ library at the moment
I can confirm that setting preferred_gcc_version
to version 10 fixes this.