Compilation fails / missing instructions
JJK96 opened this issue · comments
I'm compiling the program with:
mkdir shellvm-build
cd shellvm-build
cmake ..
make
Which gives the following output:
$ cmake ..
-- Performing Test HAVE_FFI_CALL
-- Performing Test HAVE_FFI_CALL - Success
-- Found FFI: /Library/Developer/CommandLineTools/SDKs/MacOSX13.1.sdk/usr/lib/libffi.tbd
-- Performing Test Terminfo_LINKABLE
-- Performing Test Terminfo_LINKABLE - Success
-- Found Terminfo: /Library/Developer/CommandLineTools/SDKs/MacOSX13.1.sdk/usr/lib/libcurses.tbd
-- Found ZLIB: /Library/Developer/CommandLineTools/SDKs/MacOSX13.1.sdk/usr/lib/libz.tbd (found version "1.2.11")
-- Found zstd: /usr/local/lib/libzstd.dylib
-- Found LibXml2: /Library/Developer/CommandLineTools/SDKs/MacOSX13.1.sdk/usr/lib/libxml2.tbd (found version "2.9.13")
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/nw/Workspace/RE/simple_beacon/shellcode/SheLLVM/shellvm-build
$ make -C shellvm-build
[ 12%] Building CXX object llvm/CMakeFiles/shellvm.dir/GlobalToStackPass.cpp.o
/Users/nw/Workspace/RE/simple_beacon/shellcode/SheLLVM/llvm/GlobalToStackPass.cpp:136:34: error: no matching function for call to 'CreateInBounds'
GetElementPtrInst *GEP = GetElementPtrInst::CreateInBounds(Ptr, Idx);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/opt/llvm/include/llvm/IR/Instructions.h:982:3: note: candidate function not viable: requires at least 3 arguments, but 2 were provided
CreateInBounds(Type *PointeeType, Value *Ptr, ArrayRef<Value *> IdxList,
^
/usr/local/opt/llvm/include/llvm/IR/Instructions.h:991:29: note: candidate function not viable: requires 5 arguments, but 2 were provided
static GetElementPtrInst *CreateInBounds(Type *PointeeType, Value *Ptr,
^
1 error generated.
make[2]: *** [llvm/CMakeFiles/shellvm.dir/GlobalToStackPass.cpp.o] Error 1
make[1]: *** [llvm/CMakeFiles/shellvm.dir/all] Error 2
make: *** [all] Error 2
I don't know if I'm building this correctly, since no build instructions are given.
I'm using LLVM version 15.0.7