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.35 (or maybe 2.34?)

mhatta opened this issue · comments

Looks like #ifdef bfd_section_flags trick in opencog/util/backtrace-symbols.c doesn't work anymore with Binutils 2.35 (or did it work with 2.34?)

#ifndef bfd_get_section_flags works, but I'm not sure it's the way to go. If it's okay, I can provide a PR.

Provide a pull req.

I recently saw some generic library that does stack traces, .. I've already forgotten it's name and can't find it instantly .. the long term solution might be to port to that.

Stack-tracing is a debugging tool, it mostly does not affect ordinary users, and I use it only as a prelim to taking a closer look with gdb ... anyway, crashes are rare...

@linas I tested #237 with binutils 2.34 (on ubuntu 20.04) and 2.30 (on ubuntu 18.04) and this repo builds and tests passes. What failures are you referring to @ #237 (comment) ?

Hi @amebel -- there seem to be two incompatible versions of binutils, one version has an extra argument in a handful of calls; the other version does not. The current code tries to handle both versions with some #ifdef magic. The problem with #237 is that it defeats the #ifdef by making both version work the same way. That's why it's "obviously wrong".

Oh, and I am on Debian stable, and #237 breaks that ... I have GNU assembler (GNU Binutils for Debian) 2.31.