Skip to content

Cannot compile driver on Ubuntu 14.04.1 (kernel 3.16) #2

@r-angel

Description

@r-angel

Hi!

(sorry for doubleposting this as a new issue and a comment to the closed one)

I'm experiencing problems compiling the module with the previously mentioned patch applied as specified in the now closed issue on the current kernel in Ubuntu 14.04.1 (3.16.0-31-generic).

make -C /lib/modules/ uname -r /build M= pwd
make: Entering directory /usr/src/linux-headers-3.16.0-31-generic'
LD /root/ru/smartcam-1.4.0/driver_src/built-in.o
CC [M] /root/ru/smartcam-1.4.0/driver_src/smartcam.o
/root/ru/smartcam-1.4.0/driver_src/smartcam.c: In function ‘vidioc_dqbuf’:
/root/ru/smartcam-1.4.0/driver_src/smartcam.c:299:3: error: implicit declaration of function ‘interruptible_sleep_on_timeout’ [-Werror=implicit-function-declaration]
interruptible_sleep_on_timeout(&wq, HZ); /* wait max 1 second /
^
/root/ru/smartcam-1.4.0/driver_src/smartcam.c: At top level:
/root/ru/smartcam-1.4.0/driver_src/smartcam.c:548:2: warning: initialization from incompatible pointer type [enabled by default]
.open = smartcam_open,
^
/root/ru/smartcam-1.4.0/driver_src/smartcam.c:548:2: warning: (near initialization for ‘smartcam_fops.open’) [enabled by default]
/root/ru/smartcam-1.4.0/driver_src/smartcam.c:549:2: warning: initialization from incompatible pointer type [enabled by default]
.release = smartcam_release,
^
/root/ru/smartcam-1.4.0/driver_src/smartcam.c:549:2: warning: (near initialization for ‘smartcam_fops.release’) [enabled by default]
/root/ru/smartcam-1.4.0/driver_src/smartcam.c:567:2: warning: initialization from incompatible pointer type [enabled by default]
.vidioc_s_std = vidioc_s_std,
^
/root/ru/smartcam-1.4.0/driver_src/smartcam.c:567:2: warning: (near initialization for ‘smartcam_ioctl_ops.vidioc_s_std’) [enabled by default]
/root/ru/smartcam-1.4.0/driver_src/smartcam.c:576:2: warning: initialization from incompatible pointer type [enabled by default]
.vidioc_s_crop = vidioc_s_crop,
^
/root/ru/smartcam-1.4.0/driver_src/smartcam.c:576:2: warning: (near initialization for ‘smartcam_ioctl_ops.vidioc_s_crop’) [enabled by default]
cc1: some warnings being treated as errors
make[1]: *
* [/root/ru/smartcam-1.4.0/driver_src/smartcam.o] Error 1
make: *** [module/root/ru/smartcam-1.4.0/driver_src] Error 2
make: Leaving directory /usr/src/linux-headers-3.16.0-31-generic'

According to this bug on Launchpad, explicit declaration of functions in 3.16 kernel onwards might be the issue(?)
https://bugs.launchpad.net/ubuntu/+source/r8168/+bug/1363072

I can force the module to build by uncommenting:
-Werror-implicit-function-declaration
in file /usr/src/linux-headers-3.17.0-999-generic/Makefile

But the resulting module cannot be loaded due to unknown symbol, even after running !depmod -a" and loading "videodev" first.

Any patch for the current kernels?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions