On 08/06/2012 03:39 PM, Maynard Johnson wrote:
> On 08/03/2012 05:08 PM, Antonio Rosales wrote:
>> Maynard had a recent post to the binutils mailing list with a compilation issue with the latest oprofile 0.9.7 that I also ran into. As a result it appears patch was introduced. However, I also had to patch libutil++/bfd_support.h to also include config.h ahead of the other files in order for the compilation to proceed.
>> I am compiling oprofile with the "--with-kernel-support" config option on a Ubuntu 12.10 system (x86-64/3.5.0-6 kernel/4.7.1 gcc).
>> Has anyone else had to patch libutil++/bfd_support.h to bypass the binutils compilation issue?
> Hi, Antonio,
> It doesn't hurt to move the inclusion of config.h up to the top, so even though I've not seen it yet, the change is OK by me. I committed the change upstream already. Thanks for reporting it.
Thanks for the information and the addition.
>>  http://lists.gnu.org/archive/html/bug-binutils/2012-06/msg00072.html
>>  http://oprofile.git.sourceforge.net/git/gitweb.cgi?p=oprofile/oprofile;a=patch;h=08d9173be36f3ffcdac80e0405326775aaf0b13c
>> diff -uNr a/libutil++/bfd_support.h b/libutil++/bfd_support.h
>> --- a/libutil++/bfd_support.h 2011-07-04 21:25:04.000000000 -0500
>> +++ b/libutil++/bfd_support.h 2012-08-01 17:52:46.697741404 -0500
>> @@ -11,6 +11,7 @@
>> #ifndef BFD_SUPPORT_H
>> #define BFD_SUPPORT_H
>> +#include "config.h"
>> #include "utility.h"
>> #include "op_types.h"
>> #include "locate_images.h"