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

error on macos mojave #57

Closed Who1sCarl closed 5 years ago

Who1sCarl commented 5 years ago
sudo python setup.py install
Password:
running install
running build
running build_py
creating build
creating build/lib
creating build/lib/keystone
copying keystone/mips_const.py -> build/lib/keystone
copying keystone/sparc_const.py -> build/lib/keystone
copying keystone/keystone.py -> build/lib/keystone
copying keystone/__init__.py -> build/lib/keystone
copying keystone/keystone_const.py -> build/lib/keystone
copying keystone/systemz_const.py -> build/lib/keystone
copying keystone/arm64_const.py -> build/lib/keystone
copying keystone/x86_const.py -> build/lib/keystone
copying keystone/ppc_const.py -> build/lib/keystone
copying keystone/arm_const.py -> build/lib/keystone
copying keystone/hexagon_const.py -> build/lib/keystone
running build_clib
running custom_build_clib
building 'keystone' library
-- The C compiler identification is AppleClang 10.0.0.10001044
-- The CXX compiler identification is AppleClang 10.0.0.10001044
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc -- broken
CMake Error at /usr/local/Cellar/cmake/3.12.4/share/cmake/Modules/CMakeTestCCompiler.cmake:52 (message):
  The C compiler

    "/Library/Developer/CommandLineTools/usr/bin/cc"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: /Users/carlstar/Downloads/keystone-engine-0.9.1-3/src/build/CMakeFiles/CMakeTmp

    Run Build Command:"/usr/bin/make" "cmTC_c527c/fast"
    /Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/cmTC_c527c.dir/build.make CMakeFiles/cmTC_c527c.dir/build
    Building C object CMakeFiles/cmTC_c527c.dir/testCCompiler.c.o
    /Library/Developer/CommandLineTools/usr/bin/cc   -arch i386 -arch x86_64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk   -o CMakeFiles/cmTC_c527c.dir/testCCompiler.c.o   -c /Users/carlstar/Downloads/keystone-engine-0.9.1-3/src/build/CMakeFiles/CMakeTmp/testCCompiler.c
    Linking C executable cmTC_c527c
    /usr/local/Cellar/cmake/3.12.4/bin/cmake -E cmake_link_script CMakeFiles/cmTC_c527c.dir/link.txt --verbose=1
    /Library/Developer/CommandLineTools/usr/bin/cc   -arch i386 -arch x86_64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -Wl,-search_paths_first -Wl,-headerpad_max_install_names   CMakeFiles/cmTC_c527c.dir/testCCompiler.c.o  -o cmTC_c527c
    ld: warning: The i386 architecture is deprecated for macOS (remove from the Xcode build setting: ARCHS)
    ld: warning: ignoring file /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/lib/libSystem.tbd, missing required architecture i386 in file /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/lib/libSystem.tbd
    ld: dynamic main executables must link with libSystem.dylib for architecture i386
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    make[1]: *** [cmTC_c527c] Error 1
    make: *** [cmTC_c527c/fast] Error 2

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:5 (project)

-- Configuring incomplete, errors occurred!
See also "/Users/carlstar/Downloads/keystone-engine-0.9.1-3/src/build/CMakeFiles/CMakeOutput.log".
See also "/Users/carlstar/Downloads/keystone-engine-0.9.1-3/src/build/CMakeFiles/CMakeError.log".
running install_lib
creating /usr/local/lib/python2.7/site-packages/keystone
copying build/lib/keystone/mips_const.py -> /usr/local/lib/python2.7/site-packages/keystone
copying build/lib/keystone/sparc_const.py -> /usr/local/lib/python2.7/site-packages/keystone
copying build/lib/keystone/keystone.py -> /usr/local/lib/python2.7/site-packages/keystone
copying build/lib/keystone/__init__.py -> /usr/local/lib/python2.7/site-packages/keystone
copying build/lib/keystone/keystone_const.py -> /usr/local/lib/python2.7/site-packages/keystone
copying build/lib/keystone/systemz_const.py -> /usr/local/lib/python2.7/site-packages/keystone
copying build/lib/keystone/arm64_const.py -> /usr/local/lib/python2.7/site-packages/keystone
copying build/lib/keystone/x86_const.py -> /usr/local/lib/python2.7/site-packages/keystone
copying build/lib/keystone/ppc_const.py -> /usr/local/lib/python2.7/site-packages/keystone
copying build/lib/keystone/arm_const.py -> /usr/local/lib/python2.7/site-packages/keystone
copying build/lib/keystone/hexagon_const.py -> /usr/local/lib/python2.7/site-packages/keystone
byte-compiling /usr/local/lib/python2.7/site-packages/keystone/mips_const.py to mips_const.pyc
byte-compiling /usr/local/lib/python2.7/site-packages/keystone/sparc_const.py to sparc_const.pyc
byte-compiling /usr/local/lib/python2.7/site-packages/keystone/keystone.py to keystone.pyc
byte-compiling /usr/local/lib/python2.7/site-packages/keystone/__init__.py to __init__.pyc
byte-compiling /usr/local/lib/python2.7/site-packages/keystone/keystone_const.py to keystone_const.pyc
byte-compiling /usr/local/lib/python2.7/site-packages/keystone/systemz_const.py to systemz_const.pyc
byte-compiling /usr/local/lib/python2.7/site-packages/keystone/arm64_const.py to arm64_const.pyc
byte-compiling /usr/local/lib/python2.7/site-packages/keystone/x86_const.py to x86_const.pyc
byte-compiling /usr/local/lib/python2.7/site-packages/keystone/ppc_const.py to ppc_const.pyc
byte-compiling /usr/local/lib/python2.7/site-packages/keystone/arm_const.py to arm_const.pyc
byte-compiling /usr/local/lib/python2.7/site-packages/keystone/hexagon_const.py to hexagon_const.pyc
running install_data
error: can't copy 'src/build/llvm/lib/libkeystone.dylib': doesn't exist or not a regular file
fjh658 commented 5 years ago

The official version is not updated, you can use this. https://github.com/fjh658/keystone-engine @Who1sCarl

Who1sCarl commented 5 years ago

all seems good ! it work thx

ranshon commented 5 years ago

@fjh658 use https://github.com/fjh658/keystone-engine. next steps run 'sudo python setup.py install'??

fjh658 commented 5 years ago

@fjh658 use https://github.com/fjh658/keystone-engine. next steps run 'sudo python setup.py install'??

git clone https://github.com/fjh658/keystone-engine.git
cd keystone-engine
git submodule update --init --recursive
sudo python setup.py install --verbose