accelazh / hellofs

An example kernel filesystem implementation
Other
87 stars 25 forks source link

error on make #1

Open enogueiras opened 4 years ago

enogueiras commented 4 years ago

Hi, when I do a make, I get the following error:

_utnso@ubuntu-server:~/workspace/practica_filesystem/hellofs$ make make -C /lib/modules/4.4.0-116-generic/build M=/home/utnso/workspace/practica_filesystem/hellofs modules make[1]: Entering directory '/usr/src/linux-headers-4.4.0-116-generic' CC [M] /home/utnso/workspace/practica_filesystem/hellofs/khellofs.o /home/utnso/workspace/practica_filesystem/hellofs/khellofs.c:26:5: error: unknown field ‘readdir’ specified in initializer .readdir = hellofs_readdir, ^ /home/utnso/workspace/practica_filesystem/hellofs/khellofs.c:26:16: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types] .readdir = hellofs_readdir, ^ /home/utnso/workspace/practica_filesystem/hellofs/khellofs.c:26:16: note: (near initialization for ‘hellofs_dir_operations.llseek’) scripts/Makefile.build:258: recipe for target '/home/utnso/workspace/practica_filesystem/hellofs/khellofs.o' failed make[2]: [/home/utnso/workspace/practica_filesystem/hellofs/khellofs.o] Error 1 Makefile:1423: recipe for target 'module/home/utnso/workspace/practica_filesystem/hellofs' failed make[1]: [module/home/utnso/workspace/practicafilesystem/hellofs] Error 2 make[1]: Leaving directory '/usr/src/linux-headers-4.4.0-116-generic' Makefile:12: recipe for target 'ko' failed make: *** [ko] Error 2

Thanks.

swinghu commented 4 years ago

if you test in the follow environment,it will success

[db01@localhost test-mount-point-4380]$ uname -r
3.10.0-229.el7.x86_64

then install the rmp from local sudo yum install --downloaddir=/home/db01/workspace/env/ kernel-devel-3.10.0-229.el7.x86_64.rpm

from the belowing download address: sudo yum install --downloaddir=/home/db01/workspace/env/ kernel-devel-3.10.0-229.el7.x86_64.rpm