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

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

Open
r-angel opened this issue Mar 25, 2015 · 1 comment
Open

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

r-angel opened this issue Mar 25, 2015 · 1 comment

Comments

@r-angel
Copy link

r-angel commented Mar 25, 2015

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?

@patrykk
Copy link

patrykk commented Sep 4, 2015

please check repo: https://github.com/patrykk/smartcam
Smartcam support up to 4.0 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

2 participants