zyw-200 / FirmAFL

FIRM-AFL is the first high-throughput greybox fuzzer for IoT firmware.
GNU General Public License v3.0
432 stars 90 forks source link

/usr/bin/ld: cannot find -lbfd when compile DECAF_qemu_2.10 #16

Open desword opened 4 years ago

desword commented 4 years ago

The system is:

Linux ubuntu 4.15.0-29-generic #31~16.04.1-Ubuntu SMP Wed Jul 18 08:54:04 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

The error is:

qemu_mode/DECAF_qemu_2.10$ make
    CHK version_gen.h
     LEX convert-dtsv0-lexer.lex.c
make[1]: flex: Command not found
     BISON dtc-parser.tab.c
make[1]: bison: Command not found
     LEX dtc-lexer.lex.c
make[1]: flex: Command not found
  LINK    tests/qemu-iotests/socket_scm_helper
/usr/bin/ld: cannot find -lbfd
collect2: error: ld returned 1 exit status
/home/username/FirmAFL-master/qemu_mode/DECAF_qemu_2.10/rules.mak:121: recipe for target 'tests/qemu-iotests/socket_scm_helper' failed
make: *** [tests/qemu-iotests/socket_scm_helper] Error 1
zyw-200 commented 4 years ago

It seems that there are some libraries (xx.so) missing in your system.

desword commented 4 years ago

The problem has been solved.

sudo apt-get install binutils-dev

However, I still encounter other errors. I recommend that add this INSTALL to your readme for compiling DECAF_qemu_2.10, such that many unnecessary errors can be avoided. https://github.com/decaf-project/DECAF/blob/master/decaf/INSTALL

in short, the dependences are :

sudo apt-get install -y libsdl1.2-dev zlib1g-dev libglib2.0-dev libbfd-dev build-essential binutils qemu libboost-dev git libtool autoconf xorg-dev