eunomia-bpf / bpftime

Userspace eBPF runtime for fast Uprobe & Syscall hook & Extensions with LLVM JIT
https://eunomia.dev/bpftime/
MIT License
699 stars 70 forks source link

[BUG] Support custom LLVM installation locations #187

Closed agentzh closed 5 months ago

agentzh commented 6 months ago

My Fedora system's LLVM is too old (10). And I have to compile my own LLVM from source (version 14) and install under /opt/llvm/. Currently, the LLVM JIT build of bpftime only looks for system llvm locations, which won't work for my situation:

CMake Error at vm/llvm-jit/CMakeLists.txt:46 (find_package):
  Could not find a package configuration file provided by "LLVM" with any of
  the following names:

    LLVMConfig.cmake
    llvm-config.cmake

  Add the installation prefix of "LLVM" to CMAKE_PREFIX_PATH or set
  "LLVM_DIR" to a directory containing one of the above files.  If "LLVM"
  provides a separate development package or SDK, be sure it has been
  installed.

Hopefully there is a way to configure the LLVM_DIR without editing any files.

Zheaoli commented 6 months ago

Yes, we need to remove the hardcode LLVM path , I'll take handle of this