opencog / cogutil

Very low-level C++ programming utilities used by several components

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Breakage with Binutils 2.34

mhatta opened this issue · comments

Seems some macros have been changed in Binutils 2.34.

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff;h=fd3619828e94a24a92cddec42cbc0ab33352eeb4

To build cogutil with it, changes like the following needed (should make it conditional?)

--- a/opencog/util/backtrace-symbols.c
+++ b/opencog/util/backtrace-symbols.c
@@ -121,14 +121,14 @@
       if (spot->found)
             return;
 
-      if ((bfd_get_section_flags(abfd, section) & SEC_ALLOC) == 0)
+      if ((bfd_section_flags(section) & SEC_ALLOC) == 0)
             return;
 
-      vma = bfd_get_section_vma(abfd, section);
+      vma = bfd_section_vma(section);
       if (spot->pc < vma)
             return;
 
-      size = bfd_section_size(abfd, section);
+      size = bfd_section_size(section);
       if (spot->pc >= vma + size)
             return;

Yes, it should be conditional: different people will have different versions installed ... Can you attempt a pull req?

Fixed in #225

Closing...