trailofbits / it-depends

A tool to automatically build a dependency graph and Software Bill of Materials (SBOM) for packages and arbitrary source code repositories.
https://blog.trailofbits.com/2021/12/16/it-depends/
GNU Lesser General Public License v3.0
330 stars 20 forks source link

Multiple "error: patch failed" on C++ project #47

Open mike-myers-tob opened 3 years ago

mike-myers-tob commented 3 years ago

I ran it-depends with the osquery repo:

> /Users/mmyers/Library/Python/3.9/bin/it-depends ~/Projects/Engineering/osquery/osquery/src/
2021-07-15 18:28:36 [info     ] Getting dependencies for cmake repo /Users/mmyers/Projects/Engineering/osquery/osquery/src
2021-07-15 18:29:01 [error    ] Error running cmake:
Running with trace output on.
Running with expanded trace output on.
Trace will be written to /var/folders/31/wdx_2hsx1ls13d1_sqfdrldh0000gn/T/tmp9sa11sma/output
HEAD is now at 3eacae5 Merge branch 'develop'
HEAD is now at 2fe3bd99 Merge pull request #1433 from dsacre/fix-clang-warnings
HEAD is now at cecee5030 Version 0.13.0
HEAD is now at 1595e53e Bump version to 4.0.2
-- Configuring done
error: patch failed: libyara/include/yara/compiler.h:273
error: libyara/include/yara/compiler.h: patch does not apply
error: patch failed: libyara/include/yara/strutils.h:74
error: libyara/include/yara/strutils.h: patch does not apply
error: patch failed: libyara/lexer.c:2160
error: libyara/lexer.c: patch does not apply
error: patch failed: libyara/modules/pe/pe.c:605
error: libyara/modules/pe/pe.c: patch does not apply
error: patch failed: libyara/strutils.c:31
error: libyara/strutils.c: patch does not apply
CMake Error at libraries/cmake/source/librdkafka/CMakeLists.txt:23 (add_library):
  Cannot find source file:
    /Users/mmyers/Projects/Engineering/osquery/osquery/src/libraries/cmake/source/librdkafka/src/src/rdkafka_ssl.c
  Tried extensions .c .C .c++ .cc .cpp .cxx .cu .mpp .m .M .mm .h .hh .h++
  .hm .hpp .hxx .in .txx .f .F .for .f77 .f90 .f95 .f03 .ispc
Call Stack (most recent call first):
  libraries/cmake/source/librdkafka/CMakeLists.txt:9 (generateLibrdkafka)
  libraries/cmake/source/librdkafka/CMakeLists.txt:219 (librdkafkaMain)
CMake Error at libraries/cmake/source/librdkafka/CMakeLists.txt:23 (add_library):
  No SOURCES given to target: thirdparty_librdkafka_c
Call Stack (most recent call first):
  libraries/cmake/source/librdkafka/CMakeLists.txt:9 (generateLibrdkafka)
  libraries/cmake/source/librdkafka/CMakeLists.txt:219 (librdkafkaMain)
CMake Generate step failed.  Build files cannot be regenerated correctly.
mike-myers-tob commented 3 years ago

The above was on macOS. On Ubuntu Linux, the output is better:

$ it-depends ~/Desktop/osquery
2021-07-15 19:14:36 [info     ] Getting dependencies for cmake repo /home/mmyers/Desktop/osquery
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Python3', '3.5', 'COMPONENTS', 'Interpreter', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['augeas', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['FLEX', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_library ['FL_LIBRARY', 'NAMES', 'fl', 'DOC', 'Path', 'to', 'the', 'fl', 'library']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_path ['FLEX_INCLUDE_DIR', 'FlexLexer.h', 'DOC', 'Path', 'to', 'the', 'flex', 'headers']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['BISON', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['boost', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['bzip2', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['gflags', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['glog', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['googletest', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['PythonInterp']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Threads']
2021-07-15 19:22:43 [info     ] Processing CMAKE command check_include_file ['pthread.h', 'CMAKE_HAVE_PTHREAD_H']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Threads']
2021-07-15 19:22:43 [info     ] Processing CMAKE command check_include_file ['pthread.h', 'CMAKE_HAVE_PTHREAD_H']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['libarchive', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['libaudit', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['libcryptsetup', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['libdevmapper', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['libelfin', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['libgcrypt', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['libgpg-error', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['libiptables', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['libmagic', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['librdkafka', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['librpm', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['libudev', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['libxml2', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['linenoise-ng', 'REQUIRED']
2021-07-15 19:22:43 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:44 [info     ] Processing CMAKE command find_package ['lldpd', 'REQUIRED']
2021-07-15 19:22:44 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:44 [info     ] Processing CMAKE command find_package ['lzma', 'REQUIRED']
2021-07-15 19:22:44 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:44 [info     ] Processing CMAKE command find_package ['popt', 'REQUIRED']
2021-07-15 19:22:44 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:44 [info     ] Processing CMAKE command find_package ['rapidjson', 'REQUIRED']
2021-07-15 19:22:44 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:44 [info     ] Processing CMAKE command find_package ['rocksdb', 'REQUIRED']
2021-07-15 19:22:44 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:44 [info     ] Processing CMAKE command find_package ['sleuthkit', 'REQUIRED']
2021-07-15 19:22:44 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:44 [info     ] Processing CMAKE command find_package ['smartmontools', 'REQUIRED']
2021-07-15 19:22:44 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:44 [info     ] Processing CMAKE command find_package ['sqlite', 'REQUIRED']
2021-07-15 19:22:44 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:44 [info     ] Processing CMAKE command find_package ['ssdeep-cpp', 'REQUIRED']
2021-07-15 19:22:44 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:44 [info     ] Processing CMAKE command find_package ['thrift', 'REQUIRED']
2021-07-15 19:22:44 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:44 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:44 [info     ] Processing CMAKE command find_package ['util-linux', 'REQUIRED']
2021-07-15 19:22:44 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:44 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:44 [info     ] Processing CMAKE command find_package ['yara', 'REQUIRED']
2021-07-15 19:22:44 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:44 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:44 [info     ] Processing CMAKE command find_package ['zlib', 'REQUIRED']
2021-07-15 19:22:44 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:44 [info     ] Processing CMAKE command find_package ['zstd', 'REQUIRED']
2021-07-15 19:22:44 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:44 [info     ] Processing CMAKE command find_package ['openssl', 'REQUIRED']
2021-07-15 19:22:44 [info     ] Processing CMAKE command find_package ['icu', 'REQUIRED']
2021-07-15 19:22:44 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:44 [info     ] Processing CMAKE command find_package ['expat', 'REQUIRED']
2021-07-15 19:22:44 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:44 [info     ] Processing CMAKE command find_package ['dbus', 'REQUIRED']
2021-07-15 19:22:44 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:44 [info     ] Processing CMAKE command find_package ['libcap', 'REQUIRED']
2021-07-15 19:22:44 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:44 [info     ] Processing CMAKE command find_package ['ebpfpub', 'REQUIRED']
2021-07-15 19:22:44 [info     ] Processing CMAKE command find_library ['llvm_bpfcodegen_lib', 'NAMES', 'libLLVMBPFCodeGen.a']
2021-07-15 19:22:44 [info     ] Processing CMAKE command find_package ['aws-sdk-cpp', 'REQUIRED']
2021-07-15 19:22:44 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:44 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:44 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:44 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:44 [info     ] Processing CMAKE command find_package ['libdpkg', 'REQUIRED']
2021-07-15 19:22:44 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:44 [info     ] Processing CMAKE command find_package ['Git', 'REQUIRED']
2021-07-15 19:22:44 [info     ] Processing CMAKE command find_package ['cppcheck']
2021-07-15 19:22:44 [info     ] Processing CMAKE command find_package ['PackageHandleStandardArgs', 'REQUIRED']
{
    "writable_table_extension": {
        "4.5.1-273-g65fbc8413-dirty": {
            "dependencies": {},
            "source": "cmake",
            "is_source_package": true
        }
    }
}