Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 909385 - dev-util/bcc-0.28.0: undefined reference to `bpf_btf_get_info_by_fd'
Summary: dev-util/bcc-0.28.0: undefined reference to `bpf_btf_get_info_by_fd'
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Patrick McLean
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-06-29 21:01 UTC by Gary E. Miller
Modified: 2023-12-23 18:45 UTC (History)
4 users (show)

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


Attachments
build log (dev-util:bcc-0.28.0:20230629-204518.log,108.15 KB, text/plain)
2023-06-29 21:02 UTC, Gary E. Miller
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gary E. Miller 2023-06-29 21:01:53 UTC
Fails to emerge.

Reproducible: Always

Steps to Reproduce:
1. emerge bcc
2.
3.
Actual Results:  
[87/157] : && /usr/bin/x86_64-pc-linux-gnu-gcc -O2 -pipe -march=haswell -fcommon
 -Wall -Wl,-O1 -Wl,--as-needed -Wl,-O1,--hash-style=gnu,--enable-new-dtags    -r
dynamic introspection/CMakeFiles/bps.dir/bps.c.o -o introspection/bps  -Wl,-rpat
h,/var/tmp/portage/dev-util/bcc-0.28.0/work/bcc-0.28.0_build/src/cc:  src/cc/lib
bcc_bpf.so.0.28.0  -lbpf  -lelf  -lz  -lrt  -llzma  -lbpf && :
FAILED: introspection/bps 
: && /usr/bin/x86_64-pc-linux-gnu-gcc -O2 -pipe -march=haswell -fcommon -Wall -Wl,-O1 -Wl,--as-needed -Wl,-O1,--hash-style=gnu,--enable-new-dtags    -rdynamic introspection/CMakeFiles/bps.dir/bps.c.o -o introspection/bps  -Wl,-rpath,/var/tmp/portage/dev-util/bcc-0.28.0/work/bcc-0.28.0_build/src/cc:  src/cc/libbcc_bpf.so.0.28.0  -lbpf  -lelf  -lz  -lrt  -llzma  -lbpf && :
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: src/cc/libbcc_bpf.so.0.28.0: undefined reference to `bpf_btf_get_info_by_fd'
collect2: error: ld returned 1 exit status




spidey ~ # emerge -pqv '=dev-util/bcc-0.28.0::gentoo'
[ebuild     U ] dev-util/bcc-0.28.0 [0.27.0-r1] USE="lua -test" LUA_SINGLE_TARGET="luajit" PYTHON_TARGETS="python3_10 python3_11 -python3_12%" 

spidey ~ # emerge --info '=dev-util/bcc-0.28.0::gentoo'
Portage 3.0.46 (python 3.11.4-final-0, default/linux/amd64/17.1, gcc-13, glibc-2.37-r3, 6.4.0-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-6.4.0-gentoo-x86_64-Intel-R-_Xeon-R-_CPU_E5-1620_v3_@_3.50GHz-with-glibc2.37
KiB Mem:    16270752 total,   3443372 free
KiB Swap:   33554428 total,  33554428 free
Timestamp of repository gentoo: Thu, 29 Jun 2023 18:15:01 +0000
Head commit of repository gentoo: 3aeea5d87883f7afbc1b89ed555d4815e82508d9
sh bash 5.1_p16-r6
ld GNU ld (Gentoo 2.39 p6) 2.39.0
distcc[31582] (dcc_trace_version) distcc 3.4 x86_64-pc-linux-gnu; built May  1 2023 13:29:52 [disabled]
ccache version 4.8.2 [disabled]
app-misc/pax-utils:        1.3.5::gentoo
app-shells/bash:           5.1_p16-r6::gentoo
dev-java/java-config:      2.3.1-r1::gentoo
dev-lang/perl:             5.36.1-r2::gentoo
dev-lang/python:           2.7.18_p16-r1::gentoo, 3.10.12::gentoo, 3.11.4::gentoo
dev-lang/rust:             1.69.0-r1::gentoo
dev-util/ccache:           4.8.2::gentoo
dev-util/cmake:            3.26.4-r1::gentoo
dev-util/meson:            1.1.1::gentoo
sys-apps/baselayout:       2.13-r1::gentoo
sys-apps/openrc:           0.46::gentoo
sys-apps/sandbox:          2.32::gentoo
sys-devel/autoconf:        2.13-r7::gentoo, 2.71-r6::gentoo
sys-devel/automake:        1.16.5::gentoo
sys-devel/binutils:        2.39-r5::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/clang:           15.0.7-r1::gentoo, 16.0.5::gentoo
sys-devel/gcc:             13.1.1_p20230527::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-devel/libtool:         2.4.7-r1::gentoo
sys-devel/lld:             15.0.7::gentoo, 16.0.5::gentoo
sys-devel/llvm:            15.0.7-r3::gentoo, 16.0.5::gentoo
sys-devel/make:            4.4.1-r1::gentoo
sys-kernel/linux-headers:  6.4::gentoo (virtual/os-headers)
sys-libs/glibc:            2.37-r3::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://backup.rellim.com/gentoo-portage
    priority: -1000
    volatile: False
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-jobs: 1
    sync-rsync-extra-opts: --exclude ChangeLog* --delete-excluded

brother-overlay
    location: /var/lib/layman/brother-overlay
    sync-type: rsync
    sync-uri: https://github.com/stefan-langenmaier/brother-overlay.git
    masters: gentoo
    priority: 50
    volatile: True
    sync-rsync-extra-opts: --exclude ChangeLog* --delete-excluded

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=haswell -fcommon"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0 /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php8.0/ext-active/ /etc/php/apache2-php8.1/ext-active/ /etc/php/apache2-php8.2/ext-active/ /etc/php/cgi-php8.0/ext-active/ /etc/php/cgi-php8.1/ext-active/ /etc/php/cgi-php8.2/ext-active/ /etc/php/cli-php8.0/ext-active/ /etc/php/cli-php8.1/ext-active/ /etc/php/cli-php8.2/ext-active/ /etc/php/fpm-php8.0/ext-active/ /etc/php/fpm-php8.1/ext-active/ /etc/php/fpm-php8.2/ext-active/ /etc/php/phpdbg-php8.0/ext-active/ /etc/php/phpdbg-php8.1/ext-active/ /etc/php/phpdbg-php8.2/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=haswell -fcommon"
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS="--keep-going=y --with-bdeps=y --backtrack=15"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg-live cgroup config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sfperms splitdebug unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://gentoo.gossamerhost.com http://gentoo.mirrors.tds.net/gentoo http://ftp.jaist.ac.jp/pub/Linux/Gentoo/ rsync://mirror.leaseweb.com/gentoo/ ftp://mirror.root.lu/gentoo/"
LANG="en_US.utf8"
LC_ALL=""
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-O1,--hash-style=gnu,--enable-new-dtags"
LEX="flex"
LINGUAS="en en_US"
MAKEOPTS="-j3 -l4"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--exclude ChangeLog* --delete-excluded"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp/"
SHELL="/bin/bash"
USE="X a52 aac aacplus aacs aalib acl adns aesicm aften aio alaw alsa amd64 amr ao archive ares aspell avahi avresample avx bash-completion bcmath berkdb binfilter blake2 bluray bzip2 cacert cairo calendar caps cdda cgi cgroup cli community corefonts cron crypt cscope cups curl daap dane dav1d dbi dbus dirac dlna dri drm dvb dvbcsa dvben50221 dvd ecwj2k egl elogind enca encode examples exif exit exiv2 extra extraengine faac faad fdk ffmpeg ffmpegthumbnailer fftw firmware flac flashrom fontconfig fontforge foomaticdb fortran fping fpm fpx g722 g729 gbm gcrypt gd gdbm geoip geos gif gimp git glamor glib gml gmp gmplayer gnome-keyring gnuplot gnutls gpg gphoto2 gps gs gsm gtk gtk3 gui hardened harfbuzz hddtemp hdf hdf5 hdri highlight http http2 hwdb icons iconv icu id3tag ilbc imagemagick imap infinality inifile inotify introspection ipmi iproute2 ipv6 jack java javascript jbig jce jemalloc jpeg jpeg2k json lcms libaom libass libdrm libextractor liblockfile libnotify librtmp libsamplerate libsecret libsoxr libtirpc libxml2 lmdb lvm lxc lz4 lzma lzo mad magic managesieve matroska mbox memcached mhash mjpeg mmap mmx mmxext mng mp3 mp4 mpeg mtp multilib mysql ncurses netcdf netlink network nfs nfsv4 nfsv41 nginx nodrm nptl nsplugin offensive ogdi ogg openal openexr opengl openh264 openmp openssl openvg opus osmesa pam pango pcap pcntl pcre pdf pdfimport pdo pgo pipewire pkcs7 plotutils plugins png policykit postproc ppds printsupport pth pulseaudio python q32 q8 qt4 qt5 rar rav1e raw readline realtime rle romio rpc rpz rrl rtmp scanner schroedinger scrypt sctp seccomp server sharedmem slp smi smime smp sndfile snmp sockets sound-server spamassassin speex spell sphinx spi split-usr sqlite sqlite3 sse sse2 sse3 sse4_1 ssh ssl ssse3 stats subtitles svg svt-av1 syslog system-llvm szip t1lib taglib test-rust theora thin-splines threads threadsafe thumbnail tiff tk tokudb tools truetype twolame udev uefi ulaw unbound unicode upcall update_drivedb urandom usb utils v4l v4l2 vaapi vhosts vim-syntax vlc vorbis vorbix vpx vulkan wav wavpack webkit webkit2 webp wg-quick widgets wikipedia winbind wmf x264 x265 xattr xcb xface xine xinerama xml xmp xmpp xorg xpm xslt xvfb xvid xz zeroconf zimg zip zlib zstd" ABI_X86="64" ADA_TARGET="gnat_2021" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_core authn_dbm authn_file authz_core authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir env expires ext_filter file_cache filter headers include info log_config logio mime mime_magic negotiation rewrite setenvif socache_shmcb speling status unique_id unixd userdir usertrack vhost_alias http2 proxy proxy_fcgi" APACHE2_MPMS="worker" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput" KERNEL="linux" L10N="en en-US" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" NGINX_MODULES_HTTP="auth_pam mp4 access auth_basic autoindex browser charset empty_gif fastcgi geo grpc gzip limit_conn limit_req map memcached mirror proxy referer rewrite scgi split_clients ssi upstream_hash upstream_ip_hash upstream_keepalive upstream_least_conn upstream_zone userid uwsgi dav dav_ext xslt" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-1" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_10" PYTHON_TARGETS="python3_11 python3_10" RUBY_TARGETS="ruby31" VIDEO_CARDS="vesa" VOICEMAIL_STORAGE="file imap" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LD, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Comment 1 Gary E. Miller 2023-06-29 21:02:58 UTC
Created attachment 864836 [details]
build log

build log
Comment 2 Ryan Tsien 2023-07-07 08:54:54 UTC
the same problem here.
Comment 3 cddr 2023-07-08 15:48:08 UTC
Same problem.
Comment 4 Corin Goodier 2023-08-22 08:58:24 UTC
FAILED: introspection/bps
: && /opt/rh/gcc-toolset-11/root/bin/cc -Wall -O2 -g -DNDEBUG -rdynamic introspection/CMakeFiles/bps.dir/bps.c.o -o introspection/bps  -Wl,-rpath,/home/sncradmin/rpmbuild/BUILD/bcc-0.28.0/src/cc:  src/cc/libbcc_bpf.so.0.28.0  -lbpf  -lelf  -lz  -lrt  -llzma  -ldebuginfod  -lbpf && :
/opt/rh/gcc-toolset-11/root/bin/ld: src/cc/libbcc_bpf.so.0.28.0: undefined reference to `bpf_btf_get_info_by_fd'
collect2: error: ld returned 1 exit status

Same problem. Actually running this on Rocky Linux 8 (using Gentoo code to build updated libs etc for kernels and also media transcoding...) gcc is v11 from gcctoolset. libbpf is 1.1.0 and kernel being used is 6.1.46. 0.27.0 builds perfectly fine.
Comment 5 Holger Hoffstätte 2023-10-31 17:34:47 UTC
bpf_btf_get_info_by_fd is only in >=libbpf-1.2.x:

https://github.com/libbpf/libbpf/blob/3189f70538b50fe3d2fd63f77351991a224e435b/src/libbpf.map#L388

Seems like the requirement needs to be updated in the 0.28.0 ebuild.
Comment 6 Larry the Git Cow gentoo-dev 2023-12-23 18:45:36 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1e80ecfbe83a5413464c782693404b1ca3ebcb3d

commit 1e80ecfbe83a5413464c782693404b1ca3ebcb3d
Author:     Jakov Smolić <jsmolic@gentoo.org>
AuthorDate: 2023-12-23 18:40:20 +0000
Commit:     Jakov Smolić <jsmolic@gentoo.org>
CommitDate: 2023-12-23 18:45:23 +0000

    dev-util/bcc: Increase minimum libbpf version
    
    Closes: https://bugs.gentoo.org/909385
    Signed-off-by: Jakov Smolić <jsmolic@gentoo.org>

 dev-util/bcc/{bcc-0.28.0.ebuild => bcc-0.28.0-r1.ebuild} | 2 +-
 dev-util/bcc/{bcc-0.29.1.ebuild => bcc-0.29.1-r1.ebuild} | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)