Hi everyone, I want to build llvm-exegesis
with libpfm but got some issues…
I am using a student server, and I don’t have the permission to install libraries in standard linking&include directory, so I build libpfm from source. I can make sure all headers can be found at xx/libpfm4/include/
and libpfm.a can be found at xx/libpfm4/lib
. When I configure llvm-project using the following command, I still got “-- Looking for pfm_initialize in pfm
– Looking for pfm_initialize in pfm - not found” in the Cmake log
#The command is
cmake -G "Ninja" -DCMAKE_PREFIX_PATH="xx/llvm-18/libpfm4" \
-DCMAKE_INCLUDE_PATH="xx/llvm-18/libpfm4/include" \
-DCMAKE_LIBRARY_PATH="xx/llvm-18/libpfm4/lib" \
-DLLVM_ENABLE_LIBPFM=ON \
-DCMAKE_BUILD_TYPE=Debug ../llvm
I also tried manually modify llvm/CMakeLists.txt and added
include_directories(xx/llvm-18/libpfm4/include)
link_directories(xx/llvm-18/libpfm4/lib)
But not worked and still got the same output
Can someone help me with building llvm-project with external libpfm? This is really important to me…