linux-tools: perf incorrectly linking libbfd -- again

Bug #1828234 reported by Andy Whitcroft on 2019-05-08
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Status tracked in Eoan
Disco
High
Andy Whitcroft
Eoan
High
Unassigned

Bug Description

= SRU Justification =

Impact: Linking perf (part of the linux-tools package) against libbfd prevents users to have linux-tools of different kernel versions installed in parallel. Which makes debugging hard.

Fix: As stated above this had been fixed before but upstream changes of the kernel between 4.19 and 5.0 voided those fixes. Unfortunately without causing build failures but causing libbfd to be used again.

Testcase: Extracting ./usr/lib/linux-tools-*/perf from the generated linux-tools package and inspecting it with ldd. Old builds will have a reference to libbfd, the test builds will not.

Risk of regression: low as this is a build-time change.
=====

It seems the previous attempt to disable use of libbfd has been rendered ineffective by an upstream change:

  commit 14541b1e7e723859ff2c75c6fc10cdbbec6b8c34
  Author: Stanislav Fomichev <email address hidden>
  Date: Thu Nov 15 16:32:01 2018 -0800

    perf build: Don't unconditionally link the libbfd feature test to -liberty and -lz

This leads us to have a hard dependency on libbfd at a specific minor version. We do not need this library, we can use libiberty and others for the same functions in perf.

This is a recurrance of Bug #1748922.

Andy Whitcroft (apw) on 2019-05-08
description: updated
Changed in linux (Ubuntu):
status: New → Confirmed
importance: Undecided → High
assignee: nobody → Andy Whitcroft (apw)
description: updated
Changed in linux (Ubuntu Disco):
status: New → Confirmed
importance: Undecided → High
assignee: nobody → Andy Whitcroft (apw)
Changed in linux (Ubuntu Eoan):
assignee: Andy Whitcroft (apw) → nobody
Stefan Bader (smb) wrote :

This has been applied to Disco (and I believe to Eoan, too) but the bug reference was pointing to a different bug (just libbfd and libbfp looking too similar to notice): bug #1826410. This will require some care to untangle without requiring to do the kernel again.

Changed in linux (Ubuntu Disco):
status: Confirmed → Fix Committed
Changed in linux (Ubuntu Eoan):
status: Confirmed → Fix Committed
Stefan Bader (smb) wrote :

Verification done for this (cross-reference will be added to the other bug):

$ dpkg -x linux-tools-5.0.0-16_5.0.0-16.17_amd64.deb unpack
$ ldd unpack/usr/lib/linux-tools-5.0.0-16/perf |grep -c bfd
0

Successfully verified for Disco.

Brad Figg (brad-figg) on 2019-07-24
tags: added: cscc
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers