ycpr
05/20/2019, 4:12 PMgoogletest
(libgtest.a
) while compiling osquery using qcreator on 4.9.0-9-amd64 #1 SMP Debian 4.9.168-1 (2019-04-12) x86_64 GNU/Linux
. It compiles with make
though. Have anyone experienced such problem? I tried to install googletest
and libgtest-dev
packages and ran make deps
already.
17:13:40: Running steps for project OSQUERY...
17:13:40: Starting: "/usr/local/bin/cmake" --build . --target all
[ 1%] Linking CXX static library libgtest.a
Error running link command: No such file or directory
third-party/googletest/googlemock/gtest/CMakeFiles/gtest.dir/build.make:83: recipe for target 'third-party/googletest/googlemock/gtest/libgtest.a' failed
make[2]: *** [third-party/googletest/googlemock/gtest/libgtest.a] Error 2
make[1]: *** [third-party/googletest/googlemock/gtest/CMakeFiles/gtest.dir/all] Error 2
CMakeFiles/Makefile2:369: recipe for target 'third-party/googletest/googlemock/gtest/CMakeFiles/gtest.dir/all' failed
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
17:13:40: The process "/usr/local/bin/cmake" exited with code 2.
Error while building/deploying project OSQUERY (kit: Desktop)
When executing step "Make"
17:13:40: Elapsed time: 00:00.
libc++
, though I had the required flags set in qtcreator for the selected kit and compilers. So I ended up editing CMakeLists a bit to pass this flags, I changed
set(CXX_STDLIB "-stdlib=libc++")
to
set(CXX_STDLIB "-stdlib=libc++ -L/usr/local/osquery/legacy/lib -L/usr/local/osquery/lib -B/usr/local/osquery/legacy/lib -rtlib=compiler-rt -fuse-ld=lld")
It works just fine, but i'd like to know the way to compile osquery without messing with CMakeLists just by editing IDE parameters, environment variables, etc.Omer Nizri
06/03/2019, 7:43 PMStefano Bonicatti
06/03/2019, 8:39 PMycpr
06/04/2019, 8:03 AMStefano Bonicatti
06/04/2019, 8:20 AMycpr
06/05/2019, 11:40 AM