Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Single-member struct uses wrong ABI on win64 #315

Open
simonbyrne opened this issue Aug 1, 2018 · 13 comments
Open

Single-member struct uses wrong ABI on win64 #315

simonbyrne opened this issue Aug 1, 2018 · 13 comments

Comments

@simonbyrne
Copy link
Contributor

This is a gcc bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64243

From JuliaLang/julia#28325

cc: @barche

@vchuravy
Copy link
Member

vchuravy commented Aug 1, 2018

I dream of using clang everywhere (if only flang was production ready)

@staticfloat
Copy link
Member

We can build clang for windows and ship it with our BinaryBuilder so that users can opt into it with CC=clang.

@barche
Copy link
Contributor

barche commented Aug 2, 2018

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...

@staticfloat
Copy link
Member

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.

@barche
Copy link
Contributor

barche commented Dec 29, 2020

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.

@barche barche reopened this Dec 29, 2020
@barche
Copy link
Contributor

barche commented Dec 30, 2020

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?

@giordano
Copy link
Member

and maybe add GCC 10 too?

JuliaPackaging/Yggdrasil#2301

@giordano
Copy link
Member

Do we have the patch which fixed the issue? It might be worth backporting it as far as possible

@barche
Copy link
Contributor

barche commented Dec 31, 2020

I have no idea when and in what commit this was fixed, unfortunately.

@giordano
Copy link
Member

giordano commented Jan 7, 2021

@barche you can try GCC 10 here: JuliaPackaging/BinaryBuilderBase.jl#96 with BinaryBuilderBase#master

@fingolfin
Copy link
Member

What's the status of this?

@giordano
Copy link
Member

Should be fixed with GCC 10, the problem is that we can't really use GCC to build any C++ library at the moment

@barche
Copy link
Contributor

barche commented Apr 3, 2021

I can confirm that setting preferred_gcc_version to version 10 fixes this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants