← Back to team overview

rohc team mailing list archive

Re: [Question #707783]: How to install Rohc on Ubuntu 20.04 with kernel version 5.15

 

Question #707783 on rohc changed:
https://answers.launchpad.net/rohc/+question/707783

    Status: Open => Answered

Mikhail Gruzdev proposed the following answer:
shujingwang,

Just remove EXPORT_SYMBOL_GPL(rohc_buf_*); lines from linux/kmod.c .

On 8/30/23, shujingwang <question707783@xxxxxxxxxxxxxxxxxxxxx> wrote:
> New question #707783 on rohc:
> https://answers.launchpad.net/rohc/+question/707783
>
> I encountered an error when trying to install Rohc to Ubuntu 20.04 kernel
> version 5.15:
> Making all in linux
> make[2]: 进入目录“/data/work/tmp/rohc/linux”
> make -C /lib/modules/5.15.98/build M=/data/work/tmp/rohc/linux/kmod
> make[3]: 进入目录“/usr/src/linux-5.15.98”
>   CC [M]  /data/work/tmp/rohc/linux/kmod/../kmod.o
>   LD [M]  /data/work/tmp/rohc/linux/kmod/rohc.o
>   CC [M]  /data/work/tmp/rohc/linux/kmod/../kmod_test.o
> /data/work/tmp/rohc/linux/kmod/../kmod_test.c: In function ‘rohc_proc_init’:
> /data/work/tmp/rohc/linux/kmod/../kmod_test.c:992:14: error: passing
> argument 4 of ‘proc_create’ from incompatible pointer type
> [-Werror=incompatible-pointer-types]
>   992 |        NULL, &rohc_proc_comp_in_fops);
>       |              ^~~~~~~~~~~~~~~~~~~~~~~
>       |              |
>       |              const struct file_operations *
> In file included from /data/work/tmp/rohc/linux/kmod/../kmod_test.c:31:
> ./include/linux/proc_fs.h:110:24: note: expected ‘const struct proc_ops *’
> but argument is of type ‘const struct file_operations *’
>   110 | struct proc_dir_entry *proc_create(const char *name, umode_t mode,
> struct proc_dir_entry *parent, const struct proc_ops *proc_ops);
>       |                        ^~~~~~~~~~~
> /data/work/tmp/rohc/linux/kmod/../kmod_test.c:1001:14: error: passing
> argument 4 of ‘proc_create’ from incompatible pointer type
> [-Werror=incompatible-pointer-types]
>  1001 |        NULL, &rohc_proc_comp_out_fops);
>       |              ^~~~~~~~~~~~~~~~~~~~~~~~
>       |              |
>       |              const struct file_operations *
> In file included from /data/work/tmp/rohc/linux/kmod/../kmod_test.c:31:
> ./include/linux/proc_fs.h:110:24: note: expected ‘const struct proc_ops *’
> but argument is of type ‘const struct file_operations *’
>   110 | struct proc_dir_entry *proc_create(const char *name, umode_t mode,
> struct proc_dir_entry *parent, const struct proc_ops *proc_ops);
>       |                        ^~~~~~~~~~~
> /data/work/tmp/rohc/linux/kmod/../kmod_test.c:1010:14: error: passing
> argument 4 of ‘proc_create’ from incompatible pointer type
> [-Werror=incompatible-pointer-types]
>  1010 |        NULL, &rohc_proc_decomp_in_fops);
>       |              ^~~~~~~~~~~~~~~~~~~~~~~~~
>       |              |
>       |              const struct file_operations *
> In file included from /data/work/tmp/rohc/linux/kmod/../kmod_test.c:31:
> ./include/linux/proc_fs.h:110:24: note: expected ‘const struct proc_ops *’
> but argument is of type ‘const struct file_operations *’
>   110 | struct proc_dir_entry *proc_create(const char *name, umode_t mode,
> struct proc_dir_entry *parent, const struct proc_ops *proc_ops);
>       |                        ^~~~~~~~~~~
> /data/work/tmp/rohc/linux/kmod/../kmod_test.c:1019:14: error: passing
> argument 4 of ‘proc_create’ from incompatible pointer type
> [-Werror=incompatible-pointer-types]
>  1019 |        NULL, &rohc_proc_decomp_out_fops);
>       |              ^~~~~~~~~~~~~~~~~~~~~~~~~~
>       |              |
>       |              const struct file_operations *
> In file included from /data/work/tmp/rohc/linux/kmod/../kmod_test.c:31:
> ./include/linux/proc_fs.h:110:24: note: expected ‘const struct proc_ops *’
> but argument is of type ‘const struct file_operations *’
>   110 | struct proc_dir_entry *proc_create(const char *name, umode_t mode,
> struct proc_dir_entry *parent, const struct proc_ops *proc_ops);
>       |                        ^~~~~~~~~~~
> cc1: some warnings being treated as errors
> make[4]: ***
> [scripts/Makefile.build:289:/data/work/tmp/rohc/linux/kmod/../kmod_test.o]
> 错误 1
> make[3]: *** [Makefile:1903:/data/work/tmp/rohc/linux/kmod] 错误 2
> make[3]: 离开目录“/usr/src/linux-5.15.98”
> make[2]: *** [Makefile:483:all] 错误 2
> make[2]: 离开目录“/data/work/tmp/rohc/linux”
> make[1]: *** [Makefile:732:all-recursive] 错误 1
> make[1]: 离开目录“/data/work/tmp/rohc”
> make: *** [Makefile:617:all] 错误 2
>
>
>
>
> I have resolved the issue with reference to
> https://stackoverflow.com/questions/61295277/passing-argument-4-of-proc-create-from-incompatible-pointer-type,
> but I have encountered new issues:
>
> make[3]: 进入目录“/usr/src/linux-5.15.98”
>   CC [M]  /data/work/tmp/rohc/linux/kmod/../kmod.o
>   LD [M]  /data/work/tmp/rohc/linux/kmod/rohc.o
>   MODPOST /data/work/tmp/rohc/linux/kmod/Module.symvers
> ERROR: modpost: "rohc_buf_is_empty" [/data/work/tmp/rohc/linux/kmod/rohc] is
> a static EXPORT_SYMBOL_GPL
> ERROR: modpost: "rohc_buf_is_malformed"
> [/data/work/tmp/rohc/linux/kmod/rohc] is a static EXPORT_SYMBOL_GPL
> ERROR: modpost: "rohc_buf_append" [/data/work/tmp/rohc/linux/kmod/rohc] is a
> static EXPORT_SYMBOL_GPL
> ERROR: modpost: "rohc_buf_avail_len" [/data/work/tmp/rohc/linux/kmod/rohc]
> is a static EXPORT_SYMBOL_GPL
> ERROR: modpost: "rohc_buf_append_buf" [/data/work/tmp/rohc/linux/kmod/rohc]
> is a static EXPORT_SYMBOL_GPL
> ERROR: modpost: "rohc_buf_push" [/data/work/tmp/rohc/linux/kmod/rohc] is a
> static EXPORT_SYMBOL_GPL
> ERROR: modpost: "rohc_buf_data" [/data/work/tmp/rohc/linux/kmod/rohc] is a
> static EXPORT_SYMBOL_GPL
> ERROR: modpost: "rohc_buf_data_at" [/data/work/tmp/rohc/linux/kmod/rohc] is
> a static EXPORT_SYMBOL_GPL
> ERROR: modpost: "rohc_buf_prepend" [/data/work/tmp/rohc/linux/kmod/rohc] is
> a static EXPORT_SYMBOL_GPL
> ERROR: modpost: "rohc_buf_reset" [/data/work/tmp/rohc/linux/kmod/rohc] is a
> static EXPORT_SYMBOL_GPL
> ERROR: modpost: "rohc_buf_pull" [/data/work/tmp/rohc/linux/kmod/rohc] is a
> static EXPORT_SYMBOL_GPL
> make[4]: ***
> [scripts/Makefile.modpost:133:/data/work/tmp/rohc/linux/kmod/Module.symvers]
> 错误 1
> make[4]: *** 正在删除文件“/data/work/tmp/rohc/linux/kmod/Module.symvers”
> make[3]: *** [Makefile:1818:modules] 错误 2
> make[3]: 离开目录“/usr/src/linux-5.15.98”
> make[2]: *** [Makefile:483:all] 错误 2
> make[2]: 离开目录“/data/work/tmp/rohc/linux”
> make[1]: *** [Makefile:732:all-recursive] 错误 1
> make[1]: 离开目录“/data/work/tmp/rohc”
> make: *** [Makefile:617:all] 错误 2
>
>
>
>
> Did anyone tell me how to solve this problem?TKS
>
>
>
> --
> You received this question notification because your team ROHC Team is
> an answer contact for rohc.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~rohc
> Post to     : rohc@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~rohc
> More help   : https://help.launchpad.net/ListHelp
>

-- 
You received this question notification because your team ROHC Team is
an answer contact for rohc.