Can't build on Alma Linux 9.4
- 主要语言
- C
- 星标
- 320
- 派生
- 12
- PR 合并指标
- 30 天内没有已合并 PR
描述
I have already opened a ticket to Alma Support.
I can't build the module because of this error:
```
make -C /lib/modules/5.14.0-427.13.1.el9_4.x86_64/build M=/home/toto/nullfsvfs-master modules
make[1]: Entering directory '/usr/src/kernels/5.14.0-427.13.1.el9_4.x86_64'
CC [M] /home/toto/nullfsvfs-master/nullfs.o
/home/toto/nullfsvfs-master/nullfs.c: In function ‘nullfs_tmpfile’:
/home/toto/nullfsvfs-master/nullfs.c:560:15: error: passing argument 1 of ‘d_tmpfile’ from incompatible pointer type [-Werror=incompatible-pointer-types]
560 | d_tmpfile(dentry, inode);
| ^~~~~~
| |
| struct dentry *
In file included from ./include/linux/fs.h:8,
from ./include/linux/seq_file.h:12,
from /home/toto/nullfsvfs-master/nullfs.c:30:
./include/linux/dcache.h:254:23: note: expected ‘struct file *’ but argument is of type ‘struct dentry *’
254 | extern void d_tmpfile(struct file *, struct inode *);
| ^~~~~~~~~~~~~
/home/toto/nullfsvfs-master/nullfs.c: At top level:
/home/toto/nullfsvfs-master/nullfs.c:581:19: error: initialization of ‘int (*)(struct user_namespace *, struct inode *, struct file *, umode_t)’ {aka ‘int (*)(struct user_namespace *, struct inode *, struct file *, short unsigned int)’} from incompatible pointer type ‘int (*)(struct user_namespace *, struct inode *, struct dentry *, umode_t)’ {aka ‘int (*)(struct user_namespace *, struct inode *, struct dentry *, short unsigned int)’} [-Werror=incompatible-pointer-types]
581 | .tmpfile = nullfs_tmpfile,
| ^~~~~~~~~~~~~~
/home/toto/nullfsvfs-master/nullfs.c:581:19: note: (near initialization for ‘nullfs_dir_inode_operations.tmpfile’)
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:299: /home/toto/nullfsvfs-master/nullfs.o] Error 1
make[1]: *** [Makefile:1934: /home/toto/nullfsvfs-master] Error 2
make[1]: Leaving directory '/usr/src/kernels/5.14.0-427.13.1.el9_4.x86_64'
make: *** [Makefile:5: ko] Error 2
```
Kernel version is < 6.1.0:
5.14.0-427.13.1.el9_4.x86_64
still in the kernel header as long as I could see, the declaration of d_tmpfile is:
extern void d_tmpfile(struct file *, struct inode *);
hence the issue building the module.
Any idea?
Thanks!
贡献指南
这个仓库没有索引到贡献指南
调研方向
The error is in nullfs.c at line 560, where d_tmpfile is called with a dentry pointer instead of a file pointer. Check the kernel header to confirm the function signature, then adjust the call and the assignment to nullfs_dir_inode_operations.tmpfile. Test by building the module on a system with a similar kernel version.
由索引模型根据 Issue 内容生成。
评估
- 领域
- operating-systems
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 描述清楚
- 新手友好度
- 45/100