boogy / ctfbox

CTF box with most tools installed
89 stars 17 forks source link

Error on Installation of Capstone #2

Closed ghost closed 7 years ago

ghost commented 7 years ago

I've tried troubleshooting this to the best of my ability. I'm running into the error below when trying to build on OSX 10.12. Right now I'm just using the image pulled from docker, but I've noticed there are a few things such as radare2 that have newer versions.

Step 12 : RUN git clone https://github.com/aquynh/capstone /home/ctf/tools/capstone     && cd /home/ctf/tools/capstone     && ./make.sh install     && cd /home/ctf/tools/capstone/bindings/python     && python3 setup.py install
 ---> Running in c5e438d17819
Cloning into '/home/ctf/tools/capstone'...
  GEN     capstone.pc
  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
  AR      libcapstone.a
ar: creating ./libcapstone.a
  LINK    libcapstone.so
mkdir -p /usr/lib
install -m0755 ./libcapstone.so /usr/lib
cd /usr/lib && mv libcapstone.so libcapstone.so.3 && ln -s libcapstone.so.3 libcapstone.so
install -m0644 ./libcapstone.a /usr/lib
mkdir -p /usr/include/capstone
install -m0644 include/*.h /usr/include/capstone
mkdir -p /usr/lib/pkgconfig
install -m0644 ./capstone.pc /usr/lib/pkgconfig/
mkdir -p /usr/bin
install -m0755 cstool/cstool /usr/bin
install: cannot stat 'cstool/cstool': No such file or directory
make: *** [install] Error 1
Makefile:380: recipe for target 'install' failed
The command '/bin/sh -c git clone https://github.com/aquynh/capstone /home/ctf/tools/capstone     && cd /home/ctf/tools/capstone     && ./make.sh install     && cd /home/ctf/tools/capstone/bindings/python     && python3 setup.py install' returned a non-zero code: 2
boogy commented 7 years ago

Sorry for the late response. Yes I'm trying to figure out why this error is happening. It's coming from the make.sh file.

When you have problems like this, if you still want to use the image with a new radare2 version, you can update radare2 and commit the change to your local docker image. A small workaround until I can make it build again without errors.

boogy commented 7 years ago

The capstone error is gone now. I don't know were it came from. I do have a problem with angr now :/. Doing some tests to make it work also.

boogy commented 7 years ago

Problem solved. Thanks for reporting the issue