I'm trying to build osquery from source (for perf ...
# general
z
I'm trying to build osquery from source (for perf safety testing), and I'm running into this error?
Copy code
CMake Warning at libraries/cmake/source/modules/utils.cmake:34 (message):
  Git version >=2.14.0 is required to perform shallow clones, detected
  version 1.8.3.1, falling back to full clones (slower).
Call Stack (most recent call first):
  libraries/cmake/source/modules/utils.cmake:150 (initializeGitSubmodule)
  libraries/cmake/source/modules/Findaugeas.cmake:11 (importSourceSubmodule)
  CMakeLists.txt:144 (find_package)
  CMakeLists.txt:69 (importLibraries)
  CMakeLists.txt:184 (main)


You need to run this command from the toplevel of the working tree.
CMake Error at libraries/cmake/source/modules/utils.cmake:56 (message):
  Failed to update the following git submodule:
  "/osquery/libraries/cmake/source/augeas/src"
Call Stack (most recent call first):
  libraries/cmake/source/modules/utils.cmake:150 (initializeGitSubmodule)
  libraries/cmake/source/modules/Findaugeas.cmake:11 (importSourceSubmodule)
  CMakeLists.txt:144 (find_package)
  CMakeLists.txt:69 (importLibraries)
  CMakeLists.txt:184 (main)
s
Git version >=2.14.0 is required
looks pretty clear?
z
huh, I thought it required it but would work with v 1.8.3.1 lol. I'll give that a shot
s
Oh, yeah. There is a “should work there huh.
But that’s all git failures. So I’d checkout with a new git and see if you have bettetr luck.
git submodules are a PitA
1
z
I got further, but now
CMake Error: The source directory "/osquery/build" does not appear to contain CMakeLists.txt.
Does
"The root folder is assumed to be /home/<user>"
more a requirement than a suggestion?
s
I don’t recognize that error, and build in various directories all the time
z
let me try something else.
ok, is this an osquery bug report or something else?
Copy code
clang-9: error: unable to execute command: Killed
clang-9: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 9.0.1 (<https://github.com/llvm/llvm-project.git> c1a0a213378a458fbea1a5c77b315c7dce08fd05)
Target: x86_64-osquery-linux-gnu
Thread model: posix
InstalledDir: /usr/local/osquery-toolchain/usr/bin
clang-9: note: diagnostic msg: PLEASE submit a bug report to <https://bugs.llvm.org/> and include the crash backtrace, preprocessed source, and associated run script.
clang-9: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-9: note: diagnostic msg: /tmp/EC2Client-465bdd.cpp
clang-9: note: diagnostic msg: /tmp/EC2Client-465bdd.sh
clang-9: note: diagnostic msg: 

********************
gmake[2]: *** [libs/src/aws-sdk-cpp/CMakeFiles/thirdparty_aws_ec2.dir/aws-sdk-cpp_src/aws-cpp-sdk-ec2/source/EC2Client.cpp.o] Error 254
gmake[2]: *** Waiting for unfinished jobs....
[ 71%] Linking CXX static library libosquery_database.a
[ 71%] Built target osquery_database
gmake[1]: *** [libs/src/aws-sdk-cpp/CMakeFiles/thirdparty_aws_ec2.dir/all] Error 2
gmake[1]: *** Waiting for unfinished jobs....
t
That usually happens when you have <= 4GB of ram.
If you can, allocate more ram to the machine building osquery.