I run sparse on linux kernel.
But it throws the following error:
Run sparse on linux:
lovegcy@knltest-VirtualBox:~/git_root/linux$ make C=2
make[1]: Nothing to be done for `all'.
HOSTCC arch/x86/tools/relocs_32.o
HOSTCC arch/x86/tools/relocs_64.o
HOSTCC arch/x86/tools/relocs_common.o
HOSTLD arch/x86/tools/relocs
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
CC kernel/bounds.s
GEN include/generated/bounds.h
CC arch/x86/kernel/asm-offsets.s
GEN include/generated/asm-offsets.h
CALL scripts/checksyscalls.sh
CHECK scripts/mod/empty.c
/bin/sh: 1: sparse: not found
make[2]: * [scripts/mod/empty.o] Error 127
make[1]: [scripts/mod] Error 2
make: ** [scripts] Error 2
Here is the sparse install log:
lovegcy@knltest-VirtualBox:~/git_root/sparse$ make install
/bin/sh: 1: llvm-config: not found
Makefile:79: Your system does not have llvm, disabling sparse-llvm
INSTALL ‘sparse’ -> ‘/home/lovegcy/bin/sparse’
INSTALL ‘cgcc’ -> ‘/home/lovegcy/bin/cgcc’
INSTALL ‘c2xml’ -> ‘/home/lovegcy/bin/c2xml’
INSTALL ‘test-inspect’ -> ‘/home/lovegcy/bin/test-inspect’
INSTALL ‘sparse.1’ -> ‘/home/lovegcy/share/man/man1/sparse.1’
INSTALL ‘cgcc.1’ -> ‘/home/lovegcy/share/man/man1/cgcc.1’
INSTALL ‘libsparse.a’ -> ‘/home/lovegcy/lib/libsparse.a’
INSTALL ‘token.h’ -> ‘/home/lovegcy/include/sparse/token.h’
INSTALL ‘parse.h’ -> ‘/home/lovegcy/include/sparse/parse.h’
INSTALL ‘lib.h’ -> ‘/home/lovegcy/include/sparse/lib.h’
INSTALL ‘symbol.h’ -> ‘/home/lovegcy/include/sparse/symbol.h’
INSTALL ‘scope.h’ -> ‘/home/lovegcy/include/sparse/scope.h’
INSTALL ‘expression.h’ -> ‘/home/lovegcy/include/sparse/expression.h’
INSTALL ‘target.h’ -> ‘/home/lovegcy/include/sparse/target.h’
INSTALL ‘linearize.h’ -> ‘/home/lovegcy/include/sparse/linearize.h’
INSTALL ‘bitmap.h’ -> ‘/home/lovegcy/include/sparse/bitmap.h’
INSTALL ‘ident-list.h’ -> ‘/home/lovegcy/include/sparse/ident-list.h’
INSTALL ‘compat.h’ -> ‘/home/lovegcy/include/sparse/compat.h’
INSTALL ‘flow.h’ -> ‘/home/lovegcy/include/sparse/flow.h’
INSTALL ‘allocate.h’ -> ‘/home/lovegcy/include/sparse/allocate.h’
INSTALL ‘storage.h’ -> ‘/home/lovegcy/include/sparse/storage.h’
INSTALL ‘ptrlist.h’ -> ‘/home/lovegcy/include/sparse/ptrlist.h’
INSTALL ‘dissect.h’ -> ‘/home/lovegcy/include/sparse/dissect.h’
INSTALL ‘sparse.pc’ -> ‘/home/lovegcy/lib/pkgconfig/sparse.pc’
More: The kernel is already compiled.
Could anyone give some clue?
Thank you very much!