[BUG] bpftool failed on ubuntu 23.10 and llvm 19.0.0git
NobinPegasus opened this issue · 3 comments
NobinPegasus commented
Describe the bug
When I try to build bpftime using:
pegasus@pegasus:~/Documents/bpftime$ make release JOBS=$(nproc) # Build and install the runtime
On my local machine I find the following erros.
<!--A clear and concise description of what the bug is.-->
/home/pegasus/Documents/bpftime/vm/llvm-jit/src/llvm/llvm_jit_context.cpp:246:26: required from here
/home/pegasus/Documents/llvm-project/llvm/include/llvm/ADT/DenseMap.h:577:5: error: no matching function for call to ‘llvm::orc::ExecutorSymbolDef::ExecutorSymbolDef(llvm::JITEvaluatedSymbol&)’
577 | ::new (&TheBucket->getSecond()) ValueT(std::forward<ValueArgs>(Values)...);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/pegasus/Documents/bpftime/vm/llvm-jit/src/llvm/llvm_jit_context.cpp:156:58: error: ‘CGFT_ObjectFile’ was not declared in this scope
156 | pass, *BOS, nullptr, CGFT_ObjectFile)) {
My PC configs:
pegasus@pegasus:~$ cat /etc/os-release
PRETTY_NAME="Ubuntu 23.10"
NAME="Ubuntu"
VERSION_ID="23.10"
VERSION="23.10 (Mantic Minotaur)"
VERSION_CODENAME=mantic
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=mantic
LOGO=ubuntu-logo
pegasus@pegasus:~$ uname -a
Linux pegasus 6.4.0-060400-generic #202306271339 SMP PREEMPT_DYNAMIC Tue Jun 27 14:26:34 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
I've built LLVM clang from latest repo.
pegasus@pegasus:~$ clang --version
clang version 19.0.0git (https://github.com/llvm/llvm-project.git 815644b4dd882ade2e5649d4f97c3dd6f7aea200)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/pegasus/Documents/llvm-project/build/bin
To reproduce the error, you just need my config and type make release JOBS=$(nproc) # Build and install the runtime
The log:
pegasus@pegasus:~/Documents/bpftime$ make release JOBS=$(nproc) # Build and install the runtime
cmake -Bbuild -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo \
-DSPDLOG_ACTIVE_LEVEL=SPDLOG_LEVEL_INFO -DBPFTIME_LLVM_JIT=1
cmake: /usr/local/lib/libcurl.so.4: no version information available (required by cmake)
-- Started CMake for bpftime v0.1.0...
-- copying compiler.h;err.h;filter.h;kernel.h;list.h;overflow.h;ring_buffer.h;types.h from /home/pegasus/Documents/bpftime/third_party/libbpf//include/linux to /home/pegasus/Documents/bpftime/build/libbpf//linux
-- copying linux/bpf.h;linux/bpf_common.h;linux/btf.h;linux/fcntl.h;linux/if_link.h;linux/if_xdp.h;linux/netdev.h;linux/netlink.h;linux/openat2.h;linux/perf_event.h;linux/pkt_cls.h;linux/pkt_sched.h from /home/pegasus/Documents/bpftime/third_party/libbpf//include/uapi/ to /home/pegasus/Documents/bpftime/build/libbpf//uapi
-- copying bpf.h;bpf_common.h;btf.h;fcntl.h;if_link.h;if_xdp.h;netdev.h;netlink.h;openat2.h;perf_event.h;pkt_cls.h;pkt_sched.h from /home/pegasus/Documents/bpftime/third_party/libbpf//include/uapi/linux to /home/pegasus/Documents/bpftime/build/libbpf//linux
-- All headers to copy: /home/pegasus/Documents/bpftime/build/libbpf//linux/compiler.h;/home/pegasus/Documents/bpftime/build/libbpf//linux/err.h;/home/pegasus/Documents/bpftime/build/libbpf//linux/filter.h;/home/pegasus/Documents/bpftime/build/libbpf//linux/kernel.h;/home/pegasus/Documents/bpftime/build/libbpf//linux/list.h;/home/pegasus/Documents/bpftime/build/libbpf//linux/overflow.h;/home/pegasus/Documents/bpftime/build/libbpf//linux/ring_buffer.h;/home/pegasus/Documents/bpftime/build/libbpf//linux/types.h;/home/pegasus/Documents/bpftime/build/libbpf//uapi/linux/bpf.h;/home/pegasus/Documents/bpftime/build/libbpf//uapi/linux/bpf_common.h;/home/pegasus/Documents/bpftime/build/libbpf//uapi/linux/btf.h;/home/pegasus/Documents/bpftime/build/libbpf//uapi/linux/fcntl.h;/home/pegasus/Documents/bpftime/build/libbpf//uapi/linux/if_link.h;/home/pegasus/Documents/bpftime/build/libbpf//uapi/linux/if_xdp.h;/home/pegasus/Documents/bpftime/build/libbpf//uapi/linux/netdev.h;/home/pegasus/Documents/bpftime/build/libbpf//uapi/linux/netlink.h;/home/pegasus/Documents/bpftime/build/libbpf//uapi/linux/openat2.h;/home/pegasus/Documents/bpftime/build/libbpf//uapi/linux/perf_event.h;/home/pegasus/Documents/bpftime/build/libbpf//uapi/linux/pkt_cls.h;/home/pegasus/Documents/bpftime/build/libbpf//uapi/linux/pkt_sched.h;/home/pegasus/Documents/bpftime/build/libbpf//linux/bpf.h;/home/pegasus/Documents/bpftime/build/libbpf//linux/bpf_common.h;/home/pegasus/Documents/bpftime/build/libbpf//linux/btf.h;/home/pegasus/Documents/bpftime/build/libbpf//linux/fcntl.h;/home/pegasus/Documents/bpftime/build/libbpf//linux/if_link.h;/home/pegasus/Documents/bpftime/build/libbpf//linux/if_xdp.h;/home/pegasus/Documents/bpftime/build/libbpf//linux/netdev.h;/home/pegasus/Documents/bpftime/build/libbpf//linux/netlink.h;/home/pegasus/Documents/bpftime/build/libbpf//linux/openat2.h;/home/pegasus/Documents/bpftime/build/libbpf//linux/perf_event.h;/home/pegasus/Documents/bpftime/build/libbpf//linux/pkt_cls.h;/home/pegasus/Documents/bpftime/build/libbpf//linux/pkt_sched.h
-- System Name: Linux
-- System Version: 6.4.0-060400-generic
-- System Processor: x86_64
-- Using frida: arch=linux-x86_64, version=16.1.2
-- Frida Core Devkit already downloaded
-- Frida GUM Devkit already downloaded
-- Downloading FridaCore from /home/pegasus/Documents/bpftime/third_party/frida/frida-core-devkit-16.1.2-linux-x86_64.tar.xz
-- Downloading FridaGum from /home/pegasus/Documents/bpftime/third_party/frida/frida-gum-devkit-16.1.2-linux-x86_64.tar.xz
-- Skipping ebpf verifier
-- Build spdlog: 1.12.0
-- Build type: RelWithDebInfo
-- Started CMake for vm-bpf v0.1.0...
-- Using llvm-jit
-- LLVM_LIBS=LLVMCore;LLVMOrcJIT;LLVMSupport;LLVMX86CodeGen;LLVMX86Desc;LLVMX86Info
-- Added all header and implementation files.
-- Finished setting up include directories.
-- Started CMake for runtime v0.1.0...
-- Building for architecture:
INFO Headers: include/
INFO Found the following sources: src/attach/bpf_attach_ctx.cpp;src/handler/handler_manager.cpp;src/handler/map_handler.cpp;src/handler/perf_event_handler.cpp;src/handler/prog_handler.cpp;src/handler/epoll_handler.cpp;src/bpftime_shm.cpp;src/bpftime_shm_internal.cpp;src/bpftime_shm_json.cpp;src/bpftime_prog.cpp;src/ufunc.cpp;src/bpf_helper.cpp;src/bpf_map/userspace/array_map.cpp;src/bpf_map/userspace/hash_map.cpp;src/bpf_map/userspace/ringbuf_map.cpp;src/bpf_map/userspace/perf_event_array_map.cpp;src/bpf_map/userspace/per_cpu_array_map.cpp;src/bpf_map/userspace/per_cpu_hash_map.cpp;src/bpf_map/userspace/prog_array.cpp;extension/extension_helper.cpp;src/bpf_map/shared/array_map_kernel_user.cpp;src/bpf_map/shared/hash_map_kernel_user.cpp;src/bpf_map/shared/percpu_array_map_kernel_user.cpp;src/bpf_map/shared/perf_event_array_kernel_user.cpp
-- Added all header and implementation files.
-- Using llvm-jit
-- Configuring done (0.2s)
-- Generating done (0.1s)
-- Build files have been written to: /home/pegasus/Documents/bpftime/build
cmake --build build --config RelWithDebInfo --target install -j16
cmake: /usr/local/lib/libcurl.so.4: no version information available (required by cmake)
gmake[1]: Entering directory '/home/pegasus/Documents/bpftime/build'
/usr/bin/cmake: /usr/local/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake)
/usr/bin/cmake: /usr/local/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake)
gmake[2]: Entering directory '/home/pegasus/Documents/bpftime/build'
gmake[3]: Entering directory '/home/pegasus/Documents/bpftime/build'
gmake[3]: Entering directory '/home/pegasus/Documents/bpftime/build'
gmake[3]: Entering directory '/home/pegasus/Documents/bpftime/build'
gmake[3]: Entering directory '/home/pegasus/Documents/bpftime/build'
gmake[3]: Entering directory '/home/pegasus/Documents/bpftime/build'
gmake[3]: Entering directory '/home/pegasus/Documents/bpftime/build'
gmake[3]: Entering directory '/home/pegasus/Documents/bpftime/build'
gmake[3]: Entering directory '/home/pegasus/Documents/bpftime/build'
/usr/bin/cmake: /usr/local/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake)
/usr/bin/cmake: /usr/local/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake)
/usr/bin/cmake: /usr/local/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake)
/usr/bin/cmake: /usr/local/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake)
/usr/bin/cmake: /usr/local/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake)
/usr/bin/cmake: /usr/local/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake)
/usr/bin/cmake: /usr/local/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake)
/usr/bin/cmake: /usr/local/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake)
gmake[3]: Leaving directory '/home/pegasus/Documents/bpftime/build'
gmake[3]: Leaving directory '/home/pegasus/Documents/bpftime/build'
gmake[3]: Leaving directory '/home/pegasus/Documents/bpftime/build'
gmake[3]: Leaving directory '/home/pegasus/Documents/bpftime/build'
gmake[3]: Leaving directory '/home/pegasus/Documents/bpftime/build'
/usr/bin/cmake: /usr/local/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake)
/usr/bin/cmake: /usr/local/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake)
/usr/bin/cmake: /usr/local/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake)
/usr/bin/cmake: /usr/local/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake)
/usr/bin/cmake: /usr/local/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake)
[ 6%] Built target libbpf
[ 6%] Built target FridaCore
gmake[3]: Leaving directory '/home/pegasus/Documents/bpftime/build'
[ 8%] Built target bpftime_syscall_trace_syscall_id_table
[ 10%] Built target bpftool
[ 13%] Built target FridaGum
gmake[3]: Entering directory '/home/pegasus/Documents/bpftime/build'
gmake[3]: Leaving directory '/home/pegasus/Documents/bpftime/build'
/usr/bin/cmake: /usr/local/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake)
/usr/bin/cmake: /usr/local/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake)
[ 14%] Built target embedfile
/usr/bin/cmake: /usr/local/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake)
gmake[3]: Leaving directory '/home/pegasus/Documents/bpftime/build'
gmake[3]: Entering directory '/home/pegasus/Documents/bpftime/build'
[ 17%] Built target spdlog
/usr/bin/cmake: /usr/local/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake)
gmake[3]: Entering directory '/home/pegasus/Documents/bpftime/build'
gmake[3]: Entering directory '/home/pegasus/Documents/bpftime/build'
gmake[3]: Entering directory '/home/pegasus/Documents/bpftime/build'
gmake[3]: Entering directory '/home/pegasus/Documents/bpftime/build'
gmake[3]: Entering directory '/home/pegasus/Documents/bpftime/build'
/usr/bin/cmake: /usr/local/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake)
[ 18%] Copying headers
/usr/bin/cmake: /usr/local/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake)
/usr/bin/cmake: /usr/local/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake)
/usr/bin/cmake: /usr/local/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake)
/usr/bin/cmake: /usr/local/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake)
/usr/bin/cmake: /usr/local/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake)
Copying relo_core.h
gmake[3]: Leaving directory '/home/pegasus/Documents/bpftime/build'
/usr/bin/cmake: /usr/local/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake)
gmake[3]: Leaving directory '/home/pegasus/Documents/bpftime/build'
gmake[3]: Leaving directory '/home/pegasus/Documents/bpftime/build'
/usr/bin/cmake: /usr/local/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake)
/usr/bin/cmake: /usr/local/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake)
[ 19%] Built target bpftime-cli-cpp
/usr/bin/cmake: /usr/local/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake)
gmake[3]: Leaving directory '/home/pegasus/Documents/bpftime/build'
/usr/bin/cmake: /usr/local/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake)
[ 20%] Built target bpftime_text_segment_transformer
Copying hashmap.h
[ 21%] Built target bpftime_syscall_trace_attach_impl
gmake[3]: Leaving directory '/home/pegasus/Documents/bpftime/build'
/usr/bin/cmake: /usr/local/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake)
/usr/bin/cmake: /usr/local/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake)
[ 23%] Built target bpftime_frida_uprobe_attach_impl
gmake[3]: Entering directory '/home/pegasus/Documents/bpftime/build'
/usr/bin/cmake: /usr/local/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake)
/usr/bin/cmake: /usr/local/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake)
/usr/bin/cmake: /usr/local/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake)
[ 23%] Building CXX object vm/llvm-jit/CMakeFiles/vm-bpf.dir/src/llvm/compiler.cpp.o
[ 23%] Building CXX object vm/llvm-jit/CMakeFiles/vm-bpf.dir/src/llvm/llvm_jit_context.cpp.o
Copying nlattr.h
/usr/bin/cmake: /usr/local/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake)
/usr/bin/cmake: /usr/local/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake)
Copying libbpf_internal.h
/usr/bin/cmake: /usr/local/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake)
gmake[3]: Leaving directory '/home/pegasus/Documents/bpftime/build'
/usr/bin/cmake: /usr/local/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake)
[ 34%] Built target copy_headers
gmake[3]: Entering directory '/home/pegasus/Documents/bpftime/build'
gmake[3]: Entering directory '/home/pegasus/Documents/bpftime/build'
/usr/bin/cmake: /usr/local/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake)
/usr/bin/cmake: /usr/local/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake)
gmake[3]: Leaving directory '/home/pegasus/Documents/bpftime/build'
gmake[3]: Leaving directory '/home/pegasus/Documents/bpftime/build'
gmake[3]: Leaving directory '/home/pegasus/Documents/bpftime/build'
/usr/bin/cmake: /usr/local/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake)
/usr/bin/cmake: /usr/local/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake)
[ 34%] Built target bpftime_daemon_ebpf_target
gmake[3]: Entering directory '/home/pegasus/Documents/bpftime/build'
[ 34%] Built target bpftime-object
/usr/bin/cmake: /usr/local/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake)
gmake[3]: Leaving directory '/home/pegasus/Documents/bpftime/build'
/usr/bin/cmake: /usr/local/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake)
/usr/bin/cmake: /usr/local/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake)
[ 37%] Built target bpftime_daemon_ebpf_skel
[ 73%] Built target Catch2
gmake[3]: Entering directory '/home/pegasus/Documents/bpftime/build'
/usr/bin/cmake: /usr/local/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake)
gmake[3]: Leaving directory '/home/pegasus/Documents/bpftime/build'
/usr/bin/cmake: /usr/local/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake)
[ 74%] Built target Catch2WithMain
gmake[3]: Entering directory '/home/pegasus/Documents/bpftime/build'
gmake[3]: Entering directory '/home/pegasus/Documents/bpftime/build'
/usr/bin/cmake: /usr/local/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake)
/usr/bin/cmake: /usr/local/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake)
gmake[3]: Leaving directory '/home/pegasus/Documents/bpftime/build'
gmake[3]: Leaving directory '/home/pegasus/Documents/bpftime/build'
/usr/bin/cmake: /usr/local/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake)
[ 75%] Built target bpftime_syscall_trace_attach_tests
/usr/bin/cmake: /usr/local/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake)
[ 78%] Built target bpftime_frida_uprobe_attach_tests
In file included from /home/pegasus/Documents/bpftime/vm/llvm-jit/src/llvm/llvm_jit_context.hpp:9,
from /home/pegasus/Documents/bpftime/vm/llvm-jit/src/llvm/compiler.cpp:7:
/home/pegasus/Documents/llvm-project/llvm/include/llvm/ExecutionEngine/Orc/Core.h: In constructor ‘llvm::orc::SymbolLookupSet::SymbolLookupSet(std::initializer_list<llvm::orc::SymbolStringPtr>, llvm::orc::SymbolLookupFlags)’:
/home/pegasus/Documents/llvm-project/llvm/include/llvm/ExecutionEngine/Orc/Core.h:204:20: warning: redundant move in initialization [-Wredundant-move]
204 | add(std::move(Name), Flags);
| ~~~~~~~~~^~~~~~
/home/pegasus/Documents/llvm-project/llvm/include/llvm/ExecutionEngine/Orc/Core.h:204:20: note: remove ‘std::move’ call
In file included from /home/pegasus/Documents/bpftime/vm/llvm-jit/src/llvm/llvm_jit_context.hpp:9,
from /home/pegasus/Documents/bpftime/vm/llvm-jit/src/llvm/llvm_jit_context.cpp:7:
/home/pegasus/Documents/llvm-project/llvm/include/llvm/ExecutionEngine/Orc/Core.h: In constructor ‘llvm::orc::SymbolLookupSet::SymbolLookupSet(std::initializer_list<llvm::orc::SymbolStringPtr>, llvm::orc::SymbolLookupFlags)’:
/home/pegasus/Documents/llvm-project/llvm/include/llvm/ExecutionEngine/Orc/Core.h:204:20: warning: redundant move in initialization [-Wredundant-move]
204 | add(std::move(Name), Flags);
| ~~~~~~~~~^~~~~~
/home/pegasus/Documents/llvm-project/llvm/include/llvm/ExecutionEngine/Orc/Core.h:204:20: note: remove ‘std::move’ call
In file included from /home/pegasus/Documents/llvm-project/llvm/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h:21,
from /home/pegasus/Documents/llvm-project/llvm/include/llvm/ExecutionEngine/Orc/LLJIT.h:16,
from /home/pegasus/Documents/bpftime/vm/llvm-jit/src/llvm/llvm_jit_context.hpp:13:
/home/pegasus/Documents/llvm-project/llvm/include/llvm/ExecutionEngine/Orc/IndirectionUtils.h: In member function ‘llvm::Expected<llvm::orc::ExecutorAddr> llvm::orc::TrampolinePool::getTrampoline()’:
/home/pegasus/Documents/llvm-project/llvm/include/llvm/ExecutionEngine/Orc/IndirectionUtils.h:80:25: warning: redundant move in return statement [-Wredundant-move]
80 | return std::move(Err);
| ~~~~~~~~~^~~~~
/home/pegasus/Documents/llvm-project/llvm/include/llvm/ExecutionEngine/Orc/IndirectionUtils.h:80:25: note: remove ‘std::move’ call
In file included from /home/pegasus/Documents/llvm-project/llvm/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h:21,
from /home/pegasus/Documents/llvm-project/llvm/include/llvm/ExecutionEngine/Orc/LLJIT.h:16,
from /home/pegasus/Documents/bpftime/vm/llvm-jit/src/llvm/llvm_jit_context.hpp:13:
/home/pegasus/Documents/llvm-project/llvm/include/llvm/ExecutionEngine/Orc/IndirectionUtils.h: In member function ‘llvm::Expected<llvm::orc::ExecutorAddr> llvm::orc::TrampolinePool::getTrampoline()’:
/home/pegasus/Documents/llvm-project/llvm/include/llvm/ExecutionEngine/Orc/IndirectionUtils.h:80:25: warning: redundant move in return statement [-Wredundant-move]
80 | return std::move(Err);
| ~~~~~~~~~^~~~~
/home/pegasus/Documents/llvm-project/llvm/include/llvm/ExecutionEngine/Orc/IndirectionUtils.h:80:25: note: remove ‘std::move’ call
/home/pegasus/Documents/bpftime/vm/llvm-jit/src/llvm/compiler.cpp: In member function ‘llvm::Expected<llvm::orc::ThreadSafeModule> llvm_bpf_jit_context::generateModule(const std::vector<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char> > >&, const std::vector<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char> > >&)’:
/home/pegasus/Documents/bpftime/vm/llvm-jit/src/llvm/compiler.cpp:163:43: error: ‘getInt8PtrTy’ is not a member of ‘llvm::Type’
163 | { Type::getInt8PtrTy(*context),
| ^~~~~~~~~~~~
/home/pegasus/Documents/bpftime/vm/llvm-jit/src/llvm/compiler.cpp:162:34: error: no matching function for call to ‘llvm::FunctionType::get(llvm::IntegerType*, <brace-enclosed initializer list>, bool)’
162 | FunctionType::get(Type::getInt64Ty(*context),
| ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
163 | { Type::getInt8PtrTy(*context),
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
164 | Type::getInt64Ty(*context) },
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
165 | false),
| ~~~~~~
In file included from /home/pegasus/Documents/llvm-project/llvm/include/llvm/IR/DataLayout.h:27,
from /home/pegasus/Documents/llvm-project/llvm/include/llvm/IR/Module.h:24,
from /home/pegasus/Documents/bpftime/vm/llvm-jit/src/llvm/llvm_jit_context.hpp:11:
/home/pegasus/Documents/llvm-project/llvm/include/llvm/IR/DerivedTypes.h:111:24: note: candidate: ‘static llvm::FunctionType* llvm::FunctionType::get(llvm::Type*, llvm::ArrayRef<llvm::Type*>, bool)’
111 | static FunctionType *get(Type *Result,
| ^~~
/home/pegasus/Documents/llvm-project/llvm/include/llvm/IR/DerivedTypes.h:112:44: note: no known conversion for argument 2 from ‘<brace-enclosed initializer list>’ to ‘llvm::ArrayRef<llvm::Type*>’
112 | ArrayRef<Type*> Params, bool isVarArg);
| ~~~~~~~~~~~~~~~~^~~~~~
/home/pegasus/Documents/llvm-project/llvm/include/llvm/IR/DerivedTypes.h:115:24: note: candidate: ‘static llvm::FunctionType* llvm::FunctionType::get(llvm::Type*, bool)’
115 | static FunctionType *get(Type *Result, bool isVarArg);
| ^~~
/home/pegasus/Documents/llvm-project/llvm/include/llvm/IR/DerivedTypes.h:115:24: note: candidate expects 2 arguments, 3 provided
/home/pegasus/Documents/bpftime/vm/llvm-jit/src/llvm/llvm_jit_context.cpp: In lambda function:
/home/pegasus/Documents/bpftime/vm/llvm-jit/src/llvm/llvm_jit_context.cpp:156:58: error: ‘CGFT_ObjectFile’ was not declared in this scope
156 | pass, *BOS, nullptr, CGFT_ObjectFile)) {
| ^~~~~~~~~~~~~~~
/home/pegasus/Documents/llvm-project/llvm/include/llvm/ExecutionEngine/Orc/LLJIT.h: In instantiation of ‘llvm::Expected<std::unique_ptr<_Tp> > llvm::orc::LLJITBuilderSetters< <template-parameter-1-1>, <template-parameter-1-2>, <template-parameter-1-3> >::create() [with JITType = llvm::orc::LLJIT; SetterImpl = llvm::orc::LLJITBuilder; State = llvm::orc::LLJITBuilderState]’:
/home/pegasus/Documents/bpftime/vm/llvm-jit/src/llvm/llvm_jit_context.cpp:232:44: required from here
/home/pegasus/Documents/llvm-project/llvm/include/llvm/ExecutionEngine/Orc/LLJIT.h:476:27: warning: redundant move in return statement [-Wredundant-move]
476 | return std::move(Err);
| ^
/home/pegasus/Documents/llvm-project/llvm/include/llvm/ExecutionEngine/Orc/LLJIT.h:476:27: note: remove ‘std::move’ call
In file included from /home/pegasus/Documents/llvm-project/llvm/include/llvm/ADT/DenseSet.h:17,
from /home/pegasus/Documents/llvm-project/llvm/include/llvm/ExecutionEngine/Orc/Core.h:17:
/home/pegasus/Documents/llvm-project/llvm/include/llvm/ADT/DenseMap.h: In instantiation of ‘BucketT* llvm::DenseMapBase<DerivedT, KeyT, ValueT, KeyInfoT, BucketT>::InsertIntoBucket(BucketT*, KeyArg&&, ValueArgs&& ...) [with KeyArg = const llvm::orc::SymbolStringPtr&; ValueArgs = {llvm::JITEvaluatedSymbol&}; DerivedT = llvm::DenseMap<llvm::orc::SymbolStringPtr, llvm::orc::ExecutorSymbolDef>; KeyT = llvm::orc::SymbolStringPtr; ValueT = llvm::orc::ExecutorSymbolDef; KeyInfoT = llvm::DenseMapInfo<llvm::orc::SymbolStringPtr>; BucketT = llvm::detail::DenseMapPair<llvm::orc::SymbolStringPtr, llvm::orc::ExecutorSymbolDef>]’:
/home/pegasus/Documents/llvm-project/llvm/include/llvm/ADT/DenseMap.h:271:33: required from ‘std::pair<llvm::DenseMapIterator<KeyT, ValueT, KeyInfoT, BucketT>, bool> llvm::DenseMapBase<DerivedT, KeyT, ValueT, KeyInfoT, BucketT>::try_emplace(const KeyT&, Ts&& ...) [with Ts = {llvm::JITEvaluatedSymbol&}; DerivedT = llvm::DenseMap<llvm::orc::SymbolStringPtr, llvm::orc::ExecutorSymbolDef>; KeyT = llvm::orc::SymbolStringPtr; ValueT = llvm::orc::ExecutorSymbolDef; KeyInfoT = llvm::DenseMapInfo<llvm::orc::SymbolStringPtr>; BucketT = llvm::detail::DenseMapPair<llvm::orc::SymbolStringPtr, llvm::orc::ExecutorSymbolDef>]’
/home/pegasus/Documents/bpftime/vm/llvm-jit/src/llvm/llvm_jit_context.cpp:246:26: required from here
/home/pegasus/Documents/llvm-project/llvm/include/llvm/ADT/DenseMap.h:577:5: error: no matching function for call to ‘llvm::orc::ExecutorSymbolDef::ExecutorSymbolDef(llvm::JITEvaluatedSymbol&)’
577 | ::new (&TheBucket->getSecond()) ValueT(std::forward<ValueArgs>(Values)...);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/pegasus/Documents/llvm-project/llvm/include/llvm/ExecutionEngine/Orc/Shared/TargetProcessControlTypes.h:22,
from /home/pegasus/Documents/llvm-project/llvm/include/llvm/ExecutionEngine/Orc/ExecutorProcessControl.h:19,
from /home/pegasus/Documents/llvm-project/llvm/include/llvm/ExecutionEngine/Orc/Core.h:22:
/home/pegasus/Documents/llvm-project/llvm/include/llvm/ExecutionEngine/Orc/Shared/ExecutorSymbolDef.h:27:3: note: candidate: ‘llvm::orc::ExecutorSymbolDef::ExecutorSymbolDef(llvm::orc::ExecutorAddr, llvm::JITSymbolFlags)’
27 | ExecutorSymbolDef(ExecutorAddr Addr, JITSymbolFlags Flags)
| ^~~~~~~~~~~~~~~~~
/home/pegasus/Documents/llvm-project/llvm/include/llvm/ExecutionEngine/Orc/Shared/ExecutorSymbolDef.h:27:3: note: candidate expects 2 arguments, 1 provided
/home/pegasus/Documents/llvm-project/llvm/include/llvm/ExecutionEngine/Orc/Shared/ExecutorSymbolDef.h:26:3: note: candidate: ‘constexpr llvm::orc::ExecutorSymbolDef::ExecutorSymbolDef()’
26 | ExecutorSymbolDef() = default;
| ^~~~~~~~~~~~~~~~~
/home/pegasus/Documents/llvm-project/llvm/include/llvm/ExecutionEngine/Orc/Shared/ExecutorSymbolDef.h:26:3: note: candidate expects 0 arguments, 1 provided
/home/pegasus/Documents/llvm-project/llvm/include/llvm/ExecutionEngine/Orc/Shared/ExecutorSymbolDef.h:24:7: note: candidate: ‘constexpr llvm::orc::ExecutorSymbolDef::ExecutorSymbolDef(const llvm::orc::ExecutorSymbolDef&)’
24 | class ExecutorSymbolDef {
| ^~~~~~~~~~~~~~~~~
/home/pegasus/Documents/llvm-project/llvm/include/llvm/ExecutionEngine/Orc/Shared/ExecutorSymbolDef.h:24:7: note: no known conversion for argument 1 from ‘llvm::JITEvaluatedSymbol’ to ‘const llvm::orc::ExecutorSymbolDef&’
/home/pegasus/Documents/llvm-project/llvm/include/llvm/ExecutionEngine/Orc/Shared/ExecutorSymbolDef.h:24:7: note: candidate: ‘constexpr llvm::orc::ExecutorSymbolDef::ExecutorSymbolDef(llvm::orc::ExecutorSymbolDef&&)’
/home/pegasus/Documents/llvm-project/llvm/include/llvm/ExecutionEngine/Orc/Shared/ExecutorSymbolDef.h:24:7: note: no known conversion for argument 1 from ‘llvm::JITEvaluatedSymbol’ to ‘llvm::orc::ExecutorSymbolDef&&’
/home/pegasus/Documents/llvm-project/llvm/include/llvm/ADT/DenseMap.h: In instantiation of ‘BucketT* llvm::DenseMapBase<DerivedT, KeyT, ValueT, KeyInfoT, BucketT>::InsertIntoBucket(BucketT*, KeyArg&&, ValueArgs&& ...) [with KeyArg = llvm::orc::SymbolStringPtr; ValueArgs = {llvm::JITEvaluatedSymbol&}; DerivedT = llvm::DenseMap<llvm::orc::SymbolStringPtr, llvm::orc::ExecutorSymbolDef>; KeyT = llvm::orc::SymbolStringPtr; ValueT = llvm::orc::ExecutorSymbolDef; KeyInfoT = llvm::DenseMapInfo<llvm::orc::SymbolStringPtr>; BucketT = llvm::detail::DenseMapPair<llvm::orc::SymbolStringPtr, llvm::orc::ExecutorSymbolDef>]’:
/home/pegasus/Documents/llvm-project/llvm/include/llvm/ADT/DenseMap.h:247:25: required from ‘std::pair<llvm::DenseMapIterator<KeyT, ValueT, KeyInfoT, BucketT>, bool> llvm::DenseMapBase<DerivedT, KeyT, ValueT, KeyInfoT, BucketT>::try_emplace(KeyT&&, Ts&& ...) [with Ts = {llvm::JITEvaluatedSymbol&}; DerivedT = llvm::DenseMap<llvm::orc::SymbolStringPtr, llvm::orc::ExecutorSymbolDef>; KeyT = llvm::orc::SymbolStringPtr; ValueT = llvm::orc::ExecutorSymbolDef; KeyInfoT = llvm::DenseMapInfo<llvm::orc::SymbolStringPtr>; BucketT = llvm::detail::DenseMapPair<llvm::orc::SymbolStringPtr, llvm::orc::ExecutorSymbolDef>]’
/home/pegasus/Documents/bpftime/vm/llvm-jit/src/llvm/llvm_jit_context.cpp:267:24: required from here
/home/pegasus/Documents/llvm-project/llvm/include/llvm/ADT/DenseMap.h:577:5: error: no matching function for call to ‘llvm::orc::ExecutorSymbolDef::ExecutorSymbolDef(llvm::JITEvaluatedSymbol&)’
577 | ::new (&TheBucket->getSecond()) ValueT(std::forward<ValueArgs>(Values)...);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/pegasus/Documents/llvm-project/llvm/include/llvm/ExecutionEngine/Orc/Shared/ExecutorSymbolDef.h:27:3: note: candidate: ‘llvm::orc::ExecutorSymbolDef::ExecutorSymbolDef(llvm::orc::ExecutorAddr, llvm::JITSymbolFlags)’
27 | ExecutorSymbolDef(ExecutorAddr Addr, JITSymbolFlags Flags)
| ^~~~~~~~~~~~~~~~~
/home/pegasus/Documents/llvm-project/llvm/include/llvm/ExecutionEngine/Orc/Shared/ExecutorSymbolDef.h:27:3: note: candidate expects 2 arguments, 1 provided
/home/pegasus/Documents/llvm-project/llvm/include/llvm/ExecutionEngine/Orc/Shared/ExecutorSymbolDef.h:26:3: note: candidate: ‘constexpr llvm::orc::ExecutorSymbolDef::ExecutorSymbolDef()’
26 | ExecutorSymbolDef() = default;
| ^~~~~~~~~~~~~~~~~
/home/pegasus/Documents/llvm-project/llvm/include/llvm/ExecutionEngine/Orc/Shared/ExecutorSymbolDef.h:26:3: note: candidate expects 0 arguments, 1 provided
/home/pegasus/Documents/llvm-project/llvm/include/llvm/ExecutionEngine/Orc/Shared/ExecutorSymbolDef.h:24:7: note: candidate: ‘constexpr llvm::orc::ExecutorSymbolDef::ExecutorSymbolDef(const llvm::orc::ExecutorSymbolDef&)’
24 | class ExecutorSymbolDef {
| ^~~~~~~~~~~~~~~~~
/home/pegasus/Documents/llvm-project/llvm/include/llvm/ExecutionEngine/Orc/Shared/ExecutorSymbolDef.h:24:7: note: no known conversion for argument 1 from ‘llvm::JITEvaluatedSymbol’ to ‘const llvm::orc::ExecutorSymbolDef&’
/home/pegasus/Documents/llvm-project/llvm/include/llvm/ExecutionEngine/Orc/Shared/ExecutorSymbolDef.h:24:7: note: candidate: ‘constexpr llvm::orc::ExecutorSymbolDef::ExecutorSymbolDef(llvm::orc::ExecutorSymbolDef&&)’
/home/pegasus/Documents/llvm-project/llvm/include/llvm/ExecutionEngine/Orc/Shared/ExecutorSymbolDef.h:24:7: note: no known conversion for argument 1 from ‘llvm::JITEvaluatedSymbol’ to ‘llvm::orc::ExecutorSymbolDef&&’
gmake[3]: *** [vm/llvm-jit/CMakeFiles/vm-bpf.dir/build.make:104: vm/llvm-jit/CMakeFiles/vm-bpf.dir/src/llvm/compiler.cpp.o] Error 1
gmake[3]: *** Waiting for unfinished jobs....
gmake[3]: *** [vm/llvm-jit/CMakeFiles/vm-bpf.dir/build.make:90: vm/llvm-jit/CMakeFiles/vm-bpf.dir/src/llvm/llvm_jit_context.cpp.o] Error 1
gmake[3]: Leaving directory '/home/pegasus/Documents/bpftime/build'
gmake[2]: *** [CMakeFiles/Makefile2:748: vm/llvm-jit/CMakeFiles/vm-bpf.dir/all] Error 2
gmake[2]: Leaving directory '/home/pegasus/Documents/bpftime/build'
gmake[1]: *** [Makefile:156: all] Error 2
gmake[1]: Leaving directory '/home/pegasus/Documents/bpftime/build'
make: *** [Makefile:60: release] Error 2
Expected behavior
It should build the bpftime tool normally.
How to build the tool without any error?
hp77-creator commented
did u try without llvm @NobinPegasus ?
Officeyutong commented
We same to have some bugs on LLVM greater than 17. You may try LLVM 15 or 16
Officeyutong commented
Done by #276