Skip to content

Instantly share code, notes, and snippets.

@hiboma
Created June 20, 2012 15:18
Show Gist options
  • Save hiboma/2960430 to your computer and use it in GitHub Desktop.
Save hiboma/2960430 to your computer and use it in GitHub Desktop.
make tpe-lkm on CentOS4
$ make
make -C /usr/src/kernels/2.6.9-103.EL-x86_64 M=/home/hiroya/tpe-lkm modules
make[1]: Entering directory `/usr/src/kernels/2.6.9-103.EL-x86_64'
  CC [M]  /home/hiroya/tpe-lkm/core.o
In file included from /home/hiroya/tpe-lkm/core.c:2:
/home/hiroya/tpe-lkm/module.h:59: error: syntax error before "bool"
/home/hiroya/tpe-lkm/module.h:59: warning: no semicolon at end of struct or union
/home/hiroya/tpe-lkm/module.h:63: error: syntax error before "found"
/home/hiroya/tpe-lkm/module.h:63: warning: type defaults to `int' in declaration of `found'
/home/hiroya/tpe-lkm/module.h:63: warning: data definition has no type or storage class
/home/hiroya/tpe-lkm/module.h:64: error: syntax error before "hijacked"
/home/hiroya/tpe-lkm/module.h:64: warning: type defaults to `int' in declaration of `hijacked'
/home/hiroya/tpe-lkm/module.h:64: warning: data definition has no type or storage class
/home/hiroya/tpe-lkm/module.h:66: error: syntax error before '}' token
make[2]: *** [/home/hiroya/tpe-lkm/core.o] Error 1
make[1]: *** [_module_/home/hiroya/tpe-lkm] Error 2
make[1]: Leaving directory `/usr/src/kernels/2.6.9-103.EL-x86_64'
make: *** [tpe.ko] Error 2
@hiboma
Copy link
Author

hiboma commented Jun 20, 2012

$ make
make -C /usr/src/kernels/2.6.9-103.EL-x86_64 M=/home/hiroya/tpe-lkm modules
make[1]: Entering directory `/usr/src/kernels/2.6.9-103.EL-x86_64'
  CC [M]  /home/hiroya/tpe-lkm/core.o
  CC [M]  /home/hiroya/tpe-lkm/module.o
  CC [M]  /home/hiroya/tpe-lkm/security.o
  CC [M]  /home/hiroya/tpe-lkm/symbols.o
/home/hiroya/tpe-lkm/symbols.c: In function `find_symbol_address':
/home/hiroya/tpe-lkm/symbols.c:220: warning: implicit declaration of function `init_utsname'
/home/hiroya/tpe-lkm/symbols.c:220: warning: initialization makes pointer from integer without a cast
/home/hiroya/tpe-lkm/symbols.c:225: warning: assignment discards qualifiers from pointer target type
  CC [M]  /home/hiroya/tpe-lkm/malloc.o
  CC [M]  /home/hiroya/tpe-lkm/sysctl.o
  CC [M]  /home/hiroya/tpe-lkm/hijacks.o
/home/hiroya/tpe-lkm/hijacks.c: In function `tpe_lookup_address':
/home/hiroya/tpe-lkm/hijacks.c:83: error: `pud_t' undeclared (first use in this function)
/home/hiroya/tpe-lkm/hijacks.c:83: error: (Each undeclared identifier is reported only once
/home/hiroya/tpe-lkm/hijacks.c:83: error: for each function it appears in.)
/home/hiroya/tpe-lkm/hijacks.c:83: error: `pud' undeclared (first use in this function)
/home/hiroya/tpe-lkm/hijacks.c:84: warning: ISO C90 forbids mixed declarations and code
/home/hiroya/tpe-lkm/hijacks.c:88: warning: implicit declaration of function `pud_offset'
/home/hiroya/tpe-lkm/hijacks.c:89: warning: implicit declaration of function `pud_present'
make[2]: *** [/home/hiroya/tpe-lkm/hijacks.o] Error 1
make[1]: *** [_module_/home/hiroya/tpe-lkm] Error 2
make[1]: Leaving directory `/usr/src/kernels/2.6.9-103.EL-x86_64'
make: *** [tpe.ko] Error 2

@hiboma
Copy link
Author

hiboma commented Jun 21, 2012

$ make
make: Warning: File `Makefile' has modification time 9.9e+04 s in the future
make -C /usr/src/kernels/2.6.9-103.EL-x86_64 M=/home/hiroya/tpe-lkm modules
make[1]: Entering directory `/usr/src/kernels/2.6.9-103.EL-x86_64'
make[2]: Warning: File `/home/hiroya/tpe-lkm/Makefile' has modification time 9.9e+04 s in the future
  CC [M]  /home/hiroya/tpe-lkm/core.o
  CC [M]  /home/hiroya/tpe-lkm/module.o
  CC [M]  /home/hiroya/tpe-lkm/security.o
  CC [M]  /home/hiroya/tpe-lkm/symbols.o
/home/hiroya/tpe-lkm/symbols.c: In function `find_symbol_address':
/home/hiroya/tpe-lkm/symbols.c:222: warning: implicit declaration of function `init_utsname'
/home/hiroya/tpe-lkm/symbols.c:222: warning: initialization makes pointer from integer without a cast
/home/hiroya/tpe-lkm/symbols.c:227: warning: assignment discards qualifiers from pointer target type
  CC [M]  /home/hiroya/tpe-lkm/malloc.o
  CC [M]  /home/hiroya/tpe-lkm/sysctl.o
  CC [M]  /home/hiroya/tpe-lkm/hijacks.o
  CC [M]  /home/hiroya/tpe-lkm/arch/x86/lib/inat.o
  CC [M]  /home/hiroya/tpe-lkm/arch/x86/lib/insn.o
  LD [M]  /home/hiroya/tpe-lkm/tpe.o
  Building modules, stage 2.
  MODPOST
*** Warning: "init_utsname" [/home/hiroya/tpe-lkm/tpe.ko] undefined!
  CC      /home/hiroya/tpe-lkm/tpe.mod.o
  LD [M]  /home/hiroya/tpe-lkm/tpe.ko
make[1]: Leaving directory `/usr/src/kernels/2.6.9-103.EL-x86_64'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment