Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 923919

Summary: dev-libs/libbpf-1.3.0 fails to compile: ld.lld: error: version script assignment of LIBBPF_0.3.0 to symbol btf__new_split failed: symbol not defined
Product: Gentoo Linux Reporter: Agostino Sarubbo <ago>
Component: Current packagesAssignee: Patrick McLean <chutzpah>
Status: CONFIRMED ---    
Severity: normal CC: gentoo.qxrin, jsmolic, wikky
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: build.log

Description Agostino Sarubbo gentoo-dev 2024-02-06 11:02:29 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: dev-libs/libbpf-1.3.0 fails to compile.
Discovered on: amd64 (internal ref: clang-lld_tinderbox)
System: CLANG-LLD (https://wiki.gentoo.org/wiki/Project:Tinderbox/Common_Issues_Helper#CLANG-LLD)

Info about the issue:
https://wiki.gentoo.org/wiki/Project:Tinderbox/Common_Issues_Helper#CF0014
Comment 1 Agostino Sarubbo gentoo-dev 2024-02-06 11:02:31 UTC
Created attachment 884359 [details]
build.log

build log and emerge --info
Comment 2 Vic Kerr (wikky) 2024-03-12 11:55:35 UTC
This issue also affects 1.2.2.

The following commits implement the missing APIs:
https://github.com/libbpf/libbpf/commit/95b4beb50201267a45cc193e86512996e5c7409a
https://github.com/libbpf/libbpf/commit/5b7613e50fd94b447b3cd18ae3de9dacd5d60cb9

I presume they're slated for a future 1.4 release.

I have trivially back-ported them to 1.2.2 and 1.3. Just remove the libbpf.map changes from the patches.
Alternatively, we could just remove the missing symbols from libbpf.map.

The patches don't apply cleanly as the ebuild sets S="${WORKDIR}/${P}/src" but patches apply to src/, again trivial to fix with sed.
Comment 3 Vic Kerr (wikky) 2024-04-02 10:53:12 UTC
libbpf-1.4.0 has been released on 1 April. The release notes mention:

> btf_ext__raw_data() and btf__new_split() APIs are added back, they were "lost" during libbpf v1.0 release process;

https://github.com/libbpf/libbpf/releases/tag/v1.4.0