Stuck recompiling kernel

Issues related to applications and software problems and general support
Post Reply
krono86
Posts: 3
Joined: 2021/06/22 14:53:03

Stuck recompiling kernel

Post by krono86 » 2021/10/06 11:10:17

Hello guys!
I'm trying to recompile my kernel on Centos Linux 8 with some mods to the usb quirks.
I'm using the procedure reported at: https://wiki.centos.org/HowTos/Custom_Kernel.
When I run the compiling task the command line is stuck on "ld -r -o pmu-events/pmu-events-in.o pmu-events/pmu-events.o".
How can go ahead?
Find attached some logs:

Code: Select all

$ tail build-err.log 
Warning: Kernel ABI header at 'tools/perf/arch/x86/entry/syscalls/syscall_64.tbl' differs from latest version at 'arch/x86/entry/syscalls/syscall_64.tbl'
Warning: Kernel ABI header at 'tools/perf/trace/beauty/include/linux/socket.h' differs from latest version at 'include/linux/socket.h'
Warning: Kernel ABI header at 'tools/perf/util/hashmap.h' differs from latest version at 'tools/lib/bpf/hashmap.h'
Warning: Kernel ABI header at 'tools/perf/util/hashmap.c' differs from latest version at 'tools/lib/bpf/hashmap.c'
event-parse.c: In function 'print_event_info.constprop':
event-parse.c:5684:6: warning: 'len_arg' may be used uninitialized in this function [-Wmaybe-uninitialized]
  int len_arg;
      ^~~~~~~
  PERF_VERSION = 4.18.0-305.19.1.el8.custom_for_Rane_SL2.x86_64
jevents: Processing mapfile pmu-events/arch/x86/mapfile.csv

Code: Select all

$ tail build-out.log 
symbol_type=`nm -u -D  plugin_jbd2.so plugin_hrtimer.so plugin_kmem.so plugin_kvm.so plugin_mac80211.so plugin_sched_switch.so plugin_function.so plugin_futex.so plugin_xen.so plugin_scsi.so plugin_cfg80211.so plugin_tlb.so | awk 'NF>1 {print $1}' | xargs echo "U w W" | tr 'w ' 'W\n' | sort -u | xargs echo`; if [ "$symbol_type" = "U W" ];then (echo '{'; nm -u -D  plugin_jbd2.so plugin_hrtimer.so plugin_kmem.so plugin_kvm.so plugin_mac80211.so plugin_sched_switch.so plugin_function.so plugin_futex.so plugin_xen.so plugin_scsi.so plugin_cfg80211.so plugin_tlb.so | awk 'NF>1 {sub("@.*", "", $2); print "\t"$2";"}' | sort -u; echo '};'; ) >  libtraceevent-dynamic-list; else (echo Either missing one of [ plugin_jbd2.so plugin_hrtimer.so plugin_kmem.so plugin_kvm.so plugin_mac80211.so plugin_sched_switch.so plugin_function.so plugin_futex.so plugin_xen.so plugin_scsi.so plugin_cfg80211.so plugin_tlb.so] or bad version of nm) 1>&2; fi
   ld   -r -o jvmti/jvmti-in.o  jvmti/libjvmti.o jvmti/jvmti_agent.o jvmti/libstring.o jvmti/libctype.o
make -C /home/krono/rpmbuild/BUILD/kernel-4.18.0-305.19.1.el8_4/linux-4.18.0-305.19.1.el8.custom_for_Rane_SL2.x86_64/tools/lib/traceevent/plugins plugin_dir=/usr/lib64/traceevent/plugins 'EXTRA_CFLAGS=-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' 'LDFLAGS=-Wl,-z,relro  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,-z,noexecstack  -Wl,--enable-new-dtags -Wl,-z,relro -Wl,-z,now -Wl,-z,relro -Wl,-z,now -fstack-protector-strong -L/usr/local/lib -L/usr/lib64/perl5/CORE -L/usr/lib64 -Xlinker -export-dynamic  ' O= libtraceevent-dynamic-list
gcc -Wl,-z,relro  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,-z,noexecstack  -Wl,--enable-new-dtags -Wl,-z,relro -Wl,-z,now -Wl,-z,relro -Wl,-z,now -fstack-protector-strong -L/usr/local/lib -L/usr/lib64/perl5/CORE -L/usr/lib64 -Xlinker -export-dynamic   -shared -Wl,-soname -Wl,libperf-jvmti.so -o libperf-jvmti.so jvmti/jvmti-in.o
LDSHARED="gcc -pthread -shared" \
        CFLAGS='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -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 -Wswitch-enum -Wundef -Wwrite-strings -Wformat -Wstrict-aliasing=3 -Wshadow -DHAVE_SYSCALL_TABLE_SUPPORT -DHAVE_ARCH_X86_64_SUPPORT -Iarch/x86/include/generated -DHAVE_PERF_REGS_SUPPORT -DHAVE_ARCH_REGS_QUERY_REGISTER_OFFSET -O6 -fno-omit-frame-pointer -g -funwind-tables -Wall -Wextra -std=gnu99 -fstack-protector-all -D_FORTIFY_SOURCE=2 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -I/home/krono/rpmbuild/BUILD/kernel-4.18.0-305.19.1.el8_4/linux-4.18.0-305.19.1.el8.custom_for_Rane_SL2.x86_64/tools/lib/perf/include -I/home/krono/rpmbuild/BUILD/kernel-4.18.0-305.19.1.el8_4/linux-4.18.0-305.19.1.el8.custom_for_Rane_SL2.x86_64/tools/perf/util/include -I/home/krono/rpmbuild/BUILD/kernel-4.18.0-305.19.1.el8_4/linux-4.18.0-305.19.1.el8.custom_for_Rane_SL2.x86_64/tools/perf/arch/x86/include -I/home/krono/rpmbuild/BUILD/kernel-4.18.0-305.19.1.el8_4/linux-4.18.0-305.19.1.el8.custom_for_Rane_SL2.x86_64/tools/include/ -I/home/krono/rpmbuild/BUILD/kernel-4.18.0-305.19.1.el8_4/linux-4.18.0-305.19.1.el8.custom_for_Rane_SL2.x86_64/tools/arch/x86/include/uapi -I/home/krono/rpmbuild/BUILD/kernel-4.18.0-305.19.1.el8_4/linux-4.18.0-305.19.1.el8.custom_for_Rane_SL2.x86_64/tools/include/uapi -I/home/krono/rpmbuild/BUILD/kernel-4.18.0-305.19.1.el8_4/linux-4.18.0-305.19.1.el8.custom_for_Rane_SL2.x86_64/tools/arch/x86/include/ -I/home/krono/rpmbuild/BUILD/kernel-4.18.0-305.19.1.el8_4/linux-4.18.0-305.19.1.el8.custom_for_Rane_SL2.x86_64/tools/arch/x86/ -I/home/krono/rpmbuild/BUILD/kernel-4.18.0-305.19.1.el8_4/linux-4.18.0-305.19.1.el8.custom_for_Rane_SL2.x86_64/tools/perf/util -I/home/krono/rpmbuild/BUILD/kernel-4.18.0-305.19.1.el8_4/linux-4.18.0-305.19.1.el8.custom_for_Rane_SL2.x86_64/tools/perf -I/home/krono/rpmbuild/BUILD/kernel-4.18.0-305.19.1.el8_4/linux-4.18.0-305.19.1.el8.custom_for_Rane_SL2.x86_64/tools/lib/ -DHAVE_SYNC_COMPARE_AND_SWAP_SUPPORT -DHAVE_PTHREAD_ATTR_SETAFFINITY_NP -DHAVE_PTHREAD_BARRIER -DHAVE_EVENTFD_SUPPORT -DHAVE_GET_CURRENT_DIR_NAME -DHAVE_FILE_HANDLE -DHAVE_DWARF_GETLOCATIONS_SUPPORT -DHAVE_GLIBC_SUPPORT -DHAVE_AIO_SUPPORT -DHAVE_SCHED_GETCPU_SUPPORT -DHAVE_SETNS_SUPPORT -DHAVE_LIBELF_SUPPORT -DHAVE_ELF_GETPHDRNUM_SUPPORT -DHAVE_GELF_GETNOTE_SUPPORT -DHAVE_ELF_GETSHDRSTRNDX_SUPPORT -DHAVE_DEBUGINFOD_SUPPORT -DHAVE_DWARF_SUPPORT  -DHAVE_LIBBPF_SUPPORT -DHAVE_BPF_PROLOGUE -DHAVE_SDT_EVENT -DHAVE_JITDUMP -DHAVE_DWARF_UNWIND_SUPPORT -DHAVE_LIBCRYPTO_SUPPORT -DHAVE_SLANG_SUPPORT -DHAVE_LIBPERL_SUPPORT -DHAVE_TIMERFD_SUPPORT -DHAVE_LIBPYTHON_SUPPORT -DHAVE_LIBBFD_BUILDID_SUPPORT -DHAVE_CPLUS_DEMANGLE_SUPPORT -DHAVE_LIBBFD_SUPPORT -DHAVE_ZLIB_SUPPORT -DHAVE_LZMA_SUPPORT -DHAVE_ZSTD_SUPPORT  -DHAVE_LIBCAP_SUPPORT -DHAVE_BACKTRACE_SUPPORT -DHAVE_LIBNUMA_SUPPORT -DHAVE_KVM_STAT_SUPPORT -DDISASM_FOUR_ARGS_SIGNATURE -DHAVE_LIBBABELTRACE_SUPPORT  -DHAVE_AUXTRACE_SUPPORT -DHAVE_JVMTI_CMLR' LDFLAGS='-Wl,-z,relro  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,-z,noexecstack  -Wl,--enable-new-dtags -Wl,-z,relro -Wl,-z,now -Wl,-z,relro -Wl,-z,now -fstack-protector-strong -L/usr/local/lib -L/usr/lib64/perl5/CORE -L/usr/lib64 -Xlinker -export-dynamic   -Xlinker --dynamic-list=/home/krono/rpmbuild/BUILD/kernel-4.18.0-305.19.1.el8_4/linux-4.18.0-305.19.1.el8.custom_for_Rane_SL2.x86_64/tools/lib/traceevent/plugins/libtraceevent-dynamic-list' \
  '/usr/libexec/platform-python' util/setup.py \
  --quiet build_ext; \
cp python_ext_build/lib/perf*.so python/
   ld   -r -o pmu-events/pmu-events-in.o  pmu-events/pmu-events.o
Thanks a lot for help!

Ivan

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Stuck recompiling kernel

Post by TrevorH » 2021/10/06 15:55:10

The usual reason a kernel build gets stuck is lack of entropy. What does `/proc/sys/kernel/random/entropy_avail` show when it's stuck?
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

krono86
Posts: 3
Joined: 2021/06/22 14:53:03

Re: Stuck recompiling kernel

Post by krono86 » 2021/10/06 17:35:34

Thanks for answer!

Code: Select all

$ cat /proc/sys/kernel/random/entropy_avail 
3854
Ivan

Post Reply