-
-
Notifications
You must be signed in to change notification settings - Fork 419
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
Can't Compile on CentOS 7.2 #1331
Comments
@fribeiro1 What version of LLVM are you using? Did you build from source or install a prebuilt binary? |
@Theodus I've installed from the latest ponyc-release package. |
Can you give the program you're trying to compile and the output from the compiler? |
@Praetonus It is actually failing for every program with the same "Illegal instruction (core dumped)" message. |
Can you get a debugger stack trace and disassembly of the crash location? Also, what is your CPU? |
@Praetonus The requested information follows below: Stack Trace
CPU Info
Let me know if you need more info. |
@fribeiro1 - can you check your virtualbox version against this note in the README? |
I think it's the same issue as #1176. Your processor supports AVX instructions and LLVM 3.8 incorrectly assumes that it also supports AVX-512. This bug is fixed in LLVM 3.9 but we have a few issues to resolve before we can distribute pre-built packages with LLVM 3.9. Until then, I'd recommend to build from source with LLVM 3.9. |
@jemc Unfortunatelly I am using VirtualBox 5.0.26 r108824 already |
This is most likely due to the Travis CI build server CPU having |
Would it make sense to turn off AVX2 in the default builds? I'm unsure of its impact. |
@SeanTAllen In the mean time, I will try to build it from the source instead. |
For now, we have decided to document the limitation here. You have to have a AVX2 compatible CPU to use pre-built packages. Otherwise you need to build from source. This should be added to install instructions in the README. |
You can check if your CPU supports AVX2 using |
Just submitted #1369 to make the change. |
Please keep in mind that Travis runs on GCE (https://docs.travis-ci.com/user/trusty-ci-environment#Overview) and GCE machines can have any of the following CPUs ( The newer CPUs will likely have features that the older ones are unlikely to have and just labeling AVX2 as a requirement for the pre-built packages in the documentation may not be sufficient. Also, some of the CPUs available in GCE don't have AVX2 so the pre-built packages would work for folks without an AVX2 compatible CPU if the CI ran on the appropriate CPU. |
@dipinhora I'd rather warn about AVX2 and update as we learn about other required features than not publishing that information now |
@dipinhora We could disable AVX2 with |
@fribeiro1 My intent wasn't to discourage the addition into the documentation. @Praetonus I think the appropriate solution is to decide on the oldest system architecture that we want to support and target it with a |
@dipinhora That makes sense. For the runtime problem, we could build with Clang on Linux, which would enable us to ship the LLVM bitcode version of the runtime in the packages. The downside is that we wouldn't be testing the compiler against GCC anymore (currently we're doing GCC on Linux and Clang on OSX). @ponylang/core Any input on what we should set as our baseline Travis architecture? If we decide to ship the LLVM bitcode runtime in the packages, generic |
@Praetonus I had the same thought re: the runtime bitcode and found the existing support in the compiler to rely on it. We'd likely have to make that automatic where if the runtime bitcode file exists, it is used automagically as opposed to having to require the user to pass the option to ponyc. I also found the following reference on Wikipedia Additionally, IIRC from the ARM cross compiling work, there are some C compile time related decisions that impact how Pony behaves made via In terms of the baseline target, it's probably a good idea to create two targets, one for 32 bit ( |
The main issue with using the runtime bitcode by default is that we're running the optimisation pipeline after merging the program and the runtime modules together to get some very good whole-program-optimisations, and that takes a lot of time. But we could certainly supply a I've never worked with GCC's IR but I've heard that it's a pain to work with. I'll look into what can be done. |
I'm not sure I follow. Are you saying we would want to default to Also, I have a strong suspicion that note in Wikipedia may have been linked to DragonEgg (http://dragonegg.llvm.org/) which is deprecated at this point. Your suggestion about using clang on linux is likely the best option available for generic compiler packages that still support the highest performance code generation by using the runtime llvm bitcode. This would actually be a performance improvement for anyone with a CPU with features the CI server CPU didn't have. |
The performances of a program built with the runtime bitcode without WPO would be the same as a program linked with the static library (or a bit better, because of the possible CPU feature differences). There would certainly be a difference between WPO and non-WPO but that difference would be on the call boundaries between the program and the runtime. Each of the components would still be fully optimised separately in a release build. I'd say that the large majority of the program builds out there are development builds, where full performance isn't needed, but where compilation times matter. If somebody is doing a production build, they can ask for full WPO. Actually, we might even want to tune the default behaviour based on the type of build. Or even based on flags when building the compiler itself. I think I'll do a RFC to clarify all of that. Regarding Clang and GCC, I'm currently considering whether pushing ponyc towards a tighter integration with Clang would be a good thing. That would enable us to do some nice things with FFI and the runtime but the available features of ponyc would depend on the availability of Clang and its libraries. But since LLVM and Clang are a package deal and we already depend on LLVM, maybe that would be feasible. Well, it also deserves a RFC. |
NOTE: When I mention I think enabling WPO by default for release builds and disabling it by default for debug builds makes a lot of sense and follows current standards where debug builds disable optimization passes that are enabled for release builds. Default behavior is already dependent on type of build where the debug builds generate debug info and disable optimization passes where the release builds do the opposite. There are likely other differences also but I'm not aware of all of them. I can't comment on the Clang coupling much but will gladly lurk and read the RFC. 8*D |
Agreed. When I'm iteratively developing and want fast compile times, I always compile my pony programs |
I believe this should be fixed by #1663. And a new version of pony 0.11.1 will be released soon. Can you please give 0.11.1 a try after it is released and see if your issues are fixed. In the meantime, I'm going to close this issue under the assumption that its been fixed. |
All compilations w/ 0.5.1-2115.33eefb1 are failing with the "Illegal instruction (core dumped)" message on CentOS 7.2 and VirtualBox 5.0.26 r108824.
Please advise.
The text was updated successfully, but these errors were encountered: