linux-tools: perf incorrectly linking libbfd -- again

Bug #1828234 reported by Andy Whitcroft
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Committed
High
Unassigned
Disco
Won't Fix
High
Andy Whitcroft
Eoan
Won't Fix
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.

Tags: cscc
Andy Whitcroft (apw)
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
Revision history for this message
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
Revision history for this message
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)
tags: added: cscc
Steve Langasek (vorlon)
Changed in linux (Ubuntu Disco):
status: Fix Committed → Won't Fix
Revision history for this message
Brian Murray (brian-murray) wrote :

eoan has reached end of life, so this bug will not be fixed for that release

Changed in linux (Ubuntu Eoan):
status: Fix Committed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.