Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I have the kernel source installed. I'm struggling to understand this statement in the instructions.
Quote:
# Kernel source for the kernel you are running. The symbolic link /lib/modules/`uname -r`/build should point to the source directory.
# A working installation of gcc >= 2.95
uname -r shows ...
Quote:
uname -r
2.6.29.6-desktop586-1mnb
Lib Modules shows....
Quote:
ls
2.6.29.1-desktop586-4mnb/ 2.6.29.3-desktop586-1mnb/ 2.6.29.6-desktop-1mnb/ 2.6.29.6-desktop586-1mnb/
I have had more than one kernel installed. The current one is shown above.
My question, the instructions say the simlink should be in /lib/modules. I have directories for each of the kernels that are or were installed, not symlinks. If I change to the dir for the current kernel, there are two symlinks there. Build and source.
Here they are, from /lib/modules/2.6.29.6-desktop586-1mnb/
Quote:
file build
build: symbolic link to `/usr/src/linux-2.6.29.6-desktop586-1mnb'
[cliff@Duelie 2.6.29.6-desktop586-1mnb]$ file source
source: symbolic link to `/usr/src/linux-2.6.29.6-desktop586-1mnb'
Are these symlinks in the correct place?
I can not compile the module. It dies with this output.
Code:
make all
which: no depmod in (/bin:/usr/bin:/usr/local/bin:/usr/games:/usr/lib/qt4/bin:/usr/bin:/opt/kde3/bin:/opt/real/RealPlayer:/opt/real/RealPlayer:/home/cliff/bin:/opt/real/RealPlayer)
make -C "/lib/modules/2.6.29.6-desktop586-1mnb/build" SUBDIRS="/home/cliff/quickcam/qc-usb-0.6.6" modules V=1 USER_OPT="-DHAVE_UTSRELEASE_H=1"
make[1]: Entering directory `/usr/src/linux-2.6.29.6-desktop586-1mnb'
test -e include/linux/autoconf.h -a -e include/config/auto.conf || ( \
echo; \
echo " ERROR: Kernel configuration is invalid."; \
echo " include/linux/autoconf.h or include/config/auto.conf are missing."; \
echo " Run 'make oldconfig && make prepare' on kernel src to fix it."; \
echo; \
/bin/false)
mkdir -p /home/cliff/quickcam/qc-usb-0.6.6/.tmp_versions ; rm -f /home/cliff/quickcam/qc-usb-0.6.6/.tmp_versions/*
make -f scripts/Makefile.build obj=/home/cliff/quickcam/qc-usb-0.6.6
gcc -Wp,-MD,/home/cliff/quickcam/qc-usb-0.6.6/.qc-driver.o.d -nostdinc -isystem /usr/lib/gcc/i586-manbo-linux-gnu/4.3.2/include -Iinclude -I/usr/src/linux-2.6.29.6-desktop586-1mnb/arch/x86/include -include include/linux/autoconf.h -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -O2 -m32 -msoft-float -mregparm=3 -freg-struct-return -mpreferred-stack-boundary=2 -march=i586 -mtune=generic -Wa,-mtune=generic32 -ffreestanding -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -Iarch/x86/include/asm/mach-generic -Iarch/x86/include/asm/mach-default -fno-stack-protector -fno-omit-frame-pointer -fno-optimize-sibling-calls -g -Wdeclaration-after-statement -Wno-pointer-sign -fwrapv -DNOKERNEL -DHAVE_UTSRELEASE_H=1 -DMODULE -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(qc_driver)" -D"KBUILD_MODNAME=KBUILD_STR(quickcam)" -D"DEBUG_HASH=58" -D"DEBUG_HASH2=4" -c -o /home/cliff/quickcam/qc-usb-0.6.6/.tmp_qc-driver.o /home/cliff/quickcam/qc-usb-0.6.6/qc-driver.c
In file included from /home/cliff/quickcam/qc-usb-0.6.6/qc-driver.c:47:
/home/cliff/quickcam/qc-usb-0.6.6/quickcam.h:129:1: warning: "BIT" redefined
In file included from include/linux/kernel.h:15,
from include/linux/cache.h:4,
from include/linux/time.h:7,
from include/linux/videodev2.h:60,
from include/linux/videodev.h:17,
from /home/cliff/quickcam/qc-usb-0.6.6/quickcam.h:95,
from /home/cliff/quickcam/qc-usb-0.6.6/qc-driver.c:47:
include/linux/bitops.h:6:1: warning: this is the location of the previous definition
/home/cliff/quickcam/qc-usb-0.6.6/qc-driver.c: In function ‘qc_i2c_init’:
/home/cliff/quickcam/qc-usb-0.6.6/qc-driver.c:824: error: ‘struct urb’ has no member named ‘lock’
/home/cliff/quickcam/qc-usb-0.6.6/qc-driver.c:825: warning: assignment from incompatible pointer type
/home/cliff/quickcam/qc-usb-0.6.6/qc-driver.c: In function ‘qc_isoc_start’:
/home/cliff/quickcam/qc-usb-0.6.6/qc-driver.c:1867: warning: assignment from incompatible pointer type
/home/cliff/quickcam/qc-usb-0.6.6/qc-driver.c: In function ‘qc_v4l_poll’:
/home/cliff/quickcam/qc-usb-0.6.6/qc-driver.c:2256: error: ‘struct video_device’ has no member named ‘priv’
/home/cliff/quickcam/qc-usb-0.6.6/qc-driver.c: In function ‘qc_v4l_open’:
/home/cliff/quickcam/qc-usb-0.6.6/qc-driver.c:2308: error: ‘struct video_device’ has no member named ‘priv’
/home/cliff/quickcam/qc-usb-0.6.6/qc-driver.c: In function ‘qc_v4l_close’:
/home/cliff/quickcam/qc-usb-0.6.6/qc-driver.c:2376: error: ‘struct video_device’ has no member named ‘priv’
/home/cliff/quickcam/qc-usb-0.6.6/qc-driver.c: In function ‘qc_v4l_read’:
/home/cliff/quickcam/qc-usb-0.6.6/qc-driver.c:2424: error: ‘struct video_device’ has no member named ‘priv’
/home/cliff/quickcam/qc-usb-0.6.6/qc-driver.c: In function ‘qc_v4l_mmap’:
/home/cliff/quickcam/qc-usb-0.6.6/qc-driver.c:2479: error: ‘struct video_device’ has no member named ‘priv’
/home/cliff/quickcam/qc-usb-0.6.6/qc-driver.c: In function ‘qc_v4l_ioctl’:
/home/cliff/quickcam/qc-usb-0.6.6/qc-driver.c:2511: error: ‘struct video_device’ has no member named ‘priv’
/home/cliff/quickcam/qc-usb-0.6.6/qc-driver.c:2529: error: ‘struct video_device’ has no member named ‘type’
/home/cliff/quickcam/qc-usb-0.6.6/qc-driver.c: At top level:
/home/cliff/quickcam/qc-usb-0.6.6/qc-driver.c:3008: error: unknown field ‘type’ specified in initializer
/home/cliff/quickcam/qc-usb-0.6.6/qc-driver.c:3009: error: unknown field ‘hardware’ specified in initializer
/home/cliff/quickcam/qc-usb-0.6.6/qc-driver.c:3013: warning: initialization from incompatible pointer type
/home/cliff/quickcam/qc-usb-0.6.6/qc-driver.c: In function ‘qc_usb_init’:
/home/cliff/quickcam/qc-usb-0.6.6/qc-driver.c:3158: error: ‘struct video_device’ has no member named ‘priv’
/home/cliff/quickcam/qc-usb-0.6.6/qc-driver.c: At top level:
/home/cliff/quickcam/qc-usb-0.6.6/qc-driver.c:3410: fatal error: opening dependency file /home/cliff/quickcam/qc-usb-0.6.6/.qc-driver.o.d: Permission denied
compilation terminated.
make[2]: *** [/home/cliff/quickcam/qc-usb-0.6.6/qc-driver.o] Error 1
make[1]: *** [_module_/home/cliff/quickcam/qc-usb-0.6.6] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.29.6-desktop586-1mnb'
make: *** [quickcam.ko] Error 2
I have run both make oldconfig and make prepare. The system reports 'nothing to be done for either.
No matter what I do, I can not compile this module.
You have GCC 4+ - the source wants gcc 2.95+ - interestingly, there was a major change at gcc4.0 which broke backwards compatability. However, most distros have an old version of gcc in the repos - try that. It is also possible that your kernel is too new - which would be a bummer.
GCC Version 3.36 is also in the repos, I have installed it, ( two packages ) GCC3.3 and GCC3.3-cpp. I re-ran the quickcam.sh script, but is is still trying to use GCC 4.3.2.
I looked at the script, it appears to me as if it tests the system for the version, and it is still using 4.3.2. Do I have to un-install the newer version, or is there some easier way to tell it to use 3.3? BTW, I have done very little compiling of software. I have a general understanding, but that is it. Thank-you in advance.
Well, I have another machine running PCLinuxOS 2009.1 on an old ThinkPad. Just as a shot in the dark i installed the dkms-qc-usb package. It installed, opened a window, compiled the driver after Synaptic installed the file. Cool.
I installed Camorama, plugged in the webcam, started the app, it all works. I didn't even need load quickcam.ko.
I looked at the /usr/src/qc-usb-0.6.6-2pclos directory. There are more patches there, one for the level of kernel on that system. ( 2.6.26.8 ). Just a guess, but I suspect that patch is what I need for my Mandy system... Gcc on PClinuxOS box is listed as 4.1.1 ( a pre-release ).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.