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

Unable to build for 3.10.108/3.14.29: "storage size of ‘kiocb’ isn’t known" #62

Open
MilhouseVH opened this issue Jun 12, 2018 · 4 comments

Comments

@MilhouseVH
Copy link
Contributor

Since 9e9e5dd on 12 March 2018 this driver no longer builds for kernels 3.10.y and 3.14.y:

/home/neil/projects/LibreELEC.tv/build.LibreELEC-WeTek_Core.arm-9.0-devel-next/RTL8192DU-a9deaecccf/os_dep/osdep_service.c: In function ‘new_sync_read’:
/home/neil/projects/LibreELEC.tv/build.LibreELEC-WeTek_Core.arm-9.0-devel-next/RTL8192DU-a9deaecccf/os_dep/osdep_service.c:47:22: error: storage size of ‘kiocb’ isn’t known
         struct kiocb kiocb;
                      ^~~~~
/home/neil/projects/LibreELEC.tv/build.LibreELEC-WeTek_Core.arm-9.0-devel-next/RTL8192DU-a9deaecccf/os_dep/osdep_service.c:53:9: error: implicit declaration of function ‘init_sync_kiocb’; did you mean ‘bus_sync_io’? [-Werror=implicit-function-declaration]
         init_sync_kiocb(&kiocb, filp);
         ^~~~~~~~~~~~~~~
         bus_sync_io
...
/home/neil/projects/LibreELEC.tv/build.LibreELEC-WeTek_Core.arm-9.0-devel-next/RTL8192DU-a9deaecccf/os_dep/osdep_service.c:57:15: error: implicit declaration of function ‘call_read_iter’; did you mean ‘file_read_actor’? [-Werror=implicit-function-declaration]
         ret = call_read_iter(filp, &kiocb, &iter);
               ^~~~~~~~~~~~~~
               file_read_actor
/home/neil/projects/LibreELEC.tv/build.LibreELEC-WeTek_Core.arm-9.0-devel-next/RTL8192DU-a9deaecccf/os_dep/osdep_service.c: In function ‘__vfs_read_alt’:
/home/neil/projects/LibreELEC.tv/build.LibreELEC-WeTek_Core.arm-9.0-devel-next/RTL8192DU-a9deaecccf/os_dep/osdep_service.c:68:30: error: ‘const struct file_operations’ has no member named ‘read_iter’; did you mean ‘readdir’?
         else if (file->f_op->read_iter)
                              ^~~~~~~~~
                              readdir

Full build log: http://ix.io/1d8c

PR #61 allows the build to succeed with current HEAD (a9deaec), but that PR is closed for some reason, so I'm not sure if the fix is correct (I don't have any hardware with which to test the driver). There's a possibly related issue: #60, which refers to kernel 4.9.

@MilhouseVH
Copy link
Contributor Author

Actually I'm not even sure if this driver is going to be usable even though it builds with #61 - there's a bunch of undefined symbol WARNINGs at the end of the build when building against 3.10.108 and 3.14.29:

WARNING: "wiphy_free" [/home/neil/projects/LibreELEC.tv/build.LibreELEC-WeTek_Core.arm-9.0-devel-next/RTL8192DU-a9deaec/8192du.ko] undefined!
WARNING: "ieee80211_frequency_to_channel" [/home/neil/projects/LibreELEC.tv/build.LibreELEC-WeTek_Core.arm-9.0-devel-next/RTL8192DU-a9deaec/8192du.ko] undefined!
WARNING: "cfg80211_inform_bss_frame" [/home/neil/projects/LibreELEC.tv/build.LibreELEC-WeTek_Core.arm-9.0-devel-next/RTL8192DU-a9deaec/8192du.ko] undefined!
WARNING: "cfg80211_rx_mgmt" [/home/neil/projects/LibreELEC.tv/build.LibreELEC-WeTek_Core.arm-9.0-devel-next/RTL8192DU-a9deaec/8192du.ko] undefined!
WARNING: "cfg80211_del_sta" [/home/neil/projects/LibreELEC.tv/build.LibreELEC-WeTek_Core.arm-9.0-devel-next/RTL8192DU-a9deaec/8192du.ko] undefined!
WARNING: "cfg80211_mgmt_tx_status" [/home/neil/projects/LibreELEC.tv/build.LibreELEC-WeTek_Core.arm-9.0-devel-next/RTL8192DU-a9deaec/8192du.ko] undefined!
WARNING: "__ieee80211_get_channel" [/home/neil/projects/LibreELEC.tv/build.LibreELEC-WeTek_Core.arm-9.0-devel-next/RTL8192DU-a9deaec/8192du.ko] undefined!
WARNING: "cfg80211_get_bss" [/home/neil/projects/LibreELEC.tv/build.LibreELEC-WeTek_Core.arm-9.0-devel-next/RTL8192DU-a9deaec/8192du.ko] undefined!
WARNING: "wiphy_unregister" [/home/neil/projects/LibreELEC.tv/build.LibreELEC-WeTek_Core.arm-9.0-devel-next/RTL8192DU-a9deaec/8192du.ko] undefined!
WARNING: "cfg80211_connect_result" [/home/neil/projects/LibreELEC.tv/build.LibreELEC-WeTek_Core.arm-9.0-devel-next/RTL8192DU-a9deaec/8192du.ko] undefined!
WARNING: "cfg80211_michael_mic_failure" [/home/neil/projects/LibreELEC.tv/build.LibreELEC-WeTek_Core.arm-9.0-devel-next/RTL8192DU-a9deaec/8192du.ko] undefined!
WARNING: "wiphy_apply_custom_regulatory" [/home/neil/projects/LibreELEC.tv/build.LibreELEC-WeTek_Core.arm-9.0-devel-next/RTL8192DU-a9deaec/8192du.ko] undefined!
WARNING: "cfg80211_roamed" [/home/neil/projects/LibreELEC.tv/build.LibreELEC-WeTek_Core.arm-9.0-devel-next/RTL8192DU-a9deaec/8192du.ko] undefined!
WARNING: "cfg80211_put_bss" [/home/neil/projects/LibreELEC.tv/build.LibreELEC-WeTek_Core.arm-9.0-devel-next/RTL8192DU-a9deaec/8192du.ko] undefined!
WARNING: "wiphy_new" [/home/neil/projects/LibreELEC.tv/build.LibreELEC-WeTek_Core.arm-9.0-devel-next/RTL8192DU-a9deaec/8192du.ko] undefined!
WARNING: "wiphy_register" [/home/neil/projects/LibreELEC.tv/build.LibreELEC-WeTek_Core.arm-9.0-devel-next/RTL8192DU-a9deaec/8192du.ko] undefined!
WARNING: "cfg80211_ready_on_channel" [/home/neil/projects/LibreELEC.tv/build.LibreELEC-WeTek_Core.arm-9.0-devel-next/RTL8192DU-a9deaec/8192du.ko] undefined!
WARNING: "cfg80211_disconnected" [/home/neil/projects/LibreELEC.tv/build.LibreELEC-WeTek_Core.arm-9.0-devel-next/RTL8192DU-a9deaec/8192du.ko] undefined!
WARNING: "cfg80211_new_sta" [/home/neil/projects/LibreELEC.tv/build.LibreELEC-WeTek_Core.arm-9.0-devel-next/RTL8192DU-a9deaec/8192du.ko] undefined!
WARNING: "cfg80211_remain_on_channel_expired" [/home/neil/projects/LibreELEC.tv/build.LibreELEC-WeTek_Core.arm-9.0-devel-next/RTL8192DU-a9deaec/8192du.ko] undefined!
WARNING: "cfg80211_scan_done" [/home/neil/projects/LibreELEC.tv/build.LibreELEC-WeTek_Core.arm-9.0-devel-next/RTL8192DU-a9deaec/8192du.ko] undefined!

The current version of the driver that is used, 5cb0486, also has these same warnings, which is worrying. :)

Full build log (with #61): http://ix.io/1d8q (3.10.108 kernel)

@5schatten
Copy link

5schatten commented Mar 20, 2019

@lwfinger
Not quite the same error but probably linked to this.

Build log:
https://pastebin.com/pZnMDc69

/home/supervisedthinking/git/libreelec-rr/LibreELEC.tv/build.LibreELEC-KVIM.arm-9.1-devel/RTL8192DU-3105cd3179d5e60a7aa675611a3592a45b29bfcb/os_dep/osdep_service.c: In function ‘call_read_iter’:
/home/supervisedthinking/git/libreelec-rr/LibreELEC.tv/build.LibreELEC-KVIM.arm-9.1-devel/RTL8192DU-3105cd3179d5e60a7aa675611a3592a45b29bfcb/os_dep/osdep_service.c:41:19: error: ‘const struct file_operations’ has no member named ‘read_iter’
  return file->f_op->read_iter(kio, iter);

@lwfinger
Copy link
Owner

Backporting a driver to very old kernels is a difficult problem. That "read_iter" member was not added until 3.16. I generally try to support kernels 4.0 or later unless Realtek has support for older kernels.

Is it possible for you to use a later kernel?

@5schatten
Copy link

Well in that case I guess it's not worth the hassle since the AML Kernel 3.14.29 is basically a dead end. I'll create a separate package with a older driver version then for this Kernel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants