Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 875320 - sys-apps/iproute2-5.15.0[bpf] fails to compile: undefined reference to `bpf_load_program'
Summary: sys-apps/iproute2-5.15.0[bpf] fails to compile: undefined reference to `bpf_...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-05 07:44 UTC by Florian Schmaus
Modified: 2022-10-05 07:44 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,68.13 KB, text/x-log)
2022-10-05 07:44 UTC, Florian Schmaus
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Schmaus gentoo-dev 2022-10-05 07:44:55 UTC
Created attachment 820780 [details]
build.log

ipruote2-5.15 fails to compile due an undefined reference to bpf_load_program. libbpf removed bpf_load_program in 1.0.0 with 9476dce6fe90 ("libbpf: remove deprecated low-level APIs") [1]

x86_64-pc-linux-gnu-gcc rtmon.o -Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0 -Wl,-export-dynamic ../lib/libutil.a ../lib/libnetlink.a -lbpf -lmnl -lcap -ldl -o rtmon
x86_64-pc-linux-gnu-gcc ip.o ipaddress.o ipaddrlabel.o iproute.o iprule.o ipnetns.o rtm_map.o iptunnel.o ip6tunnel.o tunnel.o ipneigh.o ipntable.o iplink.o ipmaddr.o ipmonitor.o ipmroute.o ipprefix.o iptuntap.o iptoken.o ipxfrm.o xfrm_state.o xfrm_policy.o xfrm_monitor.o iplink_dummy.o iplink_ifb.o iplink_nlmon.o iplink_team.o iplink_vcan.o iplink_vxcan.o iplink_vlan.o link_veth.o link_gre.o iplink_can.o iplink_xdp.o iplink_macvlan.o ipl2tp.o link_vti.o link_vti6.o link_xfrm.o iplink_vxlan.o tcp_metrics.o iplink_ipoib.o ipnetconf.o link_ip6tnl.o link_iptnl.o link_gre6.o iplink_bond.o iplink_bond_slave.o iplink_hsr.o iplink_bridge.o iplink_bridge_slave.o ipfou.o iplink_ipvlan.o iplink_geneve.o iplink_vrf.o iproute_lwtunnel.o ipmacsec.o ipila.o ipvrf.o iplink_xstats.o ipseg6.o iplink_netdevsim.o iplink_rmnet.o ipnexthop.o ipmptcp.o iplink_bareudp.o iplink_wwan.o ipioam6.o ../lib/libutil.a 
../lib/libnetlink.a -Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0 -Wl,-export-dynamic ../lib/libutil.a 
../lib/libnetlink.a -lbpf -lmnl -lcap -ldl -o ip
/usr/lib/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: 
../lib/libutil.a(bpf_glue.o): in function `bpf_program_load':
bpf_glue.c:(.text+0x13): undefined reference to `bpf_load_program'
collect2: error: ld returned 1 exit status


iproute2 5.18 compiles fine with libbpf 1.0.0, hence may I suggest to stable iproute2 5.18 (or maybe even 5.19) and drop 5.15?

1: https://github.com/libbpf/libbpf/commit/9476dce6fe905a6bf1d4c483f7b2b8575c4ffb2d#diff-4b440c545696b4c1c729c0ebc776a5c478ebf893f01d4891c2cd7fd1694431baL430