-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Support LLVM6 #5556
Comments
Surprise?? 😮 |
From an initial attempt (ubuntu trusty, using prebuilt https://apt.llvm.org packages), I got a few hiccups. For example missing support for GCC 4.8.5 ( $ make clean crystal \
LLVM_CONFIG="llvm-config-6.0 --link-static" \
CXX=clang++-5.0 CC=clang-5.0 I then got actual compatibility issues:
No fun: our custom C bindings for C++ functions are broken. Namely DebugInfo, LTO (I think) and Atomics. Sigh. Surprise: |
Ooooh... I thought the surprise was going to be fun :-( But well, hopefully little by little they will be completing the C API so that we don't need those ugly wrappers anymore. |
Sorry, it's a surprise for LLVM maintainers that don't have to maintain C++ anymore! A better one would have been: compiles just fine 😁 |
So LLVM6 has been released, we probably want to start seriously working on this before we're caught out by early adopter distributions like archlinux wanting to upgrade. |
Also:
Hopefully this should help future LLVM releases improve on the pretty bad debug information of crystal binaries, since IIRC the problem is largely LLVM instead of crystal. |
I'm feeling lazy this time. If someone wants to take a stab at this. There are mostly C++ API changes but they seem to touch all the extensions we wrote (debug info, atomics, ...), and the introduction of a very minimal debug info support in the C API (i.e. declare file:line:column locations). |
I'm super confused: |
OK, LLVMInitializeInstCombine is a bug: https://reviews.llvm.org/D44140. Will be fixed for 6.0.1 |
LLVM 6 with the
The errors @ysbaddaden saw must have been fixed between the prerelease and release. |
I am building crystal 0.24.2 and I see this weird compilation issue
|
|
iirc llvm6 has initial support for coroutines and crystal has them as well? and the homebrew bottle could be updated because llvm was bumped to v6, v5 is now a versioned formula and installed additionally for anyone upgrading homebrew lately (after llvm version bump, because before the bump llvm was installed as an unversioned formula whoich was v5) |
@anatol Looks like an issue with EDIT: it definitely is. See
and
|
I see this |
Copying (I did the rebuild for LLVM 6 a couple days after the |
Likely not the right place for this but it's related. Trying to build crystal on Ubuntu 18.04 so I can do some additional testing for PR #7507 and getting the following error: $ make
Using /usr/bin/llvm-config-6.0 [version=6.0.0]
CRYSTAL_CONFIG_PATH="/home/joshuapinter/Development/crystal/src" CRYSTAL_CONFIG_BUILD_COMMIT="88a238e2d" ./bin/crystal build -D preview_overflow -D compiler_rt -o .build/crystal src/compiler/crystal.cr -D without_openssl -D without_zlib
L-L-V-M-5858P-assR-egistry.o: In function `initialize_inst_combine':
/home/joshuapinter/Development/crystal/src/llvm/pass_registry.cr:11: undefined reference to `LLVMInitializeInstCombine'
collect2: error: ld returned 1 exit status
Error: execution of command failed with code: 1: `cc "${@}" -o '/home/joshuapinter/Development/crystal/.build/crystal' -rdynamic /home/joshuapinter/Development/crystal/src/llvm/ext/llvm_ext.o `/usr/bin/llvm-config-6.0 --libs --system-libs --ldflags 2> /dev/null` -lstdc++ -lpcre -lm -lgc -lpthread /home/joshuapinter/Development/crystal/src/ext/libcrystal.a -levent -lrt -ldl -L/usr/lib -L/usr/local/lib`
Makefile:122: recipe for target '.build/crystal' failed
make: *** [.build/crystal] Error 1 Version$ crystal --version
Crystal 0.27.2 [60760a546] (2019-02-05)
LLVM: 4.0.0
Default target: x86_64-unknown-linux-gnu It looks like I've got LLVM 4.0.0 installed but using Sorry, a little out of my element here. Any help would be great. |
@joshuapinter Please ask this question in the forum or on Gitter/IRC. |
@straight-shoota Will do, thanks! |
@straight-shoota This is a very nasty bug, not a question for the forum (where developers rarely check). It needs to be fixed and addressed by core developers, we can't even compile Crystal when we follow the guide. I made an official issue about it and I sincerely hope it can be fixed permanently, not randomly show up a year later. |
LLVM 6.0 was branched, we may start investigating what got broken, and more importantly: what got added to the C API (surprise).
The text was updated successfully, but these errors were encountered: