Issues compiling scx schedulers from source

Hello,

Requirements:

I have Searched the forum for my issue and found nothing related or helpful
I have checked the Resources category (Resources Index)
I have reviewed the Wiki for relevant information
I have read the the Release Notes and Errata

OpenMandriva Lx version:

ROME plasma6.wayland ryzen

Desktop environment (KDE, LXQT…):

KDE

Description of the issue (screenshots if relevant):
I’m trying to compile scx schedulers but am running into errors when running make all. I’ve tried to install the recommended dependencies but am not sure if I’ve missed something, have installed conflicting packages or need to adjust something else.

Apologies if I’ve missed some obvious information, happy to amend where needed.

Relevant information (hardware involved, software version, logs or output…):

Packages installed in attempt to compile scx:

cargo cargo-c automake cmake cmake-extras cmake-qtgui extra-cmake-modules gccmakedep icmake imake make tmake clang-tools clang-analyzer lib64clang-devel libclang libclang-devel lib64bpf-devel bpftool lib64bpf-static-devel lib64elfhacks-devel lib64elfhacks0 lib64elfio-static-devel lib64elfutils-static-devel libelf1 libelfutils-devel libelfutils-static-devel lib64ZXing-devel lib64z-ng-devel lib64z-ng-static-devel lib64z-static-devel lib64z3-devel libz-devel libz-ng-devel libz-ng-static-devel libz-ng1 libz-static-devel lib64zstd-static-devel libzstd-devel libzstd-static-devel rust-pkg-config-devel rust-pkg-config+default-devel lib64pkgconf-devel lib64protobuf-c-devel lib64protobuf-devel lib64protobuf-static-devel protobuf protobuf-c protobuf-codegen protobuf-compiler rust-protobuf-codegen-devel rust-protobuf-devel lib64seccomp-devel pahole lib64LLVMBPFAsmParser-static-devel lib64LLVMBPFCodeGen-static-devel lib64LLVMBPFDesc-static-devel lib64LLVMBPFDisassembler-static-devel lib64LLVMBPFInfo-static-devel libLLVMBPFAsmParser-static-devel libLLVMBPFCodeGen-static-devel libLLVMBPFDesc-static-devel libLLVMBPFDisassembler-static-devel libLLVMBPFInfo-static-devel rust-cmake-devel lib64clangdMain-static-devel lib64clangdRemoteIndex-static-devel lib64clangdSupport-static-devel libclangAPINotes-static-devel libclangARCMigrate-static-devel libclangAST-static-devel libclangASTMatchers-static-devel libclangAnalysis-static-devel libclangAnalysisFlowSensitive-static-devel libclangAnalysisFlowSensitiveModels-static-devel libclangBasic-static-devel libclangCodeGen-static-devel libclangCrossTU-static-devel libclangDependencyScanning-static-devel libclangDirectoryWatcher-static-devel libclangDriver-static-devel libclangDynamicASTMatchers-static-devel libclangEdit-static-devel libclangExtractAPI-static-devel libclangFormat-static-devel libclangFrontend-static-devel libclangFrontendTool-static-devel libclangHandleCXX-static-devel libclangHandleLLVM-static-devel libclangIndex-static-devel libclangIndexSerialization-static-devel libclangInstallAPI-static-devel libclangInterpreter-static-devel libclangLex-static-devel libclangParse-static-devel libclangRewrite-static-devel libclangRewriteFrontend-static-devel libclangSema-static-devel libclangSerialization-static-devel libclangStaticAnalyzerCheckers-static-devel libclangStaticAnalyzerCore-static-devel libclangStaticAnalyzerFrontend-static-devel libclangSupport-static-devel libclangTooling-static-devel libclangToolingASTDiff-static-devel libclangToolingCore-static-devel libclangToolingInclusions-static-devel libclangToolingInclusionsStdlib-static-devel libclangToolingRefactoring-static-devel libclangToolingSyntax-static-devel libclangTransformer-static-devel python-libpfm lib64clangAPINotes-static-devel lib64clangARCMigrate-static-devel lib64clangAST-static-devel lib64clangASTMatchers-static-devel lib64clangAnalysis-static-devel lib64clangAnalysisFlowSensitive-static-devel lib64clangAnalysisFlowSensitiveModels-static-devel lib64clangApplyReplacements-static-devel lib64clangBasic-static-devel lib64clangChangeNamespace-static-devel lib64clangCodeGen-static-devel lib64clangCrossTU-static-devel lib64clangDaemon-static-devel lib64clangDaemonTweaks-static-devel lib64clangDependencyScanning-static-devel lib64clangDirectoryWatcher-static-devel lib64clangDoc-static-devel lib64clangDriver-static-devel lib64clangDynamicASTMatchers-static-devel lib64clangEdit-static-devel lib64clangExtractAPI-static-devel lib64clangFormat-static-devel lib64clangFrontend-static-devel lib64clangFrontendTool-static-devel lib64clangHandleCXX-static-devel lib64clangHandleLLVM-static-devel lib64clangIncludeCleaner-static-devel lib64clangIncludeFixer-static-devel lib64clangIncludeFixerPlugin-static-devel lib64clangIndex-static-devel lib64clangIndexSerialization-static-devel lib64clangInstallAPI-static-devel lib64clangInterpreter-static-devel lib64clangLex-static-devel lib64clangMove-static-devel lib64clangParse-static-devel lib64clangPseudo-static-devel lib64clangPseudoCLI-static-devel lib64clangPseudoCXX-static-devel lib64clangPseudoGrammar-static-devel lib64clangQuery-static-devel lib64clangReorderFields-static-devel lib64clangRewrite-static-devel lib64clangRewriteFrontend-static-devel lib64clangSema-static-devel lib64clangSerialization-static-devel lib64clangStaticAnalyzerCheckers-static-devel lib64clangStaticAnalyzerCore-static-devel lib64clangStaticAnalyzerFrontend-static-devel lib64clangSupport-static-devel lib64clangTidy-static-devel lib64clangTidyAbseilModule-static-devel lib64clangTidyAlteraModule-static-devel lib64clangTidyAndroidModule-static-devel lib64clangTidyBoostModule-static-devel lib64clangTidyBugproneModule-static-devel lib64clangTidyCERTModule-static-devel lib64clangTidyConcurrencyModule-static-devel lib64clangTidyCppCoreGuidelinesModule-static-devel lib64clangTidyDarwinModule-static-devel lib64clangTidyFuchsiaModule-static-devel lib64clangTidyGoogleModule-static-devel lib64clangTidyHICPPModule-static-devel lib64clangTidyLLVMLibcModule-static-devel lib64clangTidyLLVMModule-static-devel lib64clangTidyLinuxKernelModule-static-devel lib64clangTidyMPIModule-static-devel lib64clangTidyMain-static-devel lib64clangTidyMiscModule-static-devel lib64clangTidyModernizeModule-static-devel lib64clangTidyObjCModule-static-devel lib64clangTidyOpenMPModule-static-devel lib64clangTidyPerformanceModule-static-devel lib64clangTidyPlugin-static-devel lib64clangTidyPortabilityModule-static-devel lib64clangTidyReadabilityModule-static-devel lib64clangTidyUtils-static-devel lib64clangTidyZirconModule-static-devel lib64clangTooling-static-devel lib64clangToolingASTDiff-static-devel lib64clangToolingCore-static-devel lib64clangToolingInclusions-static-devel lib64clangToolingInclusionsStdlib-static-devel lib64clangToolingRefactoring-static-devel lib64clangToolingSyntax-static-devel lib64clangTransformer-static-devel python-clang rust-clang-sys-devel rust-clang-sys+clang_8_0-devel rust-clang-sys+default-devel rust-clang-sys+gte_clang_8_0-devel rust-clang-sys+libloading-devel rust-clang-sys+runtime-devel rust-clang-sys+static-devel sanitizers-cmake lib64llvm-devel lib64llvm-static-devel lib64llvmlibc-static-devel elfio elftoaout patchelf

Output when running make all:

Compiling BPF: /home/shannon/Downloads/scx-main/lib/sdt_alloc.bpf.c → /home/shannon/Downloads/scx-main/build/lib/sdt_alloc.bpf.o
clang -g -O2 -Wall -Wno-compare-distinct-pointer-types -D__TARGET_ARCH_x86 -mcpu=v3 -mlittle-endian -target bpf -I/home/shannon/Downloads/scx-main/scheds/include -I/home/shannon/Downloads/scx-main/scheds/include/bpf-compat -I/home/shannon/Downloads/scx-main/scheds/include/lib -I/home/shannon/Downloads/scx-main/scheds/vmlinux -I/home/shannon/Downloads/scx-main/scheds/vmlinux/arch/x86 -c /home/shannon/Downloads/scx-main/lib/sdt_alloc.bpf.c -o /home/shannon/Downloads/scx-main/build/lib/sdt_alloc.bpf.o
In file included from /home/shannon/Downloads/scx-main/lib/sdt_alloc.bpf.c:9:
In file included from /home/shannon/Downloads/scx-main/scheds/include/scx/common.bpf.h:21:
/home/shannon/Downloads/scx-main/scheds/vmlinux/vmlinux.h:1:1: error: unknown type name ‘arch’
1 | arch/x86/vmlinux.h
| ^
/home/shannon/Downloads/scx-main/scheds/vmlinux/vmlinux.h:1:5: error: expected identifier or ‘(’
1 | arch/x86/vmlinux.h
| ^
In file included from /home/shannon/Downloads/scx-main/lib/sdt_alloc.bpf.c:9:
In file included from /home/shannon/Downloads/scx-main/scheds/include/scx/common.bpf.h:24:
In file included from /usr/include/bpf/bpf_helpers.h:11:
/usr/include/bpf/bpf_helper_defs.h:86:90: error: unknown type name ‘__u64’
86 | static long (* const bpf_map_update_elem)(void *map, const void *key, const void *value, __u64 flags) = (void ) 2;
| ^
/usr/include/bpf/bpf_helper_defs.h:110:49: error: unknown type name ‘__u32’
110 | static long (
const bpf_probe_read)(void *dst, __u32 size, const void *unsafe_ptr) = (void) 4;
| ^
/usr/include/bpf/bpf_helper_defs.h:122:14: error: function cannot return function type ‘int (void)’
122 | static __u64 (
const bpf_ktime_get_ns)(void) = (void) 5;
| ^
/usr/include/bpf/bpf_helper_defs.h:122:8: error: illegal initializer (only variables can be initialized)
122 | static __u64 (
const bpf_ktime_get_ns)(void) = (void) 5;
| ^
/usr/include/bpf/bpf_helper_defs.h:185:57: error: unknown type name ‘__u32’
185 | static long (
const bpf_trace_printk)(const char *fmt, __u32 fmt_size, …) = (void) 6;
| ^
/usr/include/bpf/bpf_helper_defs.h:201:14: error: function cannot return function type ‘int (void)’
201 | static __u32 (
const bpf_get_prandom_u32)(void) = (void) 7;
| ^
/usr/include/bpf/bpf_helper_defs.h:201:8: error: illegal initializer (only variables can be initialized)
201 | static __u32 (
const bpf_get_prandom_u32)(void) = (void) 7;
| ^
/usr/include/bpf/bpf_helper_defs.h:214:29: error: function cannot return function type ‘int (void)’
214 | static __bpf_fastcall __u32 (
const bpf_get_smp_processor_id)(void) = (void) 8;
| ^
/usr/include/bpf/bpf_helper_defs.h:214:23: error: illegal initializer (only variables can be initialized)
214 | static __bpf_fastcall __u32 (
const bpf_get_smp_processor_id)(void) = (void) 8;
| ^
/usr/include/bpf/bpf_helper_defs.h:235:66: error: unknown type name ‘__u32’
235 | static long (
const bpf_skb_store_bytes)(struct __sk_buff *skb, __u32 offset, const void *from, __u32 len, __u64 flags) = (void) 9;
| ^
/usr/include/bpf/bpf_helper_defs.h:235:98: error: unknown type name ‘__u32’
235 | static long (
const bpf_skb_store_bytes)(struct __sk_buff *skb, __u32 offset, const void *from, __u32 len, __u64 flags) = (void) 9;
| ^
/usr/include/bpf/bpf_helper_defs.h:235:109: error: unknown type name ‘__u64’
235 | static long (
const bpf_skb_store_bytes)(struct __sk_buff *skb, __u32 offset, const void *from, __u32 len, __u64 flags) = (void) 9;
| ^
/usr/include/bpf/bpf_helper_defs.h:264:66: error: unknown type name ‘__u32’
264 | static long (
const bpf_l3_csum_replace)(struct __sk_buff *skb, __u32 offset, __u64 from, __u64 to, __u64 size) = (void) 10;
| ^
/usr/include/bpf/bpf_helper_defs.h:264:80: error: unknown type name ‘__u64’
264 | static long (
const bpf_l3_csum_replace)(struct __sk_buff *skb, __u32 offset, __u64 from, __u64 to, __u64 size) = (void) 10;
| ^
/usr/include/bpf/bpf_helper_defs.h:264:92: error: unknown type name ‘__u64’
264 | static long (
const bpf_l3_csum_replace)(struct __sk_buff *skb, __u32 offset, __u64 from, __u64 to, __u64 size) = (void) 10;
| ^
/usr/include/bpf/bpf_helper_defs.h:264:102: error: unknown type name ‘__u64’
264 | static long (
const bpf_l3_csum_replace)(struct __sk_buff *skb, __u32 offset, __u64 from, __u64 to, __u64 size) = (void) 10;
| ^
/usr/include/bpf/bpf_helper_defs.h:300:66: error: unknown type name ‘__u32’
300 | static long (
const bpf_l4_csum_replace)(struct __sk_buff *skb, __u32 offset, __u64 from, __u64 to, __u64 flags) = (void *) 11;
| ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[2]: *** [Makefile:28: /home/shannon/Downloads/scx-main/build/lib/sdt_alloc.bpf.o] Error 1
make[1]: *** [/home/shannon/Downloads/scx-main/Makefile:98: lib] Error 2
make: *** [Makefile:24: sub-make] Error 2

You will probably need to ask about that here:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.