-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
bcc doesn't find llvm cmake files on Ubuntu Xenial #492
Comments
Just to update that the debian bug seems to have been resolved, hopefully the fix propagates downstream soon. |
For the record, this issue is still open as of today, for package versions:
|
No solution for the above error ? |
Not that I am aware of. Would be curious whether it works on 16.10 and above, which may depend on whether 3.9 gets packaged or not. |
So how can I build an LLVM pass using cmake on ubuntu 16.04 ? |
The workaround mentioned above (symbolic linking and sed commands) is what I use on the buildbots for bcc. |
Well from this error:
Call Stack (most recent call first): It seems like path to the LLVMExports.cmake file is not set correctly in LLVMConfig.cmake. I changed the line 174 of my LLVMConfig.cmake from " set(LLVM_CMAKE_DIR "${LLVM_INSTALL_PREFIX}/share/llvm/cmake") " to " set(LLVM_CMAKE_DIR "${LLVM_INSTALL_PREFIX}/share/llvm-3.8/cmake")" and above cmake error was removed. I am using Ubuntu 16.04 and installed cmake + llvm using Ubuntu packages. |
@HammiSaif I followed your instruction and fix the previous error but got below error,did you meet it, I also using ubuntu 16.04 and install llvm from apt
|
I somehow managed to get all the CMake errors resolved (broadly following what @drzaeus77 has suggested), but then I got a number of warnings of the type -
This looked like chasing rabbit holes. So I finally decided to give llvm and clang 3.8 a pass and built using clang-3.7 and llvm-3.7. ( I had to clean up all llvm-3.8 packages that were installed using Other than a couple of warnings like this - the compilation was successful.
So you might want to try 3.7 instead of 3.8 (Note also: There is a hard-coded reference to 3.7 in CMakeLists.txt - line 41 or something - so may be that is expected version?). |
Similar/related problem persists on ubuntu cosmic 18.10 (development - but soon to be an ubuntu release) -- Configuring incomplete, errors occurred! Fix for the cmake for me ... was to update the CMakeLists.txt in the bcc directory to reflect the clang/llvm version for my distribution .... clang include files are incorrectly set ... so build fails but working on it Hmm... strange mismatch between clang and LLVM_MAJOR_VERSION ... on cosmic |
In case people have the same problem, I can confirm that @drandynisbet hack works. $ sudo apt-get install libclang-7-dev Then edit |
Actually, I use command |
OK I am still having a few issues after coming back to this today,... I have built the current clone of the repo on cosmic, 4.18.0-15-generic ... - the kernel has BPF support, yet running as root I get .... /usr/share/bcc/tools/biosnoop ulimit -a Any ideas here .on what to check - on supported ubuntu releases I haven't had a problem ... Additional information ... |
OK, so going into the BIOS and turning off secure boot seems to have done the trick - or at least /usr/share/bcc/introspection/bps |
The solution worked for me too in a CentOS 8 machine:
|
There is an upstream bug related to cmake+llvm that is affecting our ability to build on Ubuntu Xenial. That bug is tracked at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=819072.
The cmake .. phase of our build break with:
$ cmake .. -- Latest recognized Git tag is v0.1.8 -- Git HEAD is 3036b96e4ba4f03868ff2271765adb031edf21d6 -- Revision is 0.1.8-3036b96e CMake Error at /usr/share/llvm-3.8/cmake/LLVMConfig.cmake:178 (include): include could not find load file: /usr/share/llvm/cmake/LLVMExports.cmake Call Stack (most recent call first): CMakeLists.txt:17 (find_package) CMake Error at /usr/share/llvm-3.8/cmake/LLVMConfig.cmake:181 (include): include could not find load file: /usr/share/llvm/cmake/LLVM-Config.cmake Call Stack (most recent call first): CMakeLists.txt:17 (find_package) -- Found LLVM: /usr/include CMake Error at CMakeLists.txt:36 (message): Unable to find clang libraries -- Configuring incomplete, errors occurred!
As a workaround, I was able to do the following manually:
This /issue should serve as a placeholder until the upstream is fixed.
The text was updated successfully, but these errors were encountered: