Closed maceip closed 7 years ago
Where do you have capstone.pc installed?
I compiled and make install
'd libcapstone from git, then did an apt-get install libcapstone-dev:
$ sudo apt list --installed | grep capstone libcapstone-dev/xenial,now 3.0.4-0.2 amd64 [installed] libcapstone3/xenial,now 3.0.4-0.2 amd64 [installed,automatic]
and i'm still getting
CMake Error at cmake/find_capstone.cmake:42 (message): capstone library not found
capstone.pc is inside of my compiled capstone directory:
$ pwd /home/maceip/capstone $ cat capstone.pc Name: capstone Description: Capstone disassembly engine Version: 3.0.5 libdir=/usr/lib includedir=/usr/include/capstone archive=${libdir}/libcapstone.a Libs: -L${libdir} -lcapstone Cflags: -I${includedir}
Ubuntu, like any modern distro, can "have" pkg-config. You just need to install it. apt-get install pkg-config
I updated my comment. I installed pkg-config but i'm still not sure how to get CMAKE to understand where the lib is
Put capstone.pc in /usr/lib/pkgconfig/ and cmake will find it. Or you can set PKG_CONFIG_PATH environment variable to /home/maceip/capstone.
thanks for your help here, now cmake succeeds.
On ubuntu xenial:
I'm compiling capstone from git, and using ./make.sh install:
$ cd /usr/include/capstone/ $ ls arm64.h arm.h capstone.h mips.h platform.h ppc.h sparc.h systemz.h x86.h xcore.h $ ls -la /usr/lib/libcapstone.so lrwxrwxrwx 1 root root 16 Jun 4 17:00 /usr/lib/libcapstone.so -> libcapstone.so.3
Then I try to compile syscall_intercept:
$cmake ~/syscall_intercept/ -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc
CMake Error at cmake/find_capstone.cmake:42 (message): capstone library not found Call Stack (most recent call first): CMakeLists.txt:55 (include)
what am I doing wrong?