Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 438626

Summary: =sys-devel/binutils-2.22.90 installs unusable 'bfd.h' header
Product: Gentoo Linux Reporter: Sergei Trofimovich (RETIRED) <slyfox>
Component: [OLD] Core systemAssignee: Gentoo Toolchain Maintainers <toolchain>
Status: RESOLVED INVALID    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: http://sourceware.org/bugzilla/show_bug.cgi?id=14243
Whiteboard:
Package list:
Runtime testing required: ---

Description Sergei Trofimovich (RETIRED) gentoo-dev 2012-10-16 21:44:51 UTC
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.
Comment 1 SpanKY gentoo-dev 2012-10-17 04:43:51 UTC
fix the code to define appropriate PACKAGE/PACKAGE_VERSION such as creating a config.h via autoheader