Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't build on Alma Linux 9.4 #25

Open
gaedeb opened this issue May 9, 2024 · 3 comments
Open

Can't build on Alma Linux 9.4 #25

gaedeb opened this issue May 9, 2024 · 3 comments
Labels
help wanted Extra attention is needed patch-available there is an patch available which needs further changes

Comments

@gaedeb
Copy link

gaedeb commented May 9, 2024

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!

@abbbi
Copy link
Owner

abbbi commented May 10, 2024

it looks to me like there might have been noone either yet trying to build on kernel version 5.14 or maybe rhel or alikes have backported patches from higher kernel versions to alma linux 9.4?

I dont know and i dont want to dig that deep. I have ripped off all ifdefs to a workable version within this
patch:

6366160

which makes it build at least, of course breaking all other versions.

Someone must figure out the right #ifdefs for this kernel (or special patched kernel version?) which doesnt
break building on other kernel versions.

@abbbi abbbi added help wanted Extra attention is needed patch-available there is an patch available which needs further changes labels May 10, 2024
@gaedeb
Copy link
Author

gaedeb commented May 10, 2024

Thank you Michael!

I do not think the problem is with nullfs.
https://github.com/torvalds/linux/blob/v5.14/include/linux/dcache.h

dentry is what I am expecting using a kernel 5.14.0

I will come back as soon as someone from Alma Community will replies to my question.
https://almalinux.discourse.group/t/dcache-header-mismatch-building-nullfs/4000

I could build the kernel module modifying in the right place the dentry with file.

Thanks again!

@abbbi
Copy link
Owner

abbbi commented May 10, 2024

I guess the kernel in Alma has some patches from newer Kernels backportet.. looking at the Alma kernel source Package should bring some insights

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed patch-available there is an patch available which needs further changes
Projects
None yet
Development

No branches or pull requests

2 participants