Crystal: Cannot compile master against LLVM 3.6

Created on 6 Oct 2016  路  2Comments  路  Source: crystal-lang/crystal

  • OS: Linux Ubuntu 15.10 (Willy) (4.2.0-42-generic #49-Ubuntu SMP x86_64 GNU/Linux)
  • Crystal: 0.19.3 (Crystal 0.19.3 [034e762] (2016-09-30))
  • LLVM: 3.6.2 (Ubuntu 3.6.2-1)
  • HEAD: [b86bb3a3cd949362c4db126766e83569063cf725]
  • Command: make crystal

Output:

$ make crystal
g++ -c -o src/llvm/ext/llvm_ext.o src/llvm/ext/llvm_ext.cc `/usr/bin/llvm-config-3.6 --cxxflags`
cc -fPIC   -c -o src/ext/sigfault.o src/ext/sigfault.c
ar -rcs src/ext/libcrystal.a src/ext/sigfault.o
CRYSTAL_CONFIG_PATH=`pwd`/src ./bin/crystal build  -o .build/crystal src/compiler/crystal.cr -D without_openssl -D without_zlib
L-L-V-M-5858V-alue.o: In function `*LLVM::Value@LLVM::ValueMethods#ordering=<LLVM::AtomicOrdering>:Nil':
LLVM::Value:(.text+0x2b5): undefined reference to `LLVMSetOrdering'
collect2: error: ld returned 1 exit status
Error: execution of command failed with code: 1: `cc -o "/home/luis/code/crystal-lang/crystal/.build/crystal" "${@}"  -rdynamic  /home/luis/code/crystal-lang/crystal/src/llvm/ext/llvm_ext.o `/usr/bin/llvm-config-3.6 --libs --system-libs --ldflags 2> /dev/null` -lstdc++ -lpcre -lm -lgc -lpthread /home/luis/code/crystal-lang/crystal/src/ext/libcrystal.a -levent -lrt -ldl -L/usr/lib -L/usr/local/lib`
Makefile:74: recipe for target '.build/crystal' failed
make: *** [.build/crystal] Error 1

It appears LLVMSetOrdering was introduced in 3.8? If that is the case, an update to the wiki on required LLVM version might be needed:

https://github.com/crystal-lang/crystal/wiki/All-required-libraries#linux

Thank you

bug compiler

Most helpful comment

Oh, I had LLVM 3.8 installed when I tried this... I should have tried with LLVM 3.6... LLVM 3.6 should be supported. Thank you for reporting this!

All 2 comments

Oh, I had LLVM 3.8 installed when I tried this... I should have tried with LLVM 3.6... LLVM 3.6 should be supported. Thank you for reporting this!

Thank you! :heart: :heart: :heart_eyes_cat:

Was this page helpful?
0 / 5 - 0 ratings