ClangComplete
ClangComplete copied to clipboard
Red hat based system - MakeFile
So, as always Red Hat based systems (fedora) always need a bit of special guidance when compiling.
This time I had to alter the makefile to set the clang_libs
variable to -L/usr/lib64/llvm -lclang
. It seems that the file libclang.so
is located at /usr/lib64/llvm
for a red hat based x64 system. And the clang_prefix
was changed to /usr/lib/clang/3.4.2
.
~~I'm not sure if it worth to add another condition to the makefile. But I though I should mention this if someone else is trying to use this awesome sublime package on their red hat system.~~ Just saw #5 that fixes this issue completely
I have to note, I do get errors like /usr/lib/gcc/x86_64-redhat-linux/4.8.3/include/xmmintrin.h:213:10: error: use of undeclared identifier '__builtin_ia32_andps'
but it continues parsing and giving the correct warnings and errors for the stuff that matters, so I'm not complaining.
This time I had to alter the makefile to set the clang_libs variable to -L/usr/lib64/llvm -lclang. It seems that the file libclang.so is located at /usr/lib64/llvm for a red hat based x64 system. And the clang_prefix was changed to /usr/lib/clang/3.4.2.
So you built it using make CLANG_LIBS='-L/usr/lib64/llvm -lclang' CLANG_PREFIX=/usr/lib/clang/3.4.2
, correct? I want to make sure, so it can be added to the README.
I'm not sure if it worth to add another condition to the makefile. But I though I should mention this if someone else is trying to use this awesome sublime package on their red hat system. Just saw #5 that fixes this issue completely
Many systems don't have llvm-config
. Secondly, it is a lot harder to support custom builds of clang. Most of time, the user can just change CLANG_PREFIX
to where they installed clang(it seems redhat throws files all over the place).
I have to note, I do get errors like /usr/lib/gcc/x86_64-redhat-linux/4.8.3/include/xmmintrin.h:213:10: error: use of undeclared identifier '__builtin_ia32_andps' but it continues parsing and giving the correct warnings and errors for the stuff that matters, so I'm not complaining.
This is most likely, because you are missing the include for clang's C runtime. In the additional_options
in the settings file, you can see "-isystem", "/usr/lib/llvm-3.4/lib/clang/3.4/include/"
, that needs to change to the path where it is on redhat(I am not sure where it is on redhat).
So you built it using make CLANG_LIBS='-L/usr/lib64/llvm -lclang' CLANG_PREFIX=/usr/lib/clang/3.4.2, correct? I want to make sure, so it can be added to the README.
That is true
Many systems don't have llvm-config. Secondly, it is a lot harder to support custom builds of clang. Most of time, the user can just change CLANG_PREFIX to where they installed clang(it seems redhat throws files all over the place).
Ah didn't know that, yeah well then you have to make a cmakelists which uses macros to find the libraries.
This is most likely, because you are missing the include for clang's C runtime. In the additional_options in the settings file, you can see "-isystem", "/usr/lib/llvm-3.4/lib/clang/3.4/include/", that needs to change to the path where it is on redhat(I am not sure where it is on redhat).
Ah yeah forgot to change the additional_options, I will try that today.