Seeed-Studio / seeed-linux-usbdisp

USB monitor Linux kernel driver.
GNU General Public License v2.0
8 stars 1 forks source link

make: *** [Makefile:30: modules] Error 2 #14

Closed aswinkr77 closed 1 year ago

aswinkr77 commented 1 year ago

Unable to make the driver. Getting error

    make -C /lib/modules/`uname -r`/build KCPPFLAGS="-I/home/pi/seeed-linux-usbdisp/drivers/linux-driver/src -I/home/pi/seeed-linux-usbdisp/drivers/linux-driver/../common" M=/home/pi/seeed-linux-usbdisp/drivers/linux-driver modules
make[1]: Entering directory '/usr/src/linux-headers-6.1.21-v8+'
  CC [M]  /home/pi/seeed-linux-usbdisp/drivers/linux-driver/src/fbhandlers.o
In file included from ./include/linux/list.h:5,
                 from ./include/linux/module.h:12,
                 from /home/pi/seeed-linux-usbdisp/drivers/linux-driver/src/inc/common.h:19,
                 from /home/pi/seeed-linux-usbdisp/drivers/linux-driver/src/fbhandlers.c:15:
/home/pi/seeed-linux-usbdisp/drivers/linux-driver/src/fbhandlers.c: In function ‘_display_defio_handler’:
/home/pi/seeed-linux-usbdisp/drivers/linux-driver/src/fbhandlers.c:265:40: error: ‘struct fb_deferred_io’ has no member named ‘pagelist’; did you mean ‘pagereflist’?
  265 |     list_for_each_entry(cur, &fbdefio->pagelist, lru) {
      |                                        ^~~~~~~~
./include/linux/container_of.h:18:26: note: in definition of macro ‘container_of’
   18 |  void *__mptr = (void *)(ptr);     \
      |                          ^~~
./include/linux/list.h:531:2: note: in expansion of macro ‘list_entry’
  531 |  list_entry((ptr)->next, type, member)
      |  ^~~~~~~~~~
./include/linux/list.h:674:13: note: in expansion of macro ‘list_first_entry’
  674 |  for (pos = list_first_entry(head, typeof(*pos), member); \
      |             ^~~~~~~~~~~~~~~~
/home/pi/seeed-linux-usbdisp/drivers/linux-driver/src/fbhandlers.c:265:5: note: in expansion of macro ‘list_for_each_entry’
  265 |     list_for_each_entry(cur, &fbdefio->pagelist, lru) {
      |     ^~~~~~~~~~~~~~~~~~~
In file included from ./include/linux/container_of.h:5,
                 from ./include/linux/list.h:5,
                 from ./include/linux/module.h:12,
                 from /home/pi/seeed-linux-usbdisp/drivers/linux-driver/src/inc/common.h:19,
                 from /home/pi/seeed-linux-usbdisp/drivers/linux-driver/src/fbhandlers.c:15:
/home/pi/seeed-linux-usbdisp/drivers/linux-driver/src/fbhandlers.c:265:40: error: ‘struct fb_deferred_io’ has no member named ‘pagelist’; did you mean ‘pagereflist’?
  265 |     list_for_each_entry(cur, &fbdefio->pagelist, lru) {
      |                                        ^~~~~~~~
./include/linux/build_bug.h:78:56: note: in definition of macro ‘__static_assert’
   78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
      |                                                        ^~~~
./include/linux/container_of.h:19:2: note: in expansion of macro ‘static_assert’
   19 |  static_assert(__same_type(*(ptr), ((type *)0)->member) || \
      |  ^~~~~~~~~~~~~
./include/linux/container_of.h:19:16: note: in expansion of macro ‘__same_type’
   19 |  static_assert(__same_type(*(ptr), ((type *)0)->member) || \
      |                ^~~~~~~~~~~
./include/linux/list.h:520:2: note: in expansion of macro ‘container_of’
  520 |  container_of(ptr, type, member)
      |  ^~~~~~~~~~~~
./include/linux/list.h:531:2: note: in expansion of macro ‘list_entry’
  531 |  list_entry((ptr)->next, type, member)
      |  ^~~~~~~~~~
./include/linux/list.h:674:13: note: in expansion of macro ‘list_first_entry’
  674 |  for (pos = list_first_entry(head, typeof(*pos), member); \
      |             ^~~~~~~~~~~~~~~~
/home/pi/seeed-linux-usbdisp/drivers/linux-driver/src/fbhandlers.c:265:5: note: in expansion of macro ‘list_for_each_entry’
  265 |     list_for_each_entry(cur, &fbdefio->pagelist, lru) {
      |     ^~~~~~~~~~~~~~~~~~~
/home/pi/seeed-linux-usbdisp/drivers/linux-driver/src/fbhandlers.c:265:40: error: ‘struct fb_deferred_io’ has no member named ‘pagelist’; did you mean ‘pagereflist’?
  265 |     list_for_each_entry(cur, &fbdefio->pagelist, lru) {
      |                                        ^~~~~~~~
./include/linux/build_bug.h:78:56: note: in definition of macro ‘__static_assert’
   78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
      |                                                        ^~~~
./include/linux/container_of.h:19:2: note: in expansion of macro ‘static_assert’
   19 |  static_assert(__same_type(*(ptr), ((type *)0)->member) || \
      |  ^~~~~~~~~~~~~
./include/linux/container_of.h:20:9: note: in expansion of macro ‘__same_type’
   20 |         __same_type(*(ptr), void),   \
      |         ^~~~~~~~~~~
./include/linux/list.h:520:2: note: in expansion of macro ‘container_of’
  520 |  container_of(ptr, type, member)
      |  ^~~~~~~~~~~~
./include/linux/list.h:531:2: note: in expansion of macro ‘list_entry’
  531 |  list_entry((ptr)->next, type, member)
      |  ^~~~~~~~~~
./include/linux/list.h:674:13: note: in expansion of macro ‘list_first_entry’
  674 |  for (pos = list_first_entry(head, typeof(*pos), member); \
      |             ^~~~~~~~~~~~~~~~
/home/pi/seeed-linux-usbdisp/drivers/linux-driver/src/fbhandlers.c:265:5: note: in expansion of macro ‘list_for_each_entry’
  265 |     list_for_each_entry(cur, &fbdefio->pagelist, lru) {
      |     ^~~~~~~~~~~~~~~~~~~
././include/linux/compiler_types.h:298:27: error: expression in static assertion is not an integer
  298 | #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
      |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/linux/build_bug.h:78:56: note: in definition of macro ‘__static_assert’
   78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
      |                                                        ^~~~
./include/linux/container_of.h:19:2: note: in expansion of macro ‘static_assert’
   19 |  static_assert(__same_type(*(ptr), ((type *)0)->member) || \
      |  ^~~~~~~~~~~~~
./include/linux/container_of.h:19:16: note: in expansion of macro ‘__same_type’
   19 |  static_assert(__same_type(*(ptr), ((type *)0)->member) || \
      |                ^~~~~~~~~~~
./include/linux/list.h:520:2: note: in expansion of macro ‘container_of’
  520 |  container_of(ptr, type, member)
      |  ^~~~~~~~~~~~
./include/linux/list.h:531:2: note: in expansion of macro ‘list_entry’
  531 |  list_entry((ptr)->next, type, member)
      |  ^~~~~~~~~~
./include/linux/list.h:674:13: note: in expansion of macro ‘list_first_entry’
  674 |  for (pos = list_first_entry(head, typeof(*pos), member); \
      |             ^~~~~~~~~~~~~~~~
/home/pi/seeed-linux-usbdisp/drivers/linux-driver/src/fbhandlers.c:265:5: note: in expansion of macro ‘list_for_each_entry’
  265 |     list_for_each_entry(cur, &fbdefio->pagelist, lru) {
      |     ^~~~~~~~~~~~~~~~~~~
In file included from ./include/linux/module.h:12,
                 from /home/pi/seeed-linux-usbdisp/drivers/linux-driver/src/inc/common.h:19,
                 from /home/pi/seeed-linux-usbdisp/drivers/linux-driver/src/fbhandlers.c:15:
/home/pi/seeed-linux-usbdisp/drivers/linux-driver/src/fbhandlers.c:265:40: error: ‘struct fb_deferred_io’ has no member named ‘pagelist’; did you mean ‘pagereflist’?
  265 |     list_for_each_entry(cur, &fbdefio->pagelist, lru) {
      |                                        ^~~~~~~~
./include/linux/list.h:665:20: note: in definition of macro ‘list_entry_is_head’
  665 |  (&pos->member == (head))
      |                    ^~~~
/home/pi/seeed-linux-usbdisp/drivers/linux-driver/src/fbhandlers.c:265:5: note: in expansion of macro ‘list_for_each_entry’
  265 |     list_for_each_entry(cur, &fbdefio->pagelist, lru) {
      |     ^~~~~~~~~~~~~~~~~~~
make[2]: *** [scripts/Makefile.build:250: /home/pi/seeed-linux-usbdisp/drivers/linux-driver/src/fbhandlers.o] Error 1
make[1]: *** [Makefile:2012: /home/pi/seeed-linux-usbdisp/drivers/linux-driver] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-6.1.21-v8+'
make: *** [Makefile:30: modules] Error 2

I'm using raspberry pi 4 64 bit.

bigbearishappy commented 1 year ago

This error is caused by the linux kernel upgrade.It's fixed in this commit. Closing the issue. And you can reopen it if you have any other further problem with this.