Menu

#292 Does not build with binutils-gdb master.

None
closed-fixed
nobody
5
2020-07-20
2019-11-09
Evgeniy
No

Building oprofile-1.3.0 with upstream binutils fails with error:
bfd_support.cpp:140:53: error: cannot convert 'bfd' to 'const asection' {aka 'const bfd_section*'}
More information about this error can be found here:
http://autobuild.buildroot.net/?reason=oprofile-1.3.0

We got this error for "ARC" architecture because arc-tools binutils are based on master branch rev 20191002, which includes the commit that caused the error. The commit is next:
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=fd3619828e94a24a92cddec42cbc0ab33352eeb4

Discussion

  • Dan Fandrich

    Dan Fandrich - 2020-03-16

    This patch fixes the build for me using binutils 2.34. It will cause compile failures for previous versions, so it needs to be made conditional if compatibility with older versions is needed.

     
  • William Cohen

    William Cohen - 2020-03-19

    There are still a number of distributions that have older bersions of binutils. This needs to be conditional so oprofile can be compiled with the older binutils. Should have a set of wrapper defines in another header file and have a a test in configure.ac to select the correct wrappers. I have put a patch that does that on https://sourceforge.net/p/oprofile/oprofile/ci/bfd234/tree/

    The patch allow oprofile to build on fedora 30 (binutils 2.31) and fedora rawhide (binutils 2.34). If the patch looks reasonable I can merge it into the master branch.

     
  • William Cohen

    William Cohen - 2020-03-23

    Could you try the current master branch of oprofile and verify that this fixes the reported problem?

     
  • Dan Fandrich

    Dan Fandrich - 2020-03-23

    master as of now compiles fine for me with binutils 2.34 and 2.33.

     
  • Evgeniy

    Evgeniy - 2020-03-23

    Hi,

    Tried this patch and the package compiled well. I will send this patch to Buildroot.
    Thanks you for fix!

     
  • William Cohen

    William Cohen - 2020-07-06
    • status: open --> open-fixed
    • Group: -->
     
  • William Cohen

    William Cohen - 2020-07-20
    • status: open-fixed --> closed-fixed
     

Log in to post a comment.