honggfuzz: Unable to compile due to binutils
I’m unable to compile honggfuzz on ArchLinux with the following errors:
cc -c -D_GNU_SOURCE -Wall -Werror -Wframe-larger-than=51200 -std=c11 -I. -I/usr/local/include -I/usr/include -Wextra -Wno-initializer-overrides -Wno-override-init -Wno-unknown-warning-option -funroll-loops -O2 -D_FILE_OFFSET_BITS=64 -msse4.2 -D_HF_ARCH_LINUX -o linux/bfd.o linux/bfd.c
In file included from linux/bfd.c:27:0:
/usr/include/bfd.h:35:2: error: #error config.h must be included before this header
#error config.h must be included before this header
^
cc1: error: unrecognized command line option ‘-Wno-unknown-warning-option’ [-Werror]
cc1: error: unrecognized command line option ‘-Wno-initializer-overrides’ [-Werror]
cc1: all warnings being treated as errors
Makefile:161: recipe for target 'linux/bfd.o' failed
make: *** [linux/bfd.o] Error 1
It works properly on Ubuntu 14.4, while I’m using:
$ uname -a Linux zenbook 4.4.1-2-ARCH #1 SMP PREEMPT Wed Feb 3 13:12:33 UTC 2016 x86_64 GNU/Linux $ gcc --version gcc (GCC) 5.3.0 $ pacman -Qi binutils Name : binutils Version : 2.25.1-3
As far as I can tell, it seems to be a bug in binutils?
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 22 (1 by maintainers)
I managed to compile it.
First set the package version and name in linux/bfd.c
This is done to please the bfd.c change, as explained in the Stackoverflow thread.
Then i added libraries dl and z and also libiberty.a as flags to ARCH_LDFLAGS, since these are the libraries bfd are unable to find. line 40-42: