Skip to content
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

Can't install python bindings. /llvm/lib64/libkeystone.so not found #559

Open
Helicon007 opened this issue Aug 3, 2023 · 0 comments
Open

Comments

@Helicon007
Copy link

I'm trying now for several day to install the keystone-engine python libraries. Unfortunately I fail and I don't know what am I doing wrong.
Plattform Raspberry 4 with the original Image of raspian 64bit lite (32 bit is not working either, same issues)

It doesn't matter if I use pip to install or I compile by myself. It breaks because /llvm/lib64/libkeystone.so cannot be found. There is a directory of lib/libkeystone.so but not lib64. And again, it doesn't matter if I do it myself or I use pip.

This is what I did: apt update & upgrade and installed cmake
pip install keystone-engine
[100%] Linking C executable fuzz_asm_arm_armbe
[100%] Built target fuzz_asm_sparc64be
[100%] Built target fuzz_asm_sparcbe
[100%] Built target fuzz_asm_sparc
[100%] Built target fuzz_asm_arm_armbe
error: [Errno 2] No such file or directory: '/tmp/pip-install-_acjxme1/keystone-engine_98bd8ab7d0a44ef7a746ece8d5a374f5/src/build/llvm/lib64/libkeystone.so
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for keystone-engine
Running setup.py clean for keystone-engine
Failed to build keystone-engine
ERROR: Could not build wheels for keystone-engine, which is required to install pyproject.toml-based projects

It's the same message with pip3

Manually compile:

git clone https://github.com/keystone-engine/keystone.git
mkdir build
cd build
../make-share.sh
sudo make install
cd ../bindings
cd python
sudo make install3

[100%] Linking CXX shared library ../lib/arm-linux-gnueabihf/libkeystone.so
make[3]: Leaving directory '/home/helicon/opt/keystone/bindings/python/src/build'
[100%] Built target keystone
make[2]: Leaving directory '/home/helicon/opt/keystone/bindings/python/src/build'
make[1]: Leaving directory '/home/helicon/opt/keystone/bindings/python/src/build'
error: [Errno 2] No such file or directory: '/home/helicon/opt/keystone/bindings/python/src/build/llvm/lib64/libkeystone.so'
make: *** [Makefile:29: install3] Error 1

No matter what I do, libkeystone.so is expected in lib64/ and not lib/ even though it's there.

../make-share.sh lib64 does nothing than an error:
ERROR: unknown parameter "lib64"

Syntax: make-share.sh [debug] [macos-universal] [lib64]

     debug: build with debug info
     macos-universal: build MacOS universal binaries
     macos-no-universal: do not build MacOS universal binaries (default)
     lib_only: skip kstool & only build libraries
     lib32: build 32bit libraries on 64bit system

the option lib32 doesn't solve my issue either. Now I'm running out of options, google was no help. An indicator that I'm the problem and can't see it? Please help if you can.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant