Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#29 Error Compiling Smartcam 1.4 Driver on Ubuntu 10.04 LTS

open
nobody
None
5
2014-10-29
2010-09-14
Anonymous
No

I am not very good at compiling but I usually get the job done by following instruction from Readme or such, I followed the readme here as well and pasting my whole terminal (commands and output) data in this regard so that one may get a better understanding of my problem

===============================================================================

fahid@fahid-desktop:~$ cd Downloads
fahid@fahid-desktop:~/Downloads$ cd smartcam-1.4.0/
fahid@fahid-desktop:~/Downloads/smartcam-1.4.0$ cd driver_src/
fahid@fahid-desktop:~/Downloads/smartcam-1.4.0/driver_src$ make -C /lib/modules/`uname -r`/build M=`pwd`
make: Entering directory `/usr/src/linux-headers-2.6.32-24-generic'
CC [M] /home/fahid/Downloads/smartcam-1.4.0/driver_src/smartcam.o
/home/fahid/Downloads/smartcam-1.4.0/driver_src/smartcam.c: In function ‘vidioc_s_fmt_cap’:
/home/fahid/Downloads/smartcam-1.4.0/driver_src/smartcam.c:174: error: dereferencing pointer to incomplete type
/home/fahid/Downloads/smartcam-1.4.0/driver_src/smartcam.c: In function ‘smartcam_write’:
/home/fahid/Downloads/smartcam-1.4.0/driver_src/smartcam.c:533: error: ‘TASK_INTERRUPTIBLE’ undeclared (first use in this function)
/home/fahid/Downloads/smartcam-1.4.0/driver_src/smartcam.c:533: error: (Each undeclared identifier is reported only once
/home/fahid/Downloads/smartcam-1.4.0/driver_src/smartcam.c:533: error: for each function it appears in.)
/home/fahid/Downloads/smartcam-1.4.0/driver_src/smartcam.c: At top level:
/home/fahid/Downloads/smartcam-1.4.0/driver_src/smartcam.c:563: warning: initialization from incompatible pointer type
/home/fahid/Downloads/smartcam-1.4.0/driver_src/smartcam.c:599: error: ‘VID_TYPE_CAPTURE’ undeclared here (not in a function)
/home/fahid/Downloads/smartcam-1.4.0/driver_src/smartcam.c:601: warning: initialization from incompatible pointer type
/home/fahid/Downloads/smartcam-1.4.0/driver_src/smartcam.c:640: fatal error: opening dependency file /home/fahid/Downloads/smartcam-1.4.0/driver_src/.smartcam.o.d: Permission denied
compilation terminated.
make[1]: *** [/home/fahid/Downloads/smartcam-1.4.0/driver_src/smartcam.o] Error 1
make: *** [_module_/home/fahid/Downloads/smartcam-1.4.0/driver_src] Error 2
make: Leaving directory `/usr/src/linux-headers-2.6.32-24-generic'
fahid@fahid-desktop:~/Downloads/smartcam-1.4.0/driver_src$

===============================================================================

Discussion

  • Fahid
    Fahid
    2010-09-14

    Then While Googling around I found this post in Ubuntu Community Forum
    http://art.ubuntuforums.org/showthread.php?t=970777&page=3
    ===========================================================

    hi again,
    problem solved. here what i have done:
    1. download the following files.
    (http://sourceforge.net/projects/smartcam/files/smartcam_linux/smartcam_linux_v_1.4.0/smartcam-1.4.0.tar.gz/download)
    smartcam-1.4.0.tar.gz
    smartcam_1.4.0_i386.deb
    2. cd smartcam-1.4.0/driver_src/
    3. patch the smartcam.c file with the patch which is attached
    patch -p0 < karmic.patch smartcam.c
    4.sudo apt-get install linux-headers-$(uname -r)
    5.sudo apt-get install build-essential
    6.sudo apt-get install libgtk2.0-dev
    7.sudo make -C /lib/modules/`uname -r`/build M=`pwd`
    8.gksu gedit /etc/modules add this line
    videodev
    9./sbin/modprobe videodev
    10./sbin/insmod smartcam.ko

    that is all. hope it works.

    ===========================================================

    I downloaded the patch
    placed it in the driver_src directory
    followed the instructions
    and here are the results, terminal input output

    ===========================================================

    fahid@fahid-desktop:~$ cd Downloads/smartcam-1.4.0/driver_src/
    fahid@fahid-desktop:~/Downloads/smartcam-1.4.0/driver_src$ patch -p0 < karmic.patch smartcam.c
    patching file smartcam.c
    fahid@fahid-desktop:~/Downloads/smartcam-1.4.0/driver_src$ sudo apt-get install linux-headers-$(uname -r)
    [sudo] password for fahid:
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    linux-headers-2.6.32-24-generic is already the newest version.
    0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
    fahid@fahid-desktop:~/Downloads/smartcam-1.4.0/driver_src$ sudo apt-get install build-essential
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    build-essential is already the newest version.
    0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
    fahid@fahid-desktop:~/Downloads/smartcam-1.4.0/driver_src$ sudo apt-get install libgtk2.0-dev
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    libgtk2.0-dev is already the newest version.
    0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
    fahid@fahid-desktop:~/Downloads/smartcam-1.4.0/driver_src$ sudo make -C /lib/modules/`uname -r`/build M=`pwd`
    make: Entering directory `/usr/src/linux-headers-2.6.32-24-generic'
    CC [M] /home/fahid/Downloads/smartcam-1.4.0/driver_src/smartcam.o
    /home/fahid/Downloads/smartcam-1.4.0/driver_src/smartcam.c: In function ‘vidioc_s_fmt_cap’:
    /home/fahid/Downloads/smartcam-1.4.0/driver_src/smartcam.c:174: error: dereferencing pointer to incomplete type
    /home/fahid/Downloads/smartcam-1.4.0/driver_src/smartcam.c: In function ‘smartcam_write’:
    /home/fahid/Downloads/smartcam-1.4.0/driver_src/smartcam.c:529: error: ‘TASK_INTERRUPTIBLE’ undeclared (first use in this function)
    /home/fahid/Downloads/smartcam-1.4.0/driver_src/smartcam.c:529: error: (Each undeclared identifier is reported only once
    /home/fahid/Downloads/smartcam-1.4.0/driver_src/smartcam.c:529: error: for each function it appears in.)
    /home/fahid/Downloads/smartcam-1.4.0/driver_src/smartcam.c: At top level:
    /home/fahid/Downloads/smartcam-1.4.0/driver_src/smartcam.c:554: warning: initialization from incompatible pointer type
    /home/fahid/Downloads/smartcam-1.4.0/driver_src/smartcam.c:555: warning: initialization from incompatible pointer type
    make[1]: *** [/home/fahid/Downloads/smartcam-1.4.0/driver_src/smartcam.o] Error 1
    make: *** [_module_/home/fahid/Downloads/smartcam-1.4.0/driver_src] Error 2
    make: Leaving directory `/usr/src/linux-headers-2.6.32-24-generic'
    fahid@fahid-desktop:~/Downloads/smartcam-1.4.0/driver_src$

    ===========================================================