On Wed, Jan 27, 2021 at 05:54:48AM -0700, Jeff Law wrote:
On 1/27/21 5:48 AM, Sandro Mani wrote:
Apitrace is currently failing to build, with [1]
Test project /builddir/build/BUILD/apitrace-37c36e66b8cfa534797ca565c22e8c30923f35d4/x86_64-redhat-linux-gnu Start 1: libbacktrace_btest 1/6 Test #1: libbacktrace_btest ...............***Exception: SegFault 0.11 sec unrecognized DWARF version in .debug_info at 6
Some dwz issues were mentioned in the runup to the mass rebuild, is this a related issue?
More likely it doesn't understand dwarf5. GCC changed from defaulting from dwarf-v4 to dwarf-v5.
I don't offhand recall if apitrace has a copy of GCC's libbacktrace or its own complete reimplementation. If it's the former, then you might consider resyncing with GCC or picking up these changes from gcc.gnu.org/git/gcc.git:
commit bfde774667fbce6d7d326c8a36a098138e224a95 Author: Ian Lance Taylor iant@golang.org Date: Mon Jan 18 14:45:57 2021 -0800
libbacktrace: don't fail tests if dwz fails * Makefile.am (%_dwz): If dwz fails, use uncompressed debug info. * Makefile.in: Regenerate. * configure: Regenerate.
commit 325e70b47c6c321710c7b9c792b8fbee95cecd63 Author: Ian Lance Taylor iant@golang.org Date: Mon Jan 18 14:38:10 2021 -0800
libbacktrace: use correct directory/filename for DWARF 5 PR debug/98716 * dwarf.c (read_v2_paths): Allocate zero entry for dirs and filenames. (read_line_program): Remove parameter u, change caller. Don't subtract one from dirs and filenames index. (read_function_entry): Don't subtract one from filenames index.
unrecognized DWARF version means that 2019-12-13 Ian Lance Taylor iant@golang.org
Add DWARF 5 support. must be missing there too.
Jakub