capstone icon indicating copy to clipboard operation
capstone copied to clipboard

Error installing capstone-3.0.5.rc2 needed for Cuckoo 2.0.7

Open Rodasa opened this issue 5 years ago • 10 comments

I can´t install Cuckoo 2.0.7 because i have an ERROR with the installation of capstone-3.0.5.rc2 I´m working with MAC OS, Movaje 10.14 Please help. I have read an issue that talk about i386 support on MOJAVE but i can´t find the i386 LIBARCHS in capstone-3.0.5.rc2 Makefile I have read this issue #1235 and related. Please help!! :)


Processing /Users/sabenix/Downloads/Cuckoo/capstone-3.0.5rc2.tar.gz

Building wheels for collected packages: capstone Building wheel for capstone (setup.py) ... error ERROR: Command errored out with exit status 1: command: /Users/sabenix/Virtualenvs/cuckoo/bin/python2.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/db/v7f8qbh95sq3qvtykwysp4v40000gn/T/pip-req-build-ZHX9yi/setup.py'"'"'; file='"'"'/private/var/folders/db/v7f8qbh95sq3qvtykwysp4v40000gn/T/pip-req-build-ZHX9yi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/db/v7f8qbh95sq3qvtykwysp4v40000gn/T/pip-wheel-k3pfzy --python-tag cp27 cwd: /private/var/folders/db/v7f8qbh95sq3qvtykwysp4v40000gn/T/pip-req-build-ZHX9yi/ Complete output (203 lines): /Users/sabenix/Virtualenvs/cuckoo/lib/python2.7/site-packages/setuptools/dist.py:474: UserWarning: Normalizing '3.0.5.rc2' to '3.0.5rc2' normalized_version, running bdist_wheel running build Building C extensions CC cs.o CC utils.o CC SStream.o CC MCInstrDesc.o CC MCRegisterInfo.o CC arch/ARM/ARMDisassembler.o CC arch/ARM/ARMInstPrinter.o CC arch/ARM/ARMMapping.o CC arch/ARM/ARMModule.o CC arch/AArch64/AArch64BaseInfo.o CC arch/AArch64/AArch64Disassembler.o CC arch/AArch64/AArch64InstPrinter.o CC arch/AArch64/AArch64Mapping.o CC arch/AArch64/AArch64Module.o CC arch/Mips/MipsDisassembler.o CC arch/Mips/MipsInstPrinter.o CC arch/Mips/MipsMapping.o CC arch/Mips/MipsModule.o CC arch/PowerPC/PPCDisassembler.o CC arch/PowerPC/PPCInstPrinter.o CC arch/PowerPC/PPCMapping.o CC arch/PowerPC/PPCModule.o CC arch/Sparc/SparcDisassembler.o CC arch/Sparc/SparcInstPrinter.o CC arch/Sparc/SparcMapping.o CC arch/Sparc/SparcModule.o CC arch/SystemZ/SystemZDisassembler.o CC arch/SystemZ/SystemZInstPrinter.o CC arch/SystemZ/SystemZMapping.o CC arch/SystemZ/SystemZModule.o CC arch/SystemZ/SystemZMCTargetDesc.o CC arch/X86/X86DisassemblerDecoder.o CC arch/X86/X86Disassembler.o CC arch/X86/X86IntelInstPrinter.o CC arch/X86/X86ATTInstPrinter.o CC arch/X86/X86Mapping.o CC arch/X86/X86Module.o CC arch/XCore/XCoreDisassembler.o CC arch/XCore/XCoreInstPrinter.o CC arch/XCore/XCoreMapping.o CC arch/XCore/XCoreModule.o CC MCInst.o LINK libcapstone.dylib ld: warning: The i386 architecture is deprecated for macOS (remove from the Xcode build setting: ARCHS) ld: warning: ignoring file /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/lib/libSystem.tbd, missing required architecture i386 in file /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/lib/libSystem.tbd Undefined symbols for architecture i386: "___bzero", referenced from: _Thumb_getInstruction in ARMDisassembler.o _ARM_getInstruction in ARMDisassembler.o _AArch64_getInstruction in AArch64Disassembler.o _Mips_getInstruction in MipsDisassembler.o _Mips64_getInstruction in MipsDisassembler.o _PPC_getInstruction in PPCDisassembler.o _Sparc_getInstruction in SparcDisassembler.o ... "___memcpy_chk", referenced from: _SystemZ_getInstruction in SystemZDisassembler.o "___stack_chk_fail", referenced from: _cs_disasm in cs.o _cs_disasm_iter in cs.o _ARM_get_insn_id in ARMMapping.o _A64SysRegMapper_toString in AArch64BaseInfo.o _decodeToMCInst in AArch64Disassembler.o _printInstruction in AArch64InstPrinter.o _printTypedVectorList in AArch64InstPrinter.o ... "___stack_chk_guard", referenced from: _cs_disasm in cs.o _cs_disasm_iter in cs.o _ARM_get_insn_id in ARMMapping.o _A64SysRegMapper_toString in AArch64BaseInfo.o _decodeToMCInst in AArch64Disassembler.o _printInstruction in AArch64InstPrinter.o _printTypedVectorList in AArch64InstPrinter.o ... _cs_disasm in cs.o _cs_disasm_iter in cs.o _ARM_get_insn_id in ARMMapping.o _A64SysRegMapper_toString in AArch64BaseInfo.o _decodeToMCInst in AArch64Disassembler.o _printInstruction in AArch64InstPrinter.o _printTypedVectorList in AArch64InstPrinter.o ... _cs_disasm in cs.o _cs_disasm_iter in cs.o _ARM_get_insn_id in ARMMapping.o _A64SysRegMapper_toString in AArch64BaseInfo.o _decodeToMCInst in AArch64Disassembler.o _printInstruction in AArch64InstPrinter.o _printTypedVectorList in AArch64InstPrinter.o ... _cs_disasm in cs.o _cs_disasm_iter in cs.o _ARM_get_insn_id in ARMMapping.o _A64SysRegMapper_toString in AArch64BaseInfo.o _decodeToMCInst in AArch64Disassembler.o _printInstruction in AArch64InstPrinter.o _printTypedVectorList in AArch64InstPrinter.o ... _cs_disasm in cs.o _cs_disasm_iter in cs.o _ARM_get_insn_id in ARMMapping.o _A64SysRegMapper_toString in AArch64BaseInfo.o _decodeToMCInst in AArch64Disassembler.o _printInstruction in AArch64InstPrinter.o _printTypedVectorList in AArch64InstPrinter.o ... _cs_disasm in cs.o _cs_disasm_iter in cs.o _ARM_get_insn_id in ARMMapping.o _A64SysRegMapper_toString in AArch64BaseInfo.o _decodeToMCInst in AArch64Disassembler.o _printInstruction in AArch64InstPrinter.o _printTypedVectorList in AArch64InstPrinter.o ... _cs_disasm in cs.o _cs_disasm_iter in cs.o _ARM_get_insn_id in ARMMapping.o _A64SysRegMapper_toString in AArch64BaseInfo.o _decodeToMCInst in AArch64Disassembler.o _printInstruction in AArch64InstPrinter.o _printTypedVectorList in AArch64InstPrinter.o ... ... "___strcpy_chk", referenced from: _XCore_insn_extract in XCoreInstPrinter.o "___strncpy_chk", referenced from: _Sparc_printInst in SparcInstPrinter.o "___tolower", referenced from: _A64NamedImmMapper_fromString in AArch64BaseInfo.o "___udivdi3", referenced from: _A64SysRegMapper_toString in AArch64BaseInfo.o "_atoi", referenced from: _XCore_insn_extract in XCoreInstPrinter.o "_calloc", referenced from: _cs_mem_calloc in cs.o (maybe you meant: _cs_mem_calloc) "_free", referenced from: _cs_mem_free in cs.o (maybe you meant: _cs_free, _cs_mem_free ) "_malloc", referenced from: _cs_mem_malloc in cs.o (maybe you meant: _cs_mem_malloc, _cs_malloc ) "_memcpy", referenced from: _cs_disasm in cs.o _fill_insn in cs.o _cs_disasm_iter in cs.o _SStream_concat0 in SStream.o "_memmove", referenced from: _cs_strdup in utils.o _X86_Intel_printInst in X86IntelInstPrinter.o _X86_ATT_printInst in X86ATTInstPrinter.o "_realloc", referenced from: _cs_mem_realloc in cs.o (maybe you meant: _cs_mem_realloc) "_strchr", referenced from: _Sparc_printInst in SparcInstPrinter.o _XCore_insn_extract in XCoreInstPrinter.o _XCore_printInst in XCoreInstPrinter.o "_strcmp", referenced from: _name2id in utils.o _A64NamedImmMapper_fromString in AArch64BaseInfo.o _printPredicateOperand in PPCInstPrinter.o _PPC_alias_insn in PPCMapping.o _printMemOperand in SparcInstPrinter.o _Sparc_map_hint in SparcMapping.o _XCore_reg_id in XCoreMapping.o ... "_strcpy", referenced from: _A64SysRegMapper_toString in AArch64BaseInfo.o "_strlen", referenced from: _cs_strdup in utils.o _SStream_concat0 in SStream.o _ARM_post_printer in ARMInstPrinter.o _PPC_printInst in PPCInstPrinter.o _Sparc_printInst in SparcInstPrinter.o _Sparc_map_hint in SparcMapping.o "_strncmp", referenced from: _ARM_post_printer in ARMInstPrinter.o "_strncpy", referenced from: _cs_disasm in cs.o _fill_insn in cs.o _cs_disasm_iter in cs.o "_strrchr", referenced from: _ARM_post_printer in ARMInstPrinter.o _AArch64_post_printer in AArch64InstPrinter.o _PPC_post_printer in PPCInstPrinter.o "_strstr", referenced from: _AArch64_printInst in AArch64InstPrinter.o _PPC_post_printer in PPCInstPrinter.o _printAliasInstr in SparcInstPrinter.o "_vsnprintf", referenced from: _cs_vsnprintf in cs.o (maybe you meant: _cs_vsnprintf) ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [libcapstone.dylib] Error 1 error: [Errno 2] No such file or directory: 'libcapstone.dylib'

ERROR: Failed building wheel for capstone Running setup.py clean for capstone Failed to build capstone Installing collected packages: capstone Running setup.py install for capstone ... error ERROR: Command errored out with exit status 1: command: /Users/sabenix/Virtualenvs/cuckoo/bin/python2.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/db/v7f8qbh95sq3qvtykwysp4v40000gn/T/pip-req-build-ZHX9yi/setup.py'"'"'; file='"'"'/private/var/folders/db/v7f8qbh95sq3qvtykwysp4v40000gn/T/pip-req-build-ZHX9yi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/var/folders/db/v7f8qbh95sq3qvtykwysp4v40000gn/T/pip-record-O3Qqm4/install-record.txt --single-version-externally-managed --compile --install-headers /Users/sabenix/Virtualenvs/cuckoo/bin/../include/site/python2.7/capstone cwd: /private/var/folders/db/v7f8qbh95sq3qvtykwysp4v40000gn/T/pip-req-build-ZHX9yi/ Complete output (161 lines): /Users/sabenix/Virtualenvs/cuckoo/lib/python2.7/site-packages/setuptools/dist.py:474: UserWarning: Normalizing '3.0.5.rc2' to '3.0.5rc2' normalized_version, running install running build Building C extensions LINK libcapstone.dylib ld: warning: The i386 architecture is deprecated for macOS (remove from the Xcode build setting: ARCHS) ld: warning: ignoring file /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/lib/libSystem.tbd, missing required architecture i386 in file /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/lib/libSystem.tbd Undefined symbols for architecture i386: "___bzero", referenced from: _Thumb_getInstruction in ARMDisassembler.o _ARM_getInstruction in ARMDisassembler.o _AArch64_getInstruction in AArch64Disassembler.o _Mips_getInstruction in MipsDisassembler.o _Mips64_getInstruction in MipsDisassembler.o _PPC_getInstruction in PPCDisassembler.o _Sparc_getInstruction in SparcDisassembler.o ... "___memcpy_chk", referenced from: _SystemZ_getInstruction in SystemZDisassembler.o "___stack_chk_fail", referenced from: _cs_disasm in cs.o _cs_disasm_iter in cs.o _ARM_get_insn_id in ARMMapping.o _A64SysRegMapper_toString in AArch64BaseInfo.o _decodeToMCInst in AArch64Disassembler.o _printInstruction in AArch64InstPrinter.o _printTypedVectorList in AArch64InstPrinter.o ... "___stack_chk_guard", referenced from: _cs_disasm in cs.o _cs_disasm_iter in cs.o _ARM_get_insn_id in ARMMapping.o _A64SysRegMapper_toString in AArch64BaseInfo.o _decodeToMCInst in AArch64Disassembler.o _printInstruction in AArch64InstPrinter.o _printTypedVectorList in AArch64InstPrinter.o ... _cs_disasm in cs.o _cs_disasm_iter in cs.o _ARM_get_insn_id in ARMMapping.o _A64SysRegMapper_toString in AArch64BaseInfo.o _decodeToMCInst in AArch64Disassembler.o _printInstruction in AArch64InstPrinter.o _printTypedVectorList in AArch64InstPrinter.o ... _cs_disasm in cs.o _cs_disasm_iter in cs.o _ARM_get_insn_id in ARMMapping.o _A64SysRegMapper_toString in AArch64BaseInfo.o _decodeToMCInst in AArch64Disassembler.o _printInstruction in AArch64InstPrinter.o _printTypedVectorList in AArch64InstPrinter.o ... _cs_disasm in cs.o _cs_disasm_iter in cs.o _ARM_get_insn_id in ARMMapping.o _A64SysRegMapper_toString in AArch64BaseInfo.o _decodeToMCInst in AArch64Disassembler.o _printInstruction in AArch64InstPrinter.o _printTypedVectorList in AArch64InstPrinter.o ... _cs_disasm in cs.o _cs_disasm_iter in cs.o _ARM_get_insn_id in ARMMapping.o _A64SysRegMapper_toString in AArch64BaseInfo.o _decodeToMCInst in AArch64Disassembler.o _printInstruction in AArch64InstPrinter.o _printTypedVectorList in AArch64InstPrinter.o ... _cs_disasm in cs.o _cs_disasm_iter in cs.o _ARM_get_insn_id in ARMMapping.o _A64SysRegMapper_toString in AArch64BaseInfo.o _decodeToMCInst in AArch64Disassembler.o _printInstruction in AArch64InstPrinter.o _printTypedVectorList in AArch64InstPrinter.o ... _cs_disasm in cs.o _cs_disasm_iter in cs.o _ARM_get_insn_id in ARMMapping.o _A64SysRegMapper_toString in AArch64BaseInfo.o _decodeToMCInst in AArch64Disassembler.o _printInstruction in AArch64InstPrinter.o _printTypedVectorList in AArch64InstPrinter.o ... ... "___strcpy_chk", referenced from: _XCore_insn_extract in XCoreInstPrinter.o "___strncpy_chk", referenced from: _Sparc_printInst in SparcInstPrinter.o "___tolower", referenced from: _A64NamedImmMapper_fromString in AArch64BaseInfo.o "___udivdi3", referenced from: _A64SysRegMapper_toString in AArch64BaseInfo.o "_atoi", referenced from: _XCore_insn_extract in XCoreInstPrinter.o "_calloc", referenced from: _cs_mem_calloc in cs.o (maybe you meant: _cs_mem_calloc) "_free", referenced from: _cs_mem_free in cs.o (maybe you meant: _cs_free, _cs_mem_free ) "_malloc", referenced from: _cs_mem_malloc in cs.o (maybe you meant: _cs_mem_malloc, _cs_malloc ) "_memcpy", referenced from: _cs_disasm in cs.o _fill_insn in cs.o _cs_disasm_iter in cs.o _SStream_concat0 in SStream.o "_memmove", referenced from: _cs_strdup in utils.o _X86_Intel_printInst in X86IntelInstPrinter.o _X86_ATT_printInst in X86ATTInstPrinter.o "_realloc", referenced from: _cs_mem_realloc in cs.o (maybe you meant: _cs_mem_realloc) "_strchr", referenced from: _Sparc_printInst in SparcInstPrinter.o _XCore_insn_extract in XCoreInstPrinter.o _XCore_printInst in XCoreInstPrinter.o "_strcmp", referenced from: _name2id in utils.o _A64NamedImmMapper_fromString in AArch64BaseInfo.o _printPredicateOperand in PPCInstPrinter.o _PPC_alias_insn in PPCMapping.o _printMemOperand in SparcInstPrinter.o _Sparc_map_hint in SparcMapping.o _XCore_reg_id in XCoreMapping.o ... "_strcpy", referenced from: _A64SysRegMapper_toString in AArch64BaseInfo.o "_strlen", referenced from: _cs_strdup in utils.o _SStream_concat0 in SStream.o _ARM_post_printer in ARMInstPrinter.o _PPC_printInst in PPCInstPrinter.o _Sparc_printInst in SparcInstPrinter.o _Sparc_map_hint in SparcMapping.o "_strncmp", referenced from: _ARM_post_printer in ARMInstPrinter.o "_strncpy", referenced from: _cs_disasm in cs.o _fill_insn in cs.o _cs_disasm_iter in cs.o "_strrchr", referenced from: _ARM_post_printer in ARMInstPrinter.o _AArch64_post_printer in AArch64InstPrinter.o _PPC_post_printer in PPCInstPrinter.o "_strstr", referenced from: _AArch64_printInst in AArch64InstPrinter.o _PPC_post_printer in PPCInstPrinter.o _printAliasInstr in SparcInstPrinter.o "_vsnprintf", referenced from: _cs_vsnprintf in cs.o (maybe you meant: _cs_vsnprintf) ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [libcapstone.dylib] Error 1 error: [Errno 2] No such file or directory: 'libcapstone.dylib' ---------------------------------------- ERROR: Command errored out with exit status 1: /Users/sabenix/Virtualenvs/cuckoo/bin/python2.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/db/v7f8qbh95sq3qvtykwysp4v40000gn/T/pip-req-build-ZHX9yi/setup.py'"'"'; file='"'"'/private/var/folders/db/v7f8qbh95sq3qvtykwysp4v40000gn/T/pip-req-build-ZHX9yi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/var/folders/db/v7f8qbh95sq3qvtykwysp4v40000gn/T/pip-record-O3Qqm4/install-record.txt --single-version-externally-managed --compile --install-headers /Users/sabenix/Virtualenvs/cuckoo/bin/../include/site/python2.7/capstone Check the logs for full command output.

Rodasa avatar Aug 17 '19 13:08 Rodasa

@Rodasa - Blacktop's answer in https://github.com/aquynh/capstone/issues/1235#issuecomment-426205870 confused me too. I finally figured it out:

  1. Run pip download capstone-3.0.5rc2
  2. Unzip the file: tar -xf capstone-3.0.5rc2.tar.gz
  3. Go to capstone-3.0.5rc2/src/make.sh
  4. Remove "i386" from line 63: export LIBARCHS="i386 x86_64

Will-Low avatar Jan 17 '20 12:01 Will-Low

It looks like Capstone is trying to build for i386, but you don't have the needed i386 libraries.

Capstone fixed this issue with #1260. At this point, 3.0.5rc2 (a pre-release) is over 3 years old. Cuckoo should be updated to pull in a more recent version.

tmfink avatar Apr 11 '20 13:04 tmfink

I'm having trouble install cuckoo because of the same issue. I tried what Will-Low is suggesting but I'm still getting an error.

nurajbihari avatar Apr 19 '20 18:04 nurajbihari

ERROR: Could not find a version that satisfies the requirement capstone-3.0.5rc2 (from versions: none) ERROR: No matching distribution found for capstone-3.0.5rc2

nurajbihari avatar Apr 19 '20 18:04 nurajbihari

How are you trying to install Cuckoo that requires you to install Capstone?

botherder avatar May 10 '20 07:05 botherder

The instructions from @Will-Low works, but need to modify from pip download capstone-3.0.5rc2 to pip download capstone==3.0.5rc2.

chrsow avatar Jul 26 '20 11:07 chrsow

I have followed @Will-Low instructions and @chrsow alteration which worked but when I went to install pip install -U cuckoo I got the same error message. Is there a specific location I am supposed to install this capstone in?

EDIT: Figured it out, run python setup.py install inside of the capstone directory

Getting an error for unicorn now stating " error: [Errno 2] No such file or directory: 'libunicorn.dylib' "

hcam93 avatar Jan 19 '21 23:01 hcam93

@hcam93 Same problem here

acheong08 avatar Feb 17 '21 07:02 acheong08

ERROR: Command errored out with exit status 1: command: /Users/ac/cuckoo/venv/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/xh/y_51j75s3xb5_w4j79jmkgz80000gn/T/pip-req-build-n2uF23/setup.py'"'"'; file='"'"'/private/var/folders/xh/y_51j75s3xb5_w4j79jmkgz80000gn/T/pip-req-build-n2uF23/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/xh/y_51j75s3xb5_w4j79jmkgz80000gn/T/pip-wheel-Z06AeW cwd: /private/var/folders/xh/y_51j75s3xb5_w4j79jmkgz80000gn/T/pip-req-build-n2uF23/ Complete output (11 lines): running bdist_wheel running build Building C extensions cd qemu &&
./configure --cc="cc" --extra-cflags="-DUNICORN_HAS_X86 -DUNICORN_HAS_ARM -DUNICORN_HAS_ARMEB -DUNICORN_HAS_M68K -DUNICORN_HAS_ARM64 -DUNICORN_HAS_MIPS -DUNICORN_HAS_MIPSEL -DUNICORN_HAS_MIPS64 -DUNICORN_HAS_MIPS64EL -DUNICORN_HAS_SPARC -fPIC -fvisibility=hidden -m32 -arch i386 -m64 -arch x86_64" --target-list="x86_64-softmmu, arm-softmmu, armeb-softmmu, m68k-softmmu, aarch64-softmmu, mips-softmmu, mipsel-softmmu, mips64-softmmu, mips64el-softmmu, sparc-softmmu,sparc64-softmmu,"

ERROR: pthread check failed Make sure to have the pthread libs and headers installed.

make: *** [qemu/config-host.h-timestamp] Error 1 error: [Errno 2] No such file or directory: 'libunicorn.dylib'

ERROR: Failed building wheel for unicorn

acheong08 avatar Feb 17 '21 07:02 acheong08

ERROR: Command errored out with exit status 1:
 command: /Users/ac/cuckoo/venv/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/xh/y_51j75s3xb5_w4j79jmkgz80000gn/T/pip-req-build-n2uF23/setup.py'"'"'; __file__='"'"'/private/var/folders/xh/y_51j75s3xb5_w4j79jmkgz80000gn/T/pip-req-build-n2uF23/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/xh/y_51j75s3xb5_w4j79jmkgz80000gn/T/pip-record-UXxPt2/install-record.txt --single-version-externally-managed --compile --install-headers /Users/ac/cuckoo/venv/include/site/python2.7/unicorn
     cwd: /private/var/folders/xh/y_51j75s3xb5_w4j79jmkgz80000gn/T/pip-req-build-n2uF23/
Complete output (11 lines):
running install
running build
Building C extensions
cd qemu && \
	./configure --cc="cc" --extra-cflags="-DUNICORN_HAS_X86 -DUNICORN_HAS_ARM -DUNICORN_HAS_ARMEB -DUNICORN_HAS_M68K -DUNICORN_HAS_ARM64 -DUNICORN_HAS_MIPS -DUNICORN_HAS_MIPSEL -DUNICORN_HAS_MIPS64 -DUNICORN_HAS_MIPS64EL -DUNICORN_HAS_SPARC -fPIC -fvisibility=hidden -m32 -arch i386 -m64 -arch x86_64" --target-list="x86_64-softmmu, arm-softmmu, armeb-softmmu, m68k-softmmu, aarch64-softmmu, mips-softmmu, mipsel-softmmu, mips64-softmmu, mips64el-softmmu, sparc-softmmu,sparc64-softmmu,"

ERROR: pthread check failed
       Make sure to have the pthread libs and headers installed.

make: *** [qemu/config-host.h-timestamp] Error 1
error: [Errno 2] No such file or directory: 'libunicorn.dylib'
----------------------------------------

ERROR: Command errored out with exit status 1: /Users/ac/cuckoo/venv/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/xh/y_51j75s3xb5_w4j79jmkgz80000gn/T/pip-req-build-n2uF23/setup.py'"'"'; file='"'"'/private/var/folders/xh/y_51j75s3xb5_w4j79jmkgz80000gn/T/pip-req-build-n2uF23/setup.py'"'

acheong08 avatar Feb 17 '21 07:02 acheong08

#1235 (comment)

I have followed @Will-Low instructions and @chrsow alteration which worked but when I went to install pip install -U cuckoo I got the same error message. Is there a specific location I am supposed to install this capstone in?

EDIT: Figured it out, run python setup.py install inside of the capstone directory

Getting an error for unicorn now stating " error: [Errno 2] No such file or directory: 'libunicorn.dylib' "

also need to run pip install -e capstone-3.0.5rc2 after you modified the file. This will install the library from your local file.

CassieXx0215 avatar Dec 06 '22 18:12 CassieXx0215

@kabeor @aquynh probably worth closing this one

XVilka avatar Jul 21 '23 16:07 XVilka