Title
#general
z

Zach Zeid

09/22/2020, 2:35 PM
I'm trying to build osquery from source (for perf safety testing), and I'm running into this error?
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

seph

09/22/2020, 3:02 PM
Git version >=2.14.0 is required
looks pretty clear?
z

Zach Zeid

09/22/2020, 3:04 PM
huh, I thought it required it but would work with v 1.8.3.1 lol. I'll give that a shot
s

seph

09/22/2020, 3:15 PM
Oh, yeah. There is a “should work there huh.
3:15 PM
But that’s all git failures. So I’d checkout with a new git and see if you have bettetr luck.
3:15 PM
git submodules are a PitA
z

Zach Zeid

09/22/2020, 3:16 PM
I got further, but now
CMake Error: The source directory "/osquery/build" does not appear to contain CMakeLists.txt.
3:18 PM
Does
"The root folder is assumed to be /home/<user>"
more a requirement than a suggestion?
s

seph

09/22/2020, 3:19 PM
I don’t recognize that error, and build in various directories all the time
z

Zach Zeid

09/22/2020, 3:19 PM
let me try something else.
6:58 PM
ok, is this an osquery bug report or something else?
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....
theopolis

theopolis

09/23/2020, 12:53 AM
That usually happens when you have <= 4GB of ram.
12:54 AM
If you can, allocate more ram to the machine building osquery.