Skip to content
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

Error while building crystal from sources: llvm/IR/DIBuilder.h: No such file or directory #5739

Closed
ovidiugabriel opened this issue Feb 22, 2018 · 3 comments

Comments

@ovidiugabriel
Copy link

Hello,

I've just got the latest master branch as advised in https://crystal-lang.org/docs/installation/from_source_repository.html but I have some compilation errors.

Using /usr/bin/llvm-config [version=3.4.2]
g++ -c  -o src/llvm/ext/llvm_ext.o src/llvm/ext/llvm_ext.cc -I/usr/include  -DNDEBUG 
 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS 
-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong 
--param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic -fomit-frame-pointer 
-std=c++11 -fvisibility-inlines-hidden -fno-exceptions -fPIC -Woverloaded-virtual 
-Wcast-qual
src/llvm/ext/llvm_ext.cc:1:31: fatal error: llvm/IR/DIBuilder.h: No such file or directory
 #include "llvm/IR/DIBuilder.h"
                               ^
compilation terminated.
make: *** [src/llvm/ext/llvm_ext.o] Error 1
@RX14
Copy link
Contributor

RX14 commented Feb 22, 2018

LLVM 3.4 is too old to be supported, and has been for a while. We only support LLVM 3.6 and above (I think). LLVM versions less than 3.9 haven't been tested in a while, so i'd recommend using the latest version if at all possible.

@evandrojr
Copy link

I got this error with LLVM7 as well!

➜  crystal git:(master) make                                              
Using /usr/bin/llvm-config [version=7.0.0]
g++ -c  -o src/llvm/ext/llvm_ext.o src/llvm/ext/llvm_ext.cc -I/usr/lib/llvm-7/include -std=c++0x -fuse-ld=gold -Wl,--no-keep-files-mapped -Wl,--no-map-whole-files -fPIC -fvisibility-inlines-hidden -Werror=date-time -std=c++11 -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wno-maybe-uninitialized -Wdelete-non-virtual-dtor -Wno-comment -ffunction-sections -fdata-sections -O2 -DNDEBUG  -fno-exceptions -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
src/llvm/ext/llvm_ext.cc:1:31: fatal error: llvm/IR/DIBuilder.h: No such file or directory
compilation terminated.
Makefile:123: recipe for target 'src/llvm/ext/llvm_ext.o' failed
make: *** [src/llvm/ext/llvm_ext.o] Error 1

@RX14
Copy link
Contributor

RX14 commented May 27, 2018

I jist looked at LLVM git and DIBuilder.h hasn't gone away or changed since 6.0, so i'd go so far as to blame the packaging here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants