keystone-engine / keypatch

Multi-architecture assembler for IDA Pro. Powered by Keystone Engine.
http://www.keystone-engine.org/keypatch
GNU General Public License v2.0
1.47k stars 355 forks source link

Install issue on MacOS IDA #92

Closed OtterV closed 2 weeks ago

OtterV commented 1 month ago

Have tried many solution but failed.

  1. Have checked python_path(terminal & IDA use the same) & sys.path in IDA(7.7) & cmake, everything right.
  2. Try: a. sudo pip install keystone-engine didn't generate libkeystone.dylib. b. download & sudo python setup.py install when use python in local terminal, from keystone import * succeed. However, in IDA, ImportError: ERROR: fail to load the dynamic library. And to find the reason, I modify the keystone.py to find the reason. When load libkeystone.dylib, it raise (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64') c. Then I tried ../make-share.sh macos-universal lib_only , raise error ld: symbol(s) not found for architecture i386 I would be very grateful if someone could give me some advice.
callengre commented 3 weeks ago

pip install will archieve, not use dylib。 platform macOS 13.3 ida version, 9.0 refer https://bbs.kanxue.com/thread-282933.htm

OtterV commented 2 weeks ago

Thanks for answer!

When I use pip, I just couldn‘t generate dylib; pip way also should generate dylib to use.

I have solved my problem by modifying make_common.sh in keystone source ( deleted i386 ), because platform don't support 32bits.

After this, I solved next new problem by @callengre's answer, update keypatch.py file.