Closed agentzh closed 5 months ago
I'm getting this compilation error when building LLVM JIT with LLVM 15.0.7 on Fedora Linux with g++ 10.3.1:
/home/agentzh/bpftime/vm/llvm-jit/example/main-bpf-conformance.cpp: In function ‘std::vector<unsigned char, std::allocator<unsigned char> > base16_decode(const string&)’: /home/agentzh/bpftime/vm/llvm-jit/example/main-bpf-conformance.cpp:20:28: error: variable ‘std::stringstream ss’ has initializer but incomplete type 20 | std::stringstream ss(input); | ^ gmake[3]: *** [vm/llvm-jit/CMakeFiles/vm-llvm-bpf-test.dir/build.make:76: vm/llvm-jit/CMakeFiles/vm-llvm-bpf-test.dir/example/main-bpf-conformance.cpp.o] Error 1
The fix is easy:
diff --git a/vm/llvm-jit/example/main-bpf-conformance.cpp b/vm/llvm-jit/example/main-bpf-conformance.cpp index 82bad28..6119f35 100644 --- a/vm/llvm-jit/example/main-bpf-conformance.cpp +++ b/vm/llvm-jit/example/main-bpf-conformance.cpp @@ -5,6 +5,7 @@ #include <cstdint> #include <cstring> #include <iostream> +#include <sstream> #include <vector> #include "ebpf-vm.h"
I'm getting this compilation error when building LLVM JIT with LLVM 15.0.7 on Fedora Linux with g++ 10.3.1:
The fix is easy: