[ 97%] Built target bpftrace_test
/mnt/src/bpftrace/src/codegen_llvm.cpp: In member function ‘virtual uint8_t* bpftrace::ast::BPFtraceMemoryManager::allocateCodeSection(uintptr_t, unsigned int, unsigned int, llvm::StringRef)’:
/mnt/src/bpftrace/src/codegen_llvm.cpp:365:34: error: converting to ‘std::tuple<unsigned char*, long unsigned int>’ from initializer list would use explicit constructor ‘constexpr std::tuple<_T1, _T2>::tuple(_U1&&, _U2&&) [with _U1 = unsigned char*&; _U2 = long unsigned int&; <template-parameter-2-3> = void; _T1 = unsigned char*; _T2 = long unsigned int]’
sections_[SectionName.str()] = {addr, Size};
^
/mnt/src/bpftrace/src/codegen_llvm.cpp: In member function ‘virtual uint8_t* bpftrace::ast::BPFtraceMemoryManager::allocateDataSection(uintptr_t, unsigned int, unsigned int, llvm::StringRef, bool)’:
/mnt/src/bpftrace/src/codegen_llvm.cpp:372:34: error: converting to ‘std::tuple<unsigned char*, long unsigned int>’ from initializer list would use explicit constructor ‘constexpr std::tuple<_T1, _T2>::tuple(_U1&&, _U2&&) [with _U1 = unsigned char*&; _U2 = long unsigned int&; <template-parameter-2-3> = void; _T1 = unsigned char*; _T2 = long unsigned int]’
sections_[SectionName.str()] = {addr, Size};
^
src/CMakeFiles/bpftrace.dir/build.make:134: recipe for target 'src/CMakeFiles/bpftrace.dir/codegen_llvm.cpp.o' failed
make[2]: *** [src/CMakeFiles/bpftrace.dir/codegen_llvm.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
CMakeFiles/Makefile2:275: recipe for target 'src/CMakeFiles/bpftrace.dir/all' failed
make[1]: *** [src/CMakeFiles/bpftrace.dir/all] Error 2
Makefile:94: recipe for target 'all' failed
make: *** [all] Error 2
Here's my g++ version:
# g++ --version
g++ (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Build error:
Here's my g++ version:
I was able to hack this to fix it (I think):