Hello Everyone,
I was trying to build a CodeQL for an embedded C codebase using codeql database create codeql_db --language=cpp --command='bash ./build.sh'” and soon realized that the built database contains only a small portion of the codebase.
I looked in build-tracker.log to check that all the compilers used are detected correctly and it seems that this is not the case for a one of the build steps that is using a custom built clang. I get this error message for several hundreds c file:
[E 12:25:02 36628] CodeQL C/C++ Extractor 1.28.0-SNAPSHOT
[E 12:25:02 36628] Current directory: REDACTED
[E 12:25:02 36628] Command: /opt/codeql/cpp/tools/linux64/extractor --mimic REDACTED/clang-9 --target=aarch64-linux-gnu -std=gnu99 -Werror -fdiagnostics-show-option -Wall -Wcast-align -Werror-implicit-function-declaration -Wextra -Wfloat-equal -Wformat-nonliteral -Wformat-security -Wformat=2 -Winit-self -Wmissing-declarations -Wmissing-format-attribute -Wmissing-include-dirs -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wshadow -Wstrict-prototypes -Wswitch-default -Wwrite-strings -Wno-missing-field-initializers -Wno-format-zero-length -Waggregate-return -Wredundant-decls -Wold-style-definition -Wstrict-aliasing=2 -Wundef -Wno-language-extension-token -Wno-gnu-zero-variadic-macro-arguments -O0 -ffunction-sections -fdata-sections -pipe -gdwarf-2 -mcpu=cortex-a76 -mstrict-align -mgeneral-regs-only -mcmodel=large -MD -MF REDACTED/.FILENAME.o.d -MT REDACTED/FILENAME.o -nostdinc REDACTED_INCLUDES -c REDACTED/FILENAME.c -o REDACTED/FILENAME.o
[E 12:25:02 36628] Not a compiler; exiting. Reason: did not produce a meaningful object file
[T 12:25:02 36561] Extractor terminated with exit code 0.
Reading github/codeql-cli-binaries#70 (comment) I'm left wondering if this could be the issue I'm facing?
Any ideas on how to move forward?
Thanks again,
Carlo
Hello Everyone,
I was trying to build a CodeQL for an embedded C codebase using
codeql database create codeql_db --language=cpp --command='bash ./build.sh'”and soon realized that the built database contains only a small portion of the codebase.I looked in build-tracker.log to check that all the compilers used are detected correctly and it seems that this is not the case for a one of the build steps that is using a custom built clang. I get this error message for several hundreds c file:
Reading github/codeql-cli-binaries#70 (comment) I'm left wondering if this could be the issue I'm facing?
Any ideas on how to move forward?
Thanks again,
Carlo