Some packages expect '<bfd.h>' to work as-is. It used to work as: $ echo -e "#include <bfd.h>\nint main()" >a.c && gcc -c a.c In file included from a.c:1:0: /usr/include/bfd.h:37:2: error: #error config.h must be included before this header a.c: In function 'main': a.c:2:1: error: expected '{' at end of input Latest binutils brought in generated file such thing: + /* PR 14072: Ensure that config.h is included first. */ + #if !defined PACKAGE && !defined PACKAGE_VERSION + #error config.h must be included before this header + #endif It's a bit odd as binutils does not install config.h thus enforces any user to define those silly macros. Found on package dev-haskell/bindinfs-bfd in haskell overlay. Verified on in-tree dev-util/oprofile stable ebuild.
fix the code to define appropriate PACKAGE/PACKAGE_VERSION such as creating a config.h via autoheader