Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 438626 - =sys-devel/binutils-2.22.90 installs unusable 'bfd.h' header
Summary: =sys-devel/binutils-2.22.90 installs unusable 'bfd.h' header
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL: http://sourceware.org/bugzilla/show_b...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-16 21:44 UTC by Sergei Trofimovich (RETIRED)
Modified: 2012-10-17 04:43 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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