Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upCrystal does not compile with the latest LLVM version #1614
Comments
jhass
added
kind:feature
topic:compiler
labels
Sep 27, 2015
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
asterite
Sep 27, 2015
Contributor
Yes, this is a known "issue": LLVM 3.7 changes the way debug metadata is emitted
|
Yes, this is a known "issue": LLVM 3.7 changes the way debug metadata is emitted |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
jhass
Sep 28, 2015
Member
Well, Arch has 3.7 in testing (https://www.archlinux.org/packages/extra/x86_64/llvm/), so it would be great to have support for it when it lands in the stable repositories (probably in the next two weeks, I guess).
|
Well, Arch has 3.7 in testing (https://www.archlinux.org/packages/extra/x86_64/llvm/), so it would be great to have support for it when it lands in the stable repositories (probably in the next two weeks, I guess). |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
I was kinda optimistic I guess, llvm 3.7 just moved to community. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
Yap... Got the same issue now :/ |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
@asterite Any updates on this ? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
waj
Oct 7, 2015
Member
No progress yet, but 3.7 is not complete compatible with 3.6. Can't you install both versions side by side?
In Homebrew they didn't updated the main package because that would break many apps.
|
No progress yet, but 3.7 is not complete compatible with 3.6. Can't you install both versions side by side? In Homebrew they didn't updated the main package because that would break many apps. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
ozra
Oct 7, 2015
Contributor
Just taking a glance at it, it seems like the DataLayout should be moved from a pass to directly on the LLVM module. If it helps some one off in to digging deeper ;-)
|
Just taking a glance at it, it seems like the DataLayout should be moved from a pass to directly on the LLVM module. If it helps some one off in to digging deeper ;-) |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
jhass
Oct 7, 2015
Member
Arch doesn't provide a side by side install, however there's a llvm35 package, but that conflicts. So as soon as somebody wants to compile Crystal and use something else that depends on 3.7 already they'll be out of luck.
|
Arch doesn't provide a side by side install, however there's a llvm35 package, but that conflicts. So as soon as somebody wants to compile Crystal and use something else that depends on 3.7 already they'll be out of luck. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
vyp
Oct 7, 2015
Contributor
@jhass If you really need to, you could try using nix package manager for these sort of things which does allow side by side install, in addition to staying out of the way with the llvm installed by pacman (just adjust the $PATH). It has 3.6 and 3.7. Otherwise, maybe you still have 3.6 in your pacman cache, and you can just alternate between the two versions by rolling back/updating?
|
@jhass If you really need to, you could try using nix package manager for these sort of things which does allow side by side install, in addition to staying out of the way with the llvm installed by pacman (just adjust the |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
vyp
Oct 7, 2015
Contributor
Actually, it does not have crystal so that's probably too big of an issue. Scrap that.
|
Actually, it does not have crystal so that's probably too big of an issue. Scrap that. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
waj
Oct 7, 2015
Member
@jhass I've never use Arch so I don't really know how things works there, but given that llvm doesn't have a backward compatibility policy I'd say that not supporting side by side installs it's a bug :-)
Anyway, I'll try to update Crystal ASAP so we can link to 3.7.
|
@jhass I've never use Arch so I don't really know how things works there, but given that llvm doesn't have a backward compatibility policy I'd say that not supporting side by side installs it's a bug :-) Anyway, I'll try to update Crystal ASAP so we can link to 3.7. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
ozra
Oct 7, 2015
Contributor
It would be super cool if Crystal could support one version backwards all the time. Especially from 3.8, since it drops support for Win XP (I don't know why I care so much for those poor windows users, haha)
|
It would be super cool if Crystal could support one version backwards all the time. Especially from 3.8, since it drops support for Win XP (I don't know why I care so much for those poor windows users, haha) |
pushed a commit
to felixonmars/archlinux-community
that referenced
this issue
Oct 17, 2015
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
lbguilherme
Feb 5, 2016
Contributor
Fedora 23 already comes with LLVM 3.7 only, and installing 3.6 or 3.5 requires building from sources (there are no prebuilt packages for other versions).
|
Fedora 23 already comes with LLVM 3.7 only, and installing 3.6 or 3.5 requires building from sources (there are no prebuilt packages for other versions). |
AlexWayfer
referenced this issue
Feb 17, 2016
Closed
Current version of bin/crystal doesn't run #2173
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
waghanza
commented
Mar 11, 2016
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
asterite
Mar 19, 2016
Contributor
We only support LLVM 3.6 for now, so I'll close this. Eventually we will update the compiler to work with 3.8, but probably never with 3.7.
|
We only support LLVM 3.6 for now, so I'll close this. Eventually we will update the compiler to work with 3.8, but probably never with 3.7. |
asterite
closed this
Mar 19, 2016
anatol
changed the title from
Version 0.8.0 fails to compile with LLVM 3.7
to
Crystal does not compile with the latest LLVM version
Mar 19, 2016
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
anatol
Mar 19, 2016
Contributor
Instead of closing this issue I consider it tracking as "porting to the latest LLVM version". I renamed it, please reopen.
|
Instead of closing this issue I consider it tracking as "porting to the latest LLVM version". I renamed it, please reopen. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
Sounds good. |
asterite
reopened this
Mar 19, 2016
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
ysbaddaden
Apr 16, 2016
Member
With LLVM 3.8 released, some Linux distributions are upgrading or have already, sadly without support for installing different versions of llvm/clang in parallel. I'm trying to build an llvm36 package for Alpine so I can still build/provide a Crystal compiler for Alpine, but compiling llvm/clang takes hours
Is it a lot of hard work to upgrade? It seems that:
- DataLayout is now required by Module (removed
LLVMGetTargetMachineData); - JIT seems to become deprecated (but we use MCJIT);
- Changed debug info IR. I guess this is the hard part?
References:
|
With LLVM 3.8 released, some Linux distributions are upgrading or have already, sadly without support for installing different versions of llvm/clang in parallel. I'm trying to build an Is it a lot of hard work to upgrade? It seems that:
References: |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
asterite
Apr 16, 2016
Contributor
@ysbaddaden I can try and see how hard it's to migrate to LLVM 3.8. Debug info is the most difficult part, yes, though maybe we can comment all that functionality for now (it's very basic so not super useful). LLVM 3.8 (well, 3.7) comes with some goodies like being able to mark method arguments as nonnull, and dereferenceable(bytes), which might make code more performant (for non-nilable reference types we are sure they are non-null)
|
@ysbaddaden I can try and see how hard it's to migrate to LLVM 3.8. Debug info is the most difficult part, yes, though maybe we can comment all that functionality for now (it's very basic so not super useful). LLVM 3.8 (well, 3.7) comes with some goodies like being able to mark method arguments as |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
ysbaddaden
Apr 17, 2016
Member
That would be much appreciated! Even if it means no support for debugging for now when Crystal is built against LLVM 3.7+
|
That would be much appreciated! Even if it means no support for debugging for now when Crystal is built against LLVM 3.7+ |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
asterite
Apr 18, 2016
Contributor
Well, I just tried upgrading to LLVM 3.8 and the only thing that's necessary is upgrading the debug info. The problem is that this file, llvm_ext.cc must be upgraded. I think most of the original code came from here. Some functions can be upgraded by copy-paste but some disappeared from llvm's source code and I don't know how the upgrade should be done (@waj did that part).
So we have three options:
- Don't upgrade, stick with LLVM 3.6
- Upgrade, but drop debug info support.
- Upgrade by keeping debug support, but for that @waj or somebody that understands LLVM and that C++ code must upgrade it.
|
Well, I just tried upgrading to LLVM 3.8 and the only thing that's necessary is upgrading the debug info. The problem is that this file, llvm_ext.cc must be upgraded. I think most of the original code came from here. Some functions can be upgraded by copy-paste but some disappeared from llvm's source code and I don't know how the upgrade should be done (@waj did that part). So we have three options:
|
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
jhass
Apr 18, 2016
Member
Well, we should only consider 2 if we can retain compatibility with 3.5-3.7 in addition to 3.8 and conditionally drop it on 3.7 & 3.8 only, so one can at least get 3.5 or 3.6 and get debug support back until it's ported to 3.7/3.8.
|
Well, we should only consider 2 if we can retain compatibility with 3.5-3.7 in addition to 3.8 and conditionally drop it on 3.7 & 3.8 only, so one can at least get 3.5 or 3.6 and get debug support back until it's ported to 3.7/3.8. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
ysbaddaden
Apr 18, 2016
Member
Yes, what about 4. disable debug for LLVM > 3.7 until someone has time to spend on it?
|
Yes, what about 4. disable debug for LLVM > 3.7 until someone has time to spend on it? |
jhass
referenced this issue
Apr 22, 2016
Closed
Distribution of crystal in Debian (/Ubuntu ?) official releases #2499
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
felixbuenemann
Jul 18, 2016
Contributor
This also affects the homebrew formula, now that llvm 3.8.1 is current in homebrew.
|
This also affects the homebrew formula, now that llvm 3.8.1 is current in homebrew. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
#2993 should fix this very soon :) |
anatol commentedSep 27, 2015
I am trying to compile Crystal 0.8.0 on Linux Arch with LLVM 3.7 installed and get following error.
With LLVM 3.6 compilation is fine.