View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0001604 | channel: kernel/el9 | kernel-ml | public | 2026-09-02 10:16 | 2026-10-23 13:32 |
| Reporter | lux | Assigned To | toracat | ||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | resolved | Resolution | fixed | ||
| Platform | x86_64 | OS | AlmaLinux | OS Version | 9 |
| Summary | 0001604: Problem recompiling kernel-ml since 7.2.1 | ||||
| Description | Hallo. This is not a bug. I'm trying to recompile kernel-ml on my Alma Linux 9 box but since 7.2.1, it fails (I was able to recompile on the same system up to 7.1.10). I use mock to recompile my packages. I just would like to know if there is some info about the Elrepo compiling environment because apparently mine has some difference, which leads to my compilation to fail. The failing part is when it comes to compile bpftool: + pushd tools/bpf/bpftool + /usr/bin/make -s 'EXTRA_CFLAGS=-O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' 'EXTRA_LDFLAGS=-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 ' DESTDIR=/builddir/build/BUILDROOT/kernel-ml-7.2.2-1.el9.x86_64 VMLINUX_H=vmlinux.h Auto-detecting system features: ... clang-bpf-co-re: [ on ] ... llvm: [ on ] ... libcap: [ on ] ... libbfd: [ on ] make: Circular vmlinux.h <- vmlinux.h dependency dropped. cc1: warning: '-Wformat-y2k' ignored without '-Wformat' [-Wformat-y2k] cc1: warning: '-Wformat-security' ignored without '-Wformat' [-Wformat-security] /usr/bin/ld: /builddir/build/BUILD/kernel-ml-7.2.2/linux-7.2.2-1.el9.x86_64/tools/bpf/bpftool/bootstrap/main.o: relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a PIE object; recompile with -fPIE /usr/bin/ld: /builddir/build/BUILD/kernel-ml-7.2.2/linux-7.2.2-1.el9.x86_64/tools/bpf/bpftool/bootstrap/common.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE /usr/bin/ld: /builddir/build/BUILD/kernel-ml-7.2.2/linux-7.2.2-1.el9.x86_64/tools/bpf/bpftool/bootstrap/json_writer.o: relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIE /usr/bin/ld: /builddir/build/BUILD/kernel-ml-7.2.2/linux-7.2.2-1.el9.x86_64/tools/bpf/bpftool/bootstrap/gen.o: relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIE /usr/bin/ld: /builddir/build/BUILD/kernel-ml-7.2.2/linux-7.2.2-1.el9.x86_64/tools/bpf/bpftool/bootstrap/btf.o: relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIE /usr/bin/ld: /builddir/build/BUILD/kernel-ml-7.2.2/linux-7.2.2-1.el9.x86_64/tools/bpf/bpftool/bootstrap/sign.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE /usr/bin/ld: /builddir/build/BUILD/kernel-ml-7.2.2/linux-7.2.2-1.el9.x86_64/tools/bpf/bpftool/bootstrap/libbpf/libbpf.a(libbpf-in.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE collect2: error: ld returned 1 exit status make: *** [Makefile:288: /builddir/build/BUILD/kernel-ml-7.2.2/linux-7.2.2-1.el9.x86_64/tools/bpf/bpftool/bootstrap/bpftool] Error 1 error: Bad exit status from /var/tmp/rpm-tmp.8VoQXv (%build) By opening a shell into the mock build dir and trying some flags combinations, it seems that the offending part is "-specs=/usr/lib/rpm/redhat/redhat-hardened-ld" which for me, contains: *self_spec: + %{!static:%{!shared:%{!r:-pie}}} I saw that from 7.1.10 to 7.2.1 some changes where made to the bpftool Makefile, which I think are giving my problem. I hope that someone can tell me what exact command is run in Elrepo build environment (the long make... above), what /usr/lib/rpm/redhat/redhat-hardened-ld contains, and in general any advice which could help me to solve the problem. Thank you. | ||||
| Steps To Reproduce | Use Alma 9 x86_64 Install the mock build environment create a src.rpm containing the kernel source rpmbuild -bs --with src kernel-ml-7.2.spec try to rebuild with mock rebuild _path_to_src_rpm | ||||
| Tags | No tags attached. | ||||
|
|
You are not alone. We saw the same error when building the 7.2 kernels as reported in: https://elrepo.org/bugs/view.php?id=1599 We decided to exclude bpftool . |
|
|
Hallo. The link provided, https://elrepo.org/bugs/view.php?id=1599, gives ma Access Denied. Maybe I don't have enough seniority to view it:-/ Anyway, I was able to compile the package (with bpftool) by appending HOST_EXTRACFLAGS="-fPIE" to the line: %global bpftool_make \ %{__make} -s EXTRA_CFLAGS="${RPM_OPT_FLAGS}" EXTRA_LDFLAGS="%{__global_ldflags}" DESTDIR=$RPM_BUILD_ROOT VMLINUX_H="${RPM_VMLINUX_H}" HOST_EXTRACFLAGS="-fPIE" I don't know if this is the optimal solution. |
|
|
Sorry, bug1599 is an internal memo. Thank you for sharing the solution that fixes the build issue. We will confirm it and re-build the kernel-ml package. |
|
|
I see that, at least in my environment, there is a very similar problem even in el10 package, but not exactly in bpftool. The offending part is: rm -f -f /builddir/build/BUILD/kernel-frank-7.2.2/linux-7.2.2-1.el10.frank.x86_64/tools/perf/util/bpf_skel/.tmp/bootstrap/libbpf/libbpf.a; ar rcs /builddir/build/BUILD/kernel-frank-7.2.2/linux-7.2.2-1.el10.frank.x86_64/tools/perf/util/bpf_skel/.tmp/bootstrap/libbpf/libbpf.a /builddir/build/BUILD/kernel-frank-7.2.2/linux-7.2.2-1.el10.frank.x86_64/tools/perf/util/bpf_skel/.tmp/bootstrap/libbpf/staticobjs/libbpf-in.o gcc -O2 -W -Wall -Wextra -Wformat-signedness -Wno-unused-parameter -Wno-missing-field-initializers -Wbad-function-cast -Wdeclaration-after-statement -Wformat-security -Wformat-y2k -Winit-self -Wmissing-declarations -Wmissing-prototypes -Wno-system-headers -Wold-style-definition -Wpacked -Wredundant-decls -Wstrict-prototypes -Wswitch-default -Wundef -Wwrite-strings -Wformat -Wno-type-limits -Wstrict-aliasing=3 -Wshadow -DPACKAGE='"bpftool"' -D__EXPORTED_HEADERS__ -I/builddir/build/BUILD/kernel-frank-7.2.2/linux-7.2.2-1.el10.frank.x86_64/tools/perf/util/bpf_skel/.tmp/ -I/builddir/build/BUILD/kernel-frank-7.2.2/linux-7.2.2-1.el10.frank.x86_64/tools/perf/util/bpf_skel/.tmp/bootstrap/libbpf/include -I/builddir/build/BUILD/kernel-frank-7.2.2/linux-7.2.2-1.el10.frank.x86_64/kernel/bpf/ -I/builddir/build/BUILD/kernel-frank-7.2.2/linux-7.2.2-1.el10.frank.x86_64/tools/include -I/builddir/build/BUILD/kernel-frank-7.2.2/linux-7.2.2-1.el10.frank.x86_64/tools/include/uapi -c -MMD main.c -o /builddir/build/BUILD/kernel-frank-7.2.2/linux-7.2.2-1.el10.frank.x86_64/tools/perf/util/bpf_skel/.tmp/bootstrap/main.o gcc -O2 -W -Wall -Wextra -Wformat-signedness -Wno-unused-parameter -Wno-missing-field-initializers -Wbad-function-cast -Wdeclaration-after-statement -Wformat-security -Wformat-y2k -Winit-self -Wmissing-declarations -Wmissing-prototypes -Wno-system-headers -Wold-style-definition -Wpacked -Wredundant-decls -Wstrict-prototypes -Wswitch-default -Wundef -Wwrite-strings -Wformat -Wno-type-limits -Wstrict-aliasing=3 -Wshadow -DPACKAGE='"bpftool"' -D__EXPORTED_HEADERS__ -I/builddir/build/BUILD/kernel-frank-7.2.2/linux-7.2.2-1.el10.frank.x86_64/tools/perf/util/bpf_skel/.tmp/ -I/builddir/build/BUILD/kernel-frank-7.2.2/linux-7.2.2-1.el10.frank.x86_64/tools/perf/util/bpf_skel/.tmp/bootstrap/libbpf/include -I/builddir/build/BUILD/kernel-frank-7.2.2/linux-7.2.2-1.el10.frank.x86_64/kernel/bpf/ -I/builddir/build/BUILD/kernel-frank-7.2.2/linux-7.2.2-1.el10.frank.x86_64/tools/include -I/builddir/build/BUILD/kernel-frank-7.2.2/linux-7.2.2-1.el10.frank.x86_64/tools/include/uapi -c -MMD common.c -o /builddir/build/BUILD/kernel-frank-7.2.2/linux-7.2.2-1.el10.frank.x86_64/tools/perf/util/bpf_skel/.tmp/bootstrap/common.o gcc -O2 -W -Wall -Wextra -Wformat-signedness -Wno-unused-parameter -Wno-missing-field-initializers -Wbad-function-cast -Wdeclaration-after-statement -Wformat-security -Wformat-y2k -Winit-self -Wmissing-declarations -Wmissing-prototypes -Wno-system-headers -Wold-style-definition -Wpacked -Wredundant-decls -Wstrict-prototypes -Wswitch-default -Wundef -Wwrite-strings -Wformat -Wno-type-limits -Wstrict-aliasing=3 -Wshadow -DPACKAGE='"bpftool"' -D__EXPORTED_HEADERS__ -I/builddir/build/BUILD/kernel-frank-7.2.2/linux-7.2.2-1.el10.frank.x86_64/tools/perf/util/bpf_skel/.tmp/ -I/builddir/build/BUILD/kernel-frank-7.2.2/linux-7.2.2-1.el10.frank.x86_64/tools/perf/util/bpf_skel/.tmp/bootstrap/libbpf/include -I/builddir/build/BUILD/kernel-frank-7.2.2/linux-7.2.2-1.el10.frank.x86_64/kernel/bpf/ -I/builddir/build/BUILD/kernel-frank-7.2.2/linux-7.2.2-1.el10.frank.x86_64/tools/include -I/builddir/build/BUILD/kernel-frank-7.2.2/linux-7.2.2-1.el10.frank.x86_64/tools/include/uapi -c -MMD json_writer.c -o /builddir/build/BUILD/kernel-frank-7.2.2/linux-7.2.2-1.el10.frank.x86_64/tools/perf/util/bpf_skel/.tmp/bootstrap/json_writer.o gcc -O2 -W -Wall -Wextra -Wformat-signedness -Wno-unused-parameter -Wno-missing-field-initializers -Wbad-function-cast -Wdeclaration-after-statement -Wformat-security -Wformat-y2k -Winit-self -Wmissing-declarations -Wmissing-prototypes -Wno-system-headers -Wold-style-definition -Wpacked -Wredundant-decls -Wstrict-prototypes -Wswitch-default -Wundef -Wwrite-strings -Wformat -Wno-type-limits -Wstrict-aliasing=3 -Wshadow -DPACKAGE='"bpftool"' -D__EXPORTED_HEADERS__ -I/builddir/build/BUILD/kernel-frank-7.2.2/linux-7.2.2-1.el10.frank.x86_64/tools/perf/util/bpf_skel/.tmp/ -I/builddir/build/BUILD/kernel-frank-7.2.2/linux-7.2.2-1.el10.frank.x86_64/tools/perf/util/bpf_skel/.tmp/bootstrap/libbpf/include -I/builddir/build/BUILD/kernel-frank-7.2.2/linux-7.2.2-1.el10.frank.x86_64/kernel/bpf/ -I/builddir/build/BUILD/kernel-frank-7.2.2/linux-7.2.2-1.el10.frank.x86_64/tools/include -I/builddir/build/BUILD/kernel-frank-7.2.2/linux-7.2.2-1.el10.frank.x86_64/tools/include/uapi -c -MMD gen.c -o /builddir/build/BUILD/kernel-frank-7.2.2/linux-7.2.2-1.el10.frank.x86_64/tools/perf/util/bpf_skel/.tmp/bootstrap/gen.o gcc -O2 -W -Wall -Wextra -Wformat-signedness -Wno-unused-parameter -Wno-missing-field-initializers -Wbad-function-cast -Wdeclaration-after-statement -Wformat-security -Wformat-y2k -Winit-self -Wmissing-declarations -Wmissing-prototypes -Wno-system-headers -Wold-style-definition -Wpacked -Wredundant-decls -Wstrict-prototypes -Wswitch-default -Wundef -Wwrite-strings -Wformat -Wno-type-limits -Wstrict-aliasing=3 -Wshadow -DPACKAGE='"bpftool"' -D__EXPORTED_HEADERS__ -I/builddir/build/BUILD/kernel-frank-7.2.2/linux-7.2.2-1.el10.frank.x86_64/tools/perf/util/bpf_skel/.tmp/ -I/builddir/build/BUILD/kernel-frank-7.2.2/linux-7.2.2-1.el10.frank.x86_64/tools/perf/util/bpf_skel/.tmp/bootstrap/libbpf/include -I/builddir/build/BUILD/kernel-frank-7.2.2/linux-7.2.2-1.el10.frank.x86_64/kernel/bpf/ -I/builddir/build/BUILD/kernel-frank-7.2.2/linux-7.2.2-1.el10.frank.x86_64/tools/include -I/builddir/build/BUILD/kernel-frank-7.2.2/linux-7.2.2-1.el10.frank.x86_64/tools/include/uapi -c -MMD btf.c -o /builddir/build/BUILD/kernel-frank-7.2.2/linux-7.2.2-1.el10.frank.x86_64/tools/perf/util/bpf_skel/.tmp/bootstrap/btf.o gcc -O2 -W -Wall -Wextra -Wformat-signedness -Wno-unused-parameter -Wno-missing-field-initializers -Wbad-function-cast -Wdeclaration-after-statement -Wformat-security -Wformat-y2k -Winit-self -Wmissing-declarations -Wmissing-prototypes -Wno-system-headers -Wold-style-definition -Wpacked -Wredundant-decls -Wstrict-prototypes -Wswitch-default -Wundef -Wwrite-strings -Wformat -Wno-type-limits -Wstrict-aliasing=3 -Wshadow -DPACKAGE='"bpftool"' -D__EXPORTED_HEADERS__ -I/builddir/build/BUILD/kernel-frank-7.2.2/linux-7.2.2-1.el10.frank.x86_64/tools/perf/util/bpf_skel/.tmp/ -I/builddir/build/BUILD/kernel-frank-7.2.2/linux-7.2.2-1.el10.frank.x86_64/tools/perf/util/bpf_skel/.tmp/bootstrap/libbpf/include -I/builddir/build/BUILD/kernel-frank-7.2.2/linux-7.2.2-1.el10.frank.x86_64/kernel/bpf/ -I/builddir/build/BUILD/kernel-frank-7.2.2/linux-7.2.2-1.el10.frank.x86_64/tools/include -I/builddir/build/BUILD/kernel-frank-7.2.2/linux-7.2.2-1.el10.frank.x86_64/tools/include/uapi -c -MMD sign.c -o /builddir/build/BUILD/kernel-frank-7.2.2/linux-7.2.2-1.el10.frank.x86_64/tools/perf/util/bpf_skel/.tmp/bootstrap/sign.o gcc -O2 -W -Wall -Wextra -Wformat-signedness -Wno-unused-parameter -Wno-missing-field-initializers -Wbad-function-cast -Wdeclaration-after-statement -Wformat-security -Wformat-y2k -Winit-self -Wmissing-declarations -Wmissing-prototypes -Wno-system-headers -Wold-style-definition -Wpacked -Wredundant-decls -Wstrict-prototypes -Wswitch-default -Wundef -Wwrite-strings -Wformat -Wno-type-limits -Wstrict-aliasing=3 -Wshadow -DPACKAGE='"bpftool"' -D__EXPORTED_HEADERS__ -I/builddir/build/BUILD/kernel-frank-7.2.2/linux-7.2.2-1.el10.frank.x86_64/tools/perf/util/bpf_skel/.tmp/ -I/builddir/build/BUILD/kernel-frank-7.2.2/linux-7.2.2-1.el10.frank.x86_64/tools/perf/util/bpf_skel/.tmp/bootstrap/libbpf/include -I/builddir/build/BUILD/kernel-frank-7.2.2/linux-7.2.2-1.el10.frank.x86_64/kernel/bpf/ -I/builddir/build/BUILD/kernel-frank-7.2.2/linux-7.2.2-1.el10.frank.x86_64/tools/include -I/builddir/build/BUILD/kernel-frank-7.2.2/linux-7.2.2-1.el10.frank.x86_64/tools/include/uapi -Wl,-z,relro -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-hardened-ld-errors -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -specs=/usr/lib/rpm/redhat/redhat-package-notes -Wl,-E -Wl,-z,noexecstack -L/usr/lib64 /builddir/build/BUILD/kernel-frank-7.2.2/linux-7.2.2-1.el10.frank.x86_64/tools/perf/util/bpf_skel/.tmp/bootstrap/main.o /builddir/build/BUILD/kernel-frank-7.2.2/linux-7.2.2-1.el10.frank.x86_64/tools/perf/util/bpf_skel/.tmp/bootstrap/common.o /builddir/build/BUILD/kernel-frank-7.2.2/linux-7.2.2-1.el10.frank.x86_64/tools/perf/util/bpf_skel/.tmp/bootstrap/json_writer.o /builddir/build/BUILD/kernel-frank-7.2.2/linux-7.2.2-1.el10.frank.x86_64/tools/perf/util/bpf_skel/.tmp/bootstrap/gen.o /builddir/build/BUILD/kernel-frank-7.2.2/linux-7.2.2-1.el10.frank.x86_64/tools/perf/util/bpf_skel/.tmp/bootstrap/btf.o /builddir/build/BUILD/kernel-frank-7.2.2/linux-7.2.2-1.el10.frank.x86_64/tools/perf/util/bpf_skel/.tmp/bootstrap/sign.o /builddir/build/BUILD/kernel-frank-7.2.2/linux-7.2.2-1.el10.frank.x86_64/tools/perf/util/bpf_skel/.tmp/bootstrap/libbpf/libbpf.a -lelf -lcrypto -lz -lzstd -o /builddir/build/BUILD/kernel-frank-7.2.2/linux-7.2.2-1.el10.frank.x86_64/tools/perf/util/bpf_skel/.tmp/bootstrap/bpftool gcc -O2 -W -Wall -Wextra -Wformat-signedness -Wno-unused-parameter -Wno-missing-field-initializers -Wbad-function-cast -Wdeclaration-after-statement -Wformat-security -Wformat-y2k -Winit-self -Wmissing-declarations -Wmissing-prototypes -Wno-system-headers -Wold-style-definition -Wpacked -Wredundant-decls -Wstrict-prototypes -Wswitch-default -Wundef -Wwrite-strings -Wformat -Wno-type-limits -Wstrict-aliasing=3 -Wshadow -DPACKAGE='"bpftool"' -D__EXPORTED_HEADERS__ -I/builddir/build/BUILD/kernel-frank-7.2.2/linux-7.2.2-1.el10.frank.x86_64/tools/perf/util/bpf_skel/.tmp/ -I/builddir/build/BUILD/kernel-frank-7.2.2/linux-7.2.2-1.el10.frank.x86_64/tools/perf/util/bpf_skel/.tmp/bootstrap/libbpf/include -I/builddir/build/BUILD/kernel-frank-7.2.2/linux-7.2.2-1.el10.frank.x86_64/kernel/bpf/ -I/builddir/build/BUILD/kernel-frank-7.2.2/linux-7.2.2-1.el10.frank.x86_64/tools/include -I/builddir/build/BUILD/kernel-frank-7.2.2/linux-7.2.2-1.el10.frank.x86_64/tools/include/uapi -Wl,-z,relro -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-hardened-ld-errors -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -specs=/usr/lib/rpm/redhat/redhat-package-notes -Wl,-E -Wl,-z,noexecstack -L/usr/lib64 /builddir/build/BUILD/kernel-frank-7.2.2/linux-7.2.2-1.el10.frank.x86_64/tools/perf/util/bpf_skel/.tmp/bootstrap/main.o /builddir/build/BUILD/kernel-frank-7.2.2/linux-7.2.2-1.el10.frank.x86_64/tools/perf/util/bpf_skel/.tmp/bootstrap/common.o /builddir/build/BUILD/kernel-frank-7.2.2/linux-7.2.2-1.el10.frank.x86_64/tools/perf/util/bpf_skel/.tmp/bootstrap/json_writer.o /builddir/build/BUILD/kernel-frank-7.2.2/linux-7.2.2-1.el10.frank.x86_64/tools/perf/util/bpf_skel/.tmp/bootstrap/gen.o /builddir/build/BUILD/kernel-frank-7.2.2/linux-7.2.2-1.el10.frank.x86_64/tools/perf/util/bpf_skel/.tmp/bootstrap/btf.o /builddir/build/BUILD/kernel-frank-7.2.2/linux-7.2.2-1.el10.frank.x86_64/tools/perf/util/bpf_skel/.tmp/bootstrap/sign.o /builddir/build/BUILD/kernel-frank-7.2.2/linux-7.2.2-1.el10.frank.x86_64/tools/perf/util/bpf_skel/.tmp/bootstrap/libbpf/libbpf.a -lelf -lcrypto -lz -lzstd -o /builddir/build/BUILD/kernel-frank-7.2.2/linux-7.2.2-1.el10.frank.x86_64/tools/perf/util/bpf_skel/.tmp/bootstrap/bpftool /usr/bin/ld: /builddir/build/BUILD/kernel-frank-7.2.2/linux-7.2.2-1.el10.frank.x86_64/tools/perf/util/bpf_skel/.tmp/bootstrap/main.o: relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a PIE object; recompile with -fPIE /usr/bin/ld: failed to set dynamic section sizes: bad value collect2: error: ld returned 1 exit status make[4]: *** [Makefile:288: /builddir/build/BUILD/kernel-frank-7.2.2/linux-7.2.2-1.el10.frank.x86_64/tools/perf/util/bpf_skel/.tmp/bootstrap/bpftool] Error 1 make[3]: *** [bpf_skel.mak:44: /builddir/build/BUILD/kernel-frank-7.2.2/linux-7.2.2-1.el10.frank.x86_64/tools/perf/util/bpf_skel/.tmp/bootstrap/bpftool] Error 2 make[2]: *** [Makefile.perf:626: bpf-skel-prepare] Error 2 The Makefile structure is different from that of bpftool. If there is any suggestion... Thx. |
|
|
The 7.2.2-el10 package can be built (at least in my Alma 10 x86_64 environment) by adding HOST_EXTRACFLAGS=-fPIE to the line: %{__make} -s EXTRA_CFLAGS="%{?build_cflags}" EXTRA_CXXFLAGS="%{?build_cxxflags}" LDFLAGS="%{?build_ldflags} -Wl,-E" -C tools/perf V=1 NO_PERF_READ_VDSO32=1 NO_PERF_READ_VDSOX32=1 WERROR=0 NO_LIBUNWIND=1 HAVE_CPLUS_DEMANGLE=1 NO_GTK2=1 NO_STRLCPY=1 NO_BIONIC=1 LIBBPF_DYNAMIC=1 LIBTRACEEVENT_DYNAMIC=1 %{?perf_build_extra_opts} prefix=%{_prefix} PYTHON=%{__python3} |
|
|
Your fix makes sense. What I gathered so far: the RHEL build environment dictates that all user-space host binaries (such as bpftool) must be compiled with -fPIE. The bpftool submake ignores the flag. This was fixed by directly injecting this flag into the bpftool_make command. We will re-work on both the el9 and the el10 kernel build. |
|
|
Addition of HOST_EXTRACFLAGS=-fPIE to the kernel spec file made it possible to build the following packages: el10: bpftool and perf el9: bpftool el8: bpftool [Note added: perf.el9 builds fine as such. perf.el8 fails to build] |
|
|
I an marking this as 'resolved' as the reported issue was fixed (thanks to @lux). |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2026-09-02 10:16 | lux | New Issue | |
| 2026-09-02 10:16 | lux | Status | new => assigned |
| 2026-09-02 10:16 | lux | Assigned To | => pperry |
| 2026-09-02 13:06 | toracat | Assigned To | pperry => toracat |
| 2026-09-02 13:06 | toracat | Status | assigned => acknowledged |
| 2026-09-02 13:10 | toracat | Note Added: 0010951 | |
| 2026-09-02 16:49 | lux | Note Added: 0010952 | |
| 2026-09-02 17:52 | toracat | Note Added: 0010953 | |
| 2026-09-02 17:53 | toracat | Project | channel: elrepo/el9 => channel: kernel/el9 |
| 2026-09-02 17:53 | toracat | Category | --elrepo--OTHER-- => General |
| 2026-09-02 17:54 | toracat | Category | General => kernel-ml |
| 2026-09-03 01:52 | lux | Note Added: 0010954 | |
| 2026-09-03 03:08 | lux | Note Added: 0010955 | |
| 2026-09-03 12:20 | toracat | Status | acknowledged => assigned |
| 2026-09-03 12:20 | toracat | Note Added: 0010956 | |
| 2026-09-07 13:11 | toracat | Note Added: 0010958 | |
| 2026-09-09 14:56 | toracat | Note Edited: 0010958 | |
| 2026-10-23 13:32 | toracat | Status | assigned => resolved |
| 2026-10-23 13:32 | toracat | Resolution | open => fixed |
| 2026-10-23 13:32 | toracat | Note Added: 0010998 |