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
Failed to compile with clang 5 #9203
Comments
|
According to FYI the default version is 3.9 |
|
Hm, I actually passed that step as it seems like these conditions only apply if we pass clangx.y as script argument? This system I am using has all the latest build tools installed. final condition in build.sh that checks minimum version looks like this:
Compilation begins (after checking all the required dependencies) then fails with the error mentioned above. Is 5.0 too strict / missing features to compile coreclr? llvm folks are even going to release 5.0.1 in Q4 this year. Not sure why they had a leap from v4.0.1 to directly v5.0.0 all within one year. So I can understand it's hard to chase these versions (and perhaps no point to rush). I will downgrade to 4.0. Thanks. |
|
@kasper3 Probably if you don't specify When we introduce new compliers, there is chance that the source cannot be compiled since compilers contains non-stanard stuff like % That condition you mentioned is only for arm32 build, so if you build it for x86 or something else the lower versions will work. |
|
@kasper3 the 5.0 is not supported yet, we haven't tried to make it work. From time to time, I go and make it work on newer clang versions. There are almost always some details that need to be fixed due to the compiler being more strict etc. |
|
I have tried it locally and I can repro the problem. It turns out it is a bug in clang 5.0: |
|
The |
|
Thanks for this info Jan, I am also trying to make sure when next release of Alpine (3.7) is out with LLVM 5, we don’t miss any patch for coreclr and corert. The llvm patch you mentioned above is being applied to the ongoing llvm5 port in aports repo. Would you remove __declspec(selectany) from coreclr repo or was it an offline experiment? If it is the former, we can stop adding more patches to llvm50 in aports. 8-) |
|
@am11 it was just an experiment to see what else is possibly broken. I've also tried to replace it with the [[selectany]] attribute that I think would work even with the unpatched llvm 5.0, but that attribute needs to be used in a little different context (in front of a variable name instead of the whole declaration) and so I cannot just change the existing |
It seems like that's not necessary, or correct. Perhaps in the past it was, before all the PAL EH macros went in, for example. @sandreenko Any ideas? Want to fix it? |
Yes, I will clean the part with explicit constructors in the spmi code. |
|
I am also hit with exactly the same issue when trying to build coreclr in yocto for Raspberry pi. I raised an issue : https://github.com/dotnet/coreclr/issues/15197 Would like to know when can we expect a fix/patch for this? |
|
@sandreenko any progress on this? |
I am trying to build coreclr on ubuntu with llvm 5.0 and getting an error given below
coreclr/src/inc/cor.h:2210:1: error: __declspec attribute 'selectany' is not supported [-Werror,-Wignored-attributes]
is the latest version of llvm/clang officially supported?
The text was updated successfully, but these errors were encountered: