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

Make execution failing on Raspbian kernel 6.1.0-rpi4-rpi-v7 #4

Open
Gabao-Farias opened this issue Dec 4, 2023 · 3 comments
Open

Comments

@Gabao-Farias
Copy link

Catching error on running make on Raspbian kernel 6.1.0-rpi4-rpi-v7, still, when trying to make in the 5.4.0-88-generic Kernel, all goes fine...

Output

make -C /lib/modules/6.1.0-rpi4-rpi-v7/build M=/home/usinasolar/repos/driver/xr-usb-serial
make[1]: Entering directory '/usr/src/linux-headers-6.1.0-rpi4-rpi-v7'
  CC [M]  /home/usinasolar/repos/driver/xr-usb-serial/xr_usb_serial_common.o
/home/usinasolar/repos/driver/xr-usb-serial/xr_usb_serial_common.c:1918:33: error: initialization of ‘unsigned int (*)(struct tty_struct *)’ from incompatible pointer type ‘int (*)(struct tty_struct *)’ [-Werror=incompatible-pointer-types]
 1918 |         .write_room =           xr_usb_serial_tty_write_room,
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/usinasolar/repos/driver/xr-usb-serial/xr_usb_serial_common.c:1918:33: note: (near initialization for ‘xr_usb_serial_ops.write_room’)
/home/usinasolar/repos/driver/xr-usb-serial/xr_usb_serial_common.c:1922:33: error: initialization of ‘unsigned int (*)(struct tty_struct *)’ from incompatible pointer type ‘int (*)(struct tty_struct *)’ [-Werror=incompatible-pointer-types]
 1922 |         .chars_in_buffer =      xr_usb_serial_tty_chars_in_buffer,
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/usinasolar/repos/driver/xr-usb-serial/xr_usb_serial_common.c:1922:33: note: (near initialization for ‘xr_usb_serial_ops.chars_in_buffer’)
/home/usinasolar/repos/driver/xr-usb-serial/xr_usb_serial_common.c:1924:33: error: initialization of ‘void (*)(struct tty_struct *, const struct ktermios *)’ from incompatible pointer type ‘void (*)(struct tty_struct *, struct ktermios *)’ [-Werror=incompatible-pointer-types]
 1924 |         .set_termios =          xr_usb_serial_tty_set_termios,
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/usinasolar/repos/driver/xr-usb-serial/xr_usb_serial_common.c:1924:33: note: (near initialization for ‘xr_usb_serial_ops.set_termios’)
/home/usinasolar/repos/driver/xr-usb-serial/xr_usb_serial_common.c: In function ‘xr_usb_serial_init’:
/home/usinasolar/repos/driver/xr-usb-serial/xr_usb_serial_common.c:1936:36: error: implicit declaration of function ‘alloc_tty_driver’ [-Werror=implicit-function-declaration]
 1936 |         xr_usb_serial_tty_driver = alloc_tty_driver(XR_USB_SERIAL_TTY_MINORS);
      |                                    ^~~~~~~~~~~~~~~~
/home/usinasolar/repos/driver/xr-usb-serial/xr_usb_serial_common.c:1936:34: warning: assignment to ‘struct tty_driver *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
 1936 |         xr_usb_serial_tty_driver = alloc_tty_driver(XR_USB_SERIAL_TTY_MINORS);
      |                                  ^
/home/usinasolar/repos/driver/xr-usb-serial/xr_usb_serial_common.c:1953:17: error: implicit declaration of function ‘put_tty_driver’ [-Werror=implicit-function-declaration]
 1953 |                 put_tty_driver(xr_usb_serial_tty_driver);
      |                 ^~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[2]: *** [/usr/src/linux-headers-6.1.0-rpi4-common-rpi/scripts/Makefile.build:255: /home/usinasolar/repos/driver/xr-usb-serial/xr_usb_serial_common.o] Error 1
make[1]: *** [/usr/src/linux-headers-6.1.0-rpi4-common-rpi/Makefile:2039: /home/usinasolar/repos/driver/xr-usb-serial] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-6.1.0-rpi4-rpi-v7'
make: *** [Makefile:9: all] Error 2

Also, tryed...

CFLAGS="-Wno-error=implicit-function-declaration"

...but no success so far.

Any ideia about what could be happening or any workaround? 🤔

@rucoder
Copy link
Contributor

rucoder commented Jun 8, 2024

@Gabao-Farias My PR #5 should fix this problem

@Freax13
Copy link
Contributor

Freax13 commented Jun 13, 2024

Any ideia about what could be happening or any workaround? 🤔

The kernel changes the signatures of its data types occasionally and the drivers must be adjusted for this. In order to fix this, one would have to compare the correct signatures in the kernel with what's contained in this driver and change the driver accordingly.

@Gabao-Farias My PR #5 should fix this problem

Those errors look unrelated.

@Freax13
Copy link
Contributor

Freax13 commented Jun 13, 2024

c29ea96 might help.

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