I submitted this problem to this forum earlier last week but it elicited no response in a forum environment where reaction to forum posts is outstandingly quick. I guess it was perhaps the thread Title which was off-putting as well as misleading, so I am submitting the problem again (please!) with a more relevant title.
I am trying to compile and install the driver which supports older Philips Web Cam (which my Logitech Quick Cam 3000 Pro needs). I am following the instructions that are part of the PWC package from Luc Saillard. The ‘make’ step fails and I cannot understand why this script is accessing the directories that it is.
I believe the kernel source is in /lib/modules/2.6.27.23-0.1-pae
But the make script seems to be accessing /usr/src/linux-2.6.27.23-0.1-obj/i386/pae which contains only the file Module.symvers (which I am guessing contains the headers for the kernel source ?)
The output from make says:
make -C /lib/modules/2.6.27.23-0.1-pae/build SUBDIRS=/home/tony/install_temp/pwc-10.0.11 modules
make[1]: Entering directory /usr/src/linux-2.6.27.23-0.1-obj/i386/pae' make[1]: *** No rule to make target modules’. Stop.
make[1]: Leaving directory `/usr/src/linux-2.6.27.23-0.1-obj/i386/pae’
make: *** [all] Error 2
Can somebody please advise me what is causing this error to be invoked adn, by implication, what changes to the make script are required?
I have Googled the error message from make and followed the many ‘hits’ that are presented from this unique error text. None of the advice given fixes the problem. I am unable to progress beyond this point.
No, kernel sources are always in /usr/src. the stuff in /lib/modules/<kernel>/source and /lib/modules/<kernel>/build is just a symlink to /usr/src/linux source directory, besides the actual modules which are also in /lib/modules. If you have installed the kernel source package, then do as follows which may solve the problem
login as root on console
cp /boot/config-$(uname -r) /usr/src/linux/.config (note the . (point) in .config)
cd /usr/src/linux && make prepare && make modules_prepare
I think I need a little more help here because things do not add up.
There is only one file in usr/src/linux… - Module.symvers. Perhaps this means that I have not got the kernel source installed? However Yast tells me that the package kernel-pae is already installed - in lib/modules/2.6.27.23-0.1-pae. This folder contains 2770+ files which do not appear to be symbolic links, with a total size about 64 MB.
So do I have the source installed or not? If not, which source pacakge should I install?
OK; I found and installed the kernel files, followed your previous instructions (which appeared to work wthout any problem) and then re-invoked the make. The reult is a lengthy collection of erros, which I assume are caused by the developer of the make file making invalid assumptions. My probelm is that I do not understand what is causing this many erros and so do not understand how to fix the problem.
This is the output from ‘make’:
make -C /lib/modules/2.6.27.23-0.1-pae/build SUBDIRS=/home/tony/install_temp/pwc-10.0.11 modules
make[1]: Entering directory /usr/src/linux-2.6.27.23-0.1-obj/i386/pae' make -C ../../../linux-2.6.27.23-0.1 O=/usr/src/linux-2.6.27.23-0.1-obj/i386/pae/. modules CC [M] /home/tony/install_temp/pwc-10.0.11/pwc-if.o In file included from /home/tony/install_temp/pwc-10.0.11/pwc-if.c:69: /home/tony/install_temp/pwc-10.0.11/pwc.h:28:26: error: linux/config.h: No such file or directory /home/tony/install_temp/pwc-10.0.11/pwc.h:37:27: error: asm/semaphore.h: No such file or directory /home/tony/install_temp/pwc-10.0.11/pwc-if.c:164: error: variable ‘pwc_template’ has initializer but incomplete type /home/tony/install_temp/pwc-10.0.11/pwc-if.c:165: error: unknown field ‘owner’ specified in initializer /home/tony/install_temp/pwc-10.0.11/pwc-if.c:165: warning: excess elements in struct initializer /home/tony/install_temp/pwc-10.0.11/pwc-if.c:165: warning: (near initialization for ‘pwc_template’) /home/tony/install_temp/pwc-10.0.11/pwc-if.c:166: error: unknown field ‘name’ specified in initializer /home/tony/install_temp/pwc-10.0.11/pwc-if.c:166: warning: excess elements in struct initializer /home/tony/install_temp/pwc-10.0.11/pwc-if.c:166: warning: (near initialization for ‘pwc_template’) /home/tony/install_temp/pwc-10.0.11/pwc-if.c:167: error: unknown field ‘type’ specified in initializer /home/tony/install_temp/pwc-10.0.11/pwc-if.c:167: warning: excess elements in struct initializer /home/tony/install_temp/pwc-10.0.11/pwc-if.c:167: warning: (near initialization for ‘pwc_template’) /home/tony/install_temp/pwc-10.0.11/pwc-if.c:168: error: unknown field ‘hardware’ specified in initializer /home/tony/install_temp/pwc-10.0.11/pwc-if.c:168: error: ‘VID_HARDWARE_PWC’ undeclared here (not in a function) /home/tony/install_temp/pwc-10.0.11/pwc-if.c:168: warning: excess elements in struct initializer /home/tony/install_temp/pwc-10.0.11/pwc-if.c:168: warning: (near initialization for ‘pwc_template’) /home/tony/install_temp/pwc-10.0.11/pwc-if.c:169: error: unknown field ‘release’ specified in initializer /home/tony/install_temp/pwc-10.0.11/pwc-if.c:169: error: ‘video_device_release’ undeclared here (not in a function) /home/tony/install_temp/pwc-10.0.11/pwc-if.c:169: warning: excess elements in struct initializer /home/tony/install_temp/pwc-10.0.11/pwc-if.c:169: warning: (near initialization for ‘pwc_template’) /home/tony/install_temp/pwc-10.0.11/pwc-if.c:170: error: unknown field ‘fops’ specified in initializer /home/tony/install_temp/pwc-10.0.11/pwc-if.c:170: warning: excess elements in struct initializer /home/tony/install_temp/pwc-10.0.11/pwc-if.c:170: warning: (near initialization for ‘pwc_template’) /home/tony/install_temp/pwc-10.0.11/pwc-if.c:171: error: unknown field ‘minor’ specified in initializer /home/tony/install_temp/pwc-10.0.11/pwc-if.c:171: warning: excess elements in struct initializer /home/tony/install_temp/pwc-10.0.11/pwc-if.c:171: warning: (near initialization for ‘pwc_template’) /home/tony/install_temp/pwc-10.0.11/pwc-if.c: In function ‘pwc_allocate_buffers’: /home/tony/install_temp/pwc-10.0.11/pwc-if.c:328: warning: format ‘%ld’ expects type ‘long int’, but argument 2 has type ‘int’ /home/tony/install_temp/pwc-10.0.11/pwc-if.c: In function ‘pwc_isoc_init’: /home/tony/install_temp/pwc-10.0.11/pwc-if.c:885: warning: assignment from incompatible pointer type /home/tony/install_temp/pwc-10.0.11/pwc-if.c: At top level: /home/tony/install_temp/pwc-10.0.11/pwc-if.c:979: warning: ‘struct class_device’ declared inside parameter list /home/tony/install_temp/pwc-10.0.11/pwc-if.c:979: warning: its scope is only this definition or declaration, which is probably not what you want /home/tony/install_temp/pwc-10.0.11/pwc-if.c: In function ‘cd_to_pwc’: /home/tony/install_temp/pwc-10.0.11/pwc-if.c:981: error: implicit declaration of function ‘to_video_device’ /home/tony/install_temp/pwc-10.0.11/pwc-if.c:981: warning: initialization makes pointer from integer without a cast /home/tony/install_temp/pwc-10.0.11/pwc-if.c:982: error: implicit declaration of function ‘video_get_drvdata’ /home/tony/install_temp/pwc-10.0.11/pwc-if.c:982: warning: return makes pointer from integer without a cast /home/tony/install_temp/pwc-10.0.11/pwc-if.c: At top level: /home/tony/install_temp/pwc-10.0.11/pwc-if.c:985: warning: ‘struct class_device’ declared inside parameter list /home/tony/install_temp/pwc-10.0.11/pwc-if.c: In function ‘show_pan_tilt’: /home/tony/install_temp/pwc-10.0.11/pwc-if.c:987: warning: passing argument 1 of ‘cd_to_pwc’ from incompatible pointer type /home/tony/install_temp/pwc-10.0.11/pwc-if.c: At top level: /home/tony/install_temp/pwc-10.0.11/pwc-if.c:992: warning: ‘struct class_device’ declared inside parameter list /home/tony/install_temp/pwc-10.0.11/pwc-if.c: In function ‘store_pan_tilt’: /home/tony/install_temp/pwc-10.0.11/pwc-if.c:994: warning: passing argument 1 of ‘cd_to_pwc’ from incompatible pointer type /home/tony/install_temp/pwc-10.0.11/pwc-if.c: At top level: /home/tony/install_temp/pwc-10.0.11/pwc-if.c:1008: error: expected ‘)’ before ‘(’ token /home/tony/install_temp/pwc-10.0.11/pwc-if.c:1011: warning: ‘struct class_device’ declared inside parameter list /home/tony/install_temp/pwc-10.0.11/pwc-if.c: In function ‘show_snapshot_button_status’: /home/tony/install_temp/pwc-10.0.11/pwc-if.c:1013: warning: passing argument 1 of ‘cd_to_pwc’ from incompatible pointer type /home/tony/install_temp/pwc-10.0.11/pwc-if.c: At top level: /home/tony/install_temp/pwc-10.0.11/pwc-if.c:1019: error: expected ‘)’ before ‘(’ token /home/tony/install_temp/pwc-10.0.11/pwc-if.c: In function ‘pwc_create_sysfs_files’: /home/tony/install_temp/pwc-10.0.11/pwc-if.c:1024: warning: initialization makes pointer from integer without a cast /home/tony/install_temp/pwc-10.0.11/pwc-if.c:1026: error: implicit declaration of function ‘video_device_create_file’ /home/tony/install_temp/pwc-10.0.11/pwc-if.c:1026: error: ‘class_device_attr_pan_tilt’ undeclared (first use in this function) /home/tony/install_temp/pwc-10.0.11/pwc-if.c:1026: error: (Each undeclared identifier is reported only once /home/tony/install_temp/pwc-10.0.11/pwc-if.c:1026: error: for each function it appears in.) /home/tony/install_temp/pwc-10.0.11/pwc-if.c:1027: error: ‘class_device_attr_button’ undeclared (first use in this function) /home/tony/install_temp/pwc-10.0.11/pwc-if.c: In function ‘pwc_remove_sysfs_files’: /home/tony/install_temp/pwc-10.0.11/pwc-if.c:1032: warning: initialization makes pointer from integer without a cast /home/tony/install_temp/pwc-10.0.11/pwc-if.c:1034: error: implicit declaration of function ‘video_device_remove_file’ /home/tony/install_temp/pwc-10.0.11/pwc-if.c:1034: error: ‘class_device_attr_pan_tilt’ undeclared (first use in this function) /home/tony/install_temp/pwc-10.0.11/pwc-if.c:1035: error: ‘class_device_attr_button’ undeclared (first use in this function) /home/tony/install_temp/pwc-10.0.11/pwc-if.c: In function ‘pwc_video_open’: /home/tony/install_temp/pwc-10.0.11/pwc-if.c:1074: error: implicit declaration of function ‘video_devdata’ /home/tony/install_temp/pwc-10.0.11/pwc-if.c:1074: warning: initialization makes pointer from integer without a cast /home/tony/install_temp/pwc-10.0.11/pwc-if.c:1079: error: dereferencing pointer to incomplete type /home/tony/install_temp/pwc-10.0.11/pwc-if.c: In function ‘pwc_video_close’: /home/tony/install_temp/pwc-10.0.11/pwc-if.c:1187: error: dereferencing pointer to incomplete type /home/tony/install_temp/pwc-10.0.11/pwc-if.c: In function ‘pwc_video_read’: /home/tony/install_temp/pwc-10.0.11/pwc-if.c:1247: error: dereferencing pointer to incomplete type /home/tony/install_temp/pwc-10.0.11/pwc-if.c: In function ‘pwc_video_poll’: /home/tony/install_temp/pwc-10.0.11/pwc-if.c:1311: error: dereferencing pointer to incomplete type /home/tony/install_temp/pwc-10.0.11/pwc-if.c: In function ‘pwc_video_ioctl’: /home/tony/install_temp/pwc-10.0.11/pwc-if.c:1327: error: implicit declaration of function ‘video_usercopy’ /home/tony/install_temp/pwc-10.0.11/pwc-if.c: In function ‘pwc_video_mmap’: /home/tony/install_temp/pwc-10.0.11/pwc-if.c:1340: error: dereferencing pointer to incomplete type /home/tony/install_temp/pwc-10.0.11/pwc-if.c: In function ‘usb_pwc_probe’: /home/tony/install_temp/pwc-10.0.11/pwc-if.c:1648: error: implicit declaration of function ‘video_device_alloc’ /home/tony/install_temp/pwc-10.0.11/pwc-if.c:1648: warning: assignment makes pointer from integer without a cast /home/tony/install_temp/pwc-10.0.11/pwc-if.c:1655: error: invalid application of ‘sizeof’ to incomplete type ‘struct video_device’ /home/tony/install_temp/pwc-10.0.11/pwc-if.c:1655: error: invalid application of ‘sizeof’ to incomplete type ‘struct video_device’ /home/tony/install_temp/pwc-10.0.11/pwc-if.c:1655: error: invalid application of ‘sizeof’ to incomplete type ‘struct video_device’ /home/tony/install_temp/pwc-10.0.11/pwc-if.c:1656: error: dereferencing pointer to incomplete type /home/tony/install_temp/pwc-10.0.11/pwc-if.c:1657: error: dereferencing pointer to incomplete type /home/tony/install_temp/pwc-10.0.11/pwc-if.c:1658: error: dereferencing pointer to incomplete type /home/tony/install_temp/pwc-10.0.11/pwc-if.c:1659: error: implicit declaration of function ‘video_set_drvdata’ /home/tony/install_temp/pwc-10.0.11/pwc-if.c:1682: error: dereferencing pointer to incomplete type /home/tony/install_temp/pwc-10.0.11/pwc-if.c:1683: error: implicit declaration of function ‘video_register_device’ /home/tony/install_temp/pwc-10.0.11/pwc-if.c:1683: error: ‘VFL_TYPE_GRABBER’ undeclared (first use in this function) /home/tony/install_temp/pwc-10.0.11/pwc-if.c:1686: error: implicit declaration of function ‘video_device_release’ /home/tony/install_temp/pwc-10.0.11/pwc-if.c:1691: error: dereferencing pointer to incomplete type /home/tony/install_temp/pwc-10.0.11/pwc-if.c: In function ‘usb_pwc_disconnect’: /home/tony/install_temp/pwc-10.0.11/pwc-if.c:1745: error: implicit declaration of function ‘video_unregister_device’ make[4]: *** [/home/tony/install_temp/pwc-10.0.11/pwc-if.o] Error 1 make[3]: *** [_module_/home/tony/install_temp/pwc-10.0.11] Error 2 make[2]: *** [sub-make] Error 2 make[1]: *** [all] Error 2 make[1]: Leaving directory /usr/src/linux-2.6.27.23-0.1-obj/i386/pae’
make: *** [all] Error 2
/home/tony/install_temp/pwc-10.0.11/pwc.h:28:26: error: linux/config.h: No such file or directory
/home/tony/install_temp/pwc-10.0.11/pwc.h:37:27: error: asm/semaphore.h: No such file or directory
it is looking for these files which you don’t appear to have. Did you copy the /boot/config-$(uname -r) file to /usr/src/linux/.config and ran make prepare && make modules_prepare before trying to compile your module?
Re the UVC module: I am lead to believe that this is not relevant to my older web-cam (Logitech Quick Cam Pro 3000), which is supported, I’m told, only by the PWC driver. Is my understanding correct?
Re PWC being part of the kernel: no, I was not aware of this and the reading I have done so far, looking at the web-cam sensors that are supported, also lead me to believe that I had to add the PWC driver to the kernel (and hence the mess that I have managed to get myself into thus far). In fact I have not been able to find an applications with which the camera will work (for example AMSN), so I took this as good evidence that there is currently no support for this web-cam in my version of the kernel. Am I mistaken in this belief?
Yes, If I have understood it correctly, your previous post gave me directions on how to do this. I copied your instructions (i.e. didn’t retype them) into a terminal session, logged in as root. Both commands seemed to work without error. But I note that the first command you suggested creates a file called .config in usr/src/linux and not a file called .config.h
Is this intended? There is no .config.h file in the usr/src/linux directory, so I do not understand how the ‘make’ process can work
the pwc module is in kernel 2.6.30. I don’t know if it’s in earlier version. Easiest would be to just upgrade the kernel instead of going through the pain the compiling it for an older version
# modinfo pwc
filename: /lib/modules/2.6.30-neutrino/kernel/drivers/media/video/pwc/pwc.ko
version: 10.0.13
alias: pwcx
license: GPL
author: Luc Saillard <luc@saillard.org>
description: Philips & OEM USB webcam driver
srcversion: 5A09472D2B9E4E6CBE18976
alias: usb:v0D81p1900d*dc*dsc*dp*ic*isc*ip*
alias: usb:v0D81p1910d*dc*dsc*dp*ic*isc*ip*
alias: usb:v06BEp8116d*dc*dsc*dp*ic*isc*ip*
alias: usb:v04CCp8116d*dc*dsc*dp*ic*isc*ip*
alias: usb:v041Ep4011d*dc*dsc*dp*ic*isc*ip*
alias: usb:v041Ep400Cd*dc*dsc*dp*ic*isc*ip*
alias: usb:v055Dp9002d*dc*dsc*dp*ic*isc*ip*
alias: usb:v055Dp9001d*dc*dsc*dp*ic*isc*ip*
alias: usb:v055Dp9000d*dc*dsc*dp*ic*isc*ip*
alias: usb:v046Dp08B8d*dc*dsc*dp*ic*isc*ip*
alias: usb:v046Dp08B7d*dc*dsc*dp*ic*isc*ip*
alias: usb:v046Dp08B6d*dc*dsc*dp*ic*isc*ip*
alias: usb:v046Dp08B5d*dc*dsc*dp*ic*isc*ip*
alias: usb:v046Dp08B4d*dc*dsc*dp*ic*isc*ip*
alias: usb:v046Dp08B3d*dc*dsc*dp*ic*isc*ip*
alias: usb:v046Dp08B2d*dc*dsc*dp*ic*isc*ip*
alias: usb:v046Dp08B1d*dc*dsc*dp*ic*isc*ip*
alias: usb:v046Dp08B0d*dc*dsc*dp*ic*isc*ip*
alias: usb:v069Ap0001d*dc*dsc*dp*ic*isc*ip*
alias: usb:v0471p0329d*dc*dsc*dp*ic*isc*ip*
alias: usb:v0471p0313d*dc*dsc*dp*ic*isc*ip*
alias: usb:v0471p0312d*dc*dsc*dp*ic*isc*ip*
alias: usb:v0471p0311d*dc*dsc*dp*ic*isc*ip*
alias: usb:v0471p0310d*dc*dsc*dp*ic*isc*ip*
alias: usb:v0471p030Cd*dc*dsc*dp*ic*isc*ip*
alias: usb:v0471p0308d*dc*dsc*dp*ic*isc*ip*
alias: usb:v0471p0307d*dc*dsc*dp*ic*isc*ip*
alias: usb:v0471p0304d*dc*dsc*dp*ic*isc*ip*
alias: usb:v0471p0303d*dc*dsc*dp*ic*isc*ip*
alias: usb:v0471p0302d*dc*dsc*dp*ic*isc*ip*
depends: usbcore,videodev
vermagic: 2.6.30-neutrino SMP preempt mod_unload modversions
parm: size:Initial image size. One of sqcif, qsif, qcif, sif, cif, vga (charp)
parm: fps:Initial frames per second. Varies with model, useful range 5-30 (int)
parm: fbufs:Number of internal frame buffers to reserve (int)
parm: mbufs:Number of external (mmap()ed) image buffers (int)
parm: trace:For debugging purposes
parm: power_save:Turn power save feature in camera on or off (int)
parm: compression:Preferred compression quality. Range 0 (uncompressed) to 3 (high compression) (int)
parm: leds:LED on,off time in milliseconds (array of int)
parm: dev_hint:Device node hints (array of charp)
neutrino:/home/neutrino #
What are header files?
Where are they?
In what way do they need to be patched?
What is linux/semaphore.h and what is not asm?
Would I be right in thinking that the ‘make’ driver pwc-10.0.11 has never been successfully tested against the kernel for OpenSuse 11.1?
If I am wrong in thinking this, what am I doing wrong in the compile procedure and which steps in the ‘install’ instructions have I executed incorrectly? And could somebody please tell me where those instructions are?
Hi
So when you plug the device in and then run dmesg, what is the usb id?
If you run the command /sbin/modinfo pwc the look through the alias
list is your id mentioned? If so as root user try modpobe pwc and
re-run the dmesg command to review the output.
Hi
What has happened is for a start the pwc modules is now part of the
mainstream kernel. The file your using is old and has not been updated
(the files called <somename>.h) to respect changes in the kernel
structure. eg where the files are in the kernel structure.
If you open for example (with a text editor) pwc.h and look at the
lines #include then open the kernel version of pwc.h
in /usr/src/linux/drivers/media/video/pwc and you will see the
differences.
The other issues can also be earlier versions of gcc 3.x were used,
since the change to 4.x some code has not been updated and further
changes need to be done.
Yes, having performed the same command, I have to agree.
I tried using aMSN again but this time with a difference: I plugged the camera into an available USB port. It seems to make a tremendous difference…
So, I have messed about here for about 6 weeks, getting a lot of people involved and wasting their time, only to find that support for my camera is already present in the kernel (and that is NOT apparent, to a naive user like me, from any of the information on this forum). Because of the great assistance from this forum thread, I have now discovered the main problem. It’s that the necessary control and data signals have a fatal inability to bridge across a 30 cm air gap between the USB plug and a USB socket. Huh, what a poor design…
Now I would like to clean up my system; do I need to keep the kernel source package or could I uninistall it?
When I execute cd /usr/src/linux && make prepare && make modules_prepare IT Gives Error make** No rule to make target ‘prepare’. Stop
Please reply ASAP. I want to install my rt2800usb wlan card on Backtrack 5. If this can be done without ‘make’ Please tell me. Else, give solution for above error.
Regards
Well, this thread is from 2009! And for a webcam driver.
Which openSUSE version are you using?
At least on 12.3 the rt2800usb driver is already included, so no need to install anything.
And what’s Backtrack 5? :\
For “make prepare” to work you need to install the package “kernel-source”.
But normally “make prepare && make modules_prepare” shouldn’t be needed anymore AFAIK. Just install “kernel-desktop-devel” (provided you’re using kernel-desktop) and you should be able to compile kernel modules.