Author Topic: [Solved] Need help building guvcview  (Read 824 times)

Offline KernelKarter

  • PCLinuxOS Tester
  • Sr. Member
  • *******
  • Posts: 270
[Solved] Need help building guvcview
« on: August 28, 2012, 06:38:59 AM »
Further to a package request here: http://www.pclinuxos.com/forum/index.php/topic,108605.0.html

I thought I'd have a bash at building the latest guvcview (although I'm not an official packager).

Install dependencies: OK
Prep: OK
Compile: Barfed!

Code: [Select]
In file included from callbacks.c:34:0:
v4l2_dyna_ctrls.h:26:28: fatal error: linux/uvcvideo.h: No such file or directory
compilation terminated.

It's looking for uvcvideo.h in /usr/include/linux but it won't find it there as it's actually in /usr/src/kernel-devel-3.2.18-pclos2.bfs/include/linux.

How do I solve that without creating a symlink.

-- Eddie
« Last Edit: September 02, 2012, 12:52:52 AM by KernelKarter »
pclinuxos-kde-2013.04 | kernel-3.2.18-pclos2.pae.bfs
- AMD Athlon 64 X2 5000+ CPU
- 4Gb RAM | nVidia 8500GT GPU

Offline ghostbunny

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1153
Re: Need help building guvcview
« Reply #1 on: August 28, 2012, 07:00:18 AM »
Hi KernelKarter,

try to add

Code: [Select]
export CPPFLAGS="-I/usr/src/kernel-devel-3.2.18-pclos2.bfs/include/linux"

you have to set this before the configure line in your spec file

Hope it helps

regards
ghostbunny

Edit: don't know whether this is possible but the version number of the kernel, the release number and the kerneltype (bfs, ...) should be replaced by a wild card if possible or we have to do some scripting for getting this information. if we dont do this probably every packager has to modify this line for his kernel version
« Last Edit: August 28, 2012, 07:04:28 AM by ghostbunny »
The full life is a big mess

PS:
I'm German. Sorry because of possible mistakes in my written messages xD


Offline Archie

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8583
  • Aurum nostrum non est aurum vulgi.
Re: Need help building guvcview
« Reply #2 on: August 28, 2012, 07:24:50 AM »
You can try creating a link of /usr/src/kernel-devel-3.2.18-pclos2.bfs/include/linux/uvcvideo.h to /usr/include/linux
Since 2006 | LiCo 401868 | Bare Metal | What is necessary is never unwise. --Sarek, 2258.42


Offline KernelKarter

  • PCLinuxOS Tester
  • Sr. Member
  • *******
  • Posts: 270
Re: Need help building guvcview
« Reply #3 on: August 28, 2012, 07:47:03 AM »
Hi KernelKarter,

try to add

Code: [Select]
export CPPFLAGS="-I/usr/src/kernel-devel-3.2.18-pclos2.bfs/include/linux"

you have to set this before the configure line in your spec file

Hope it helps

regards
ghostbunny

Thanks but it didn't work, I got this error:

Code: [Select]
checking whether we are cross compiling... configure: error: in `/home/kernelkarter/src/rpm/BUILD/guvcview-src-1.6.1':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details
error: Bad exit status from /home/kernelkarter/src/tmp/rpm-tmp.Co3KFQ (%build)


RPM build errors:
    Bad exit status from /home/kernelkarter/src/tmp/rpm-tmp.Co3KFQ (%build)

Quote
Edit: don't know whether this is possible but the version number of the kernel, the release number and the kerneltype (bfs, ...) should be replaced by a wild card if possible or we have to do some scripting for getting this information. if we dont do this probably every packager has to modify this line for his kernel version
OK, did that and it solved the previous error but it's still looking in the wrong place for uvcvideo.h

-- Eddie
pclinuxos-kde-2013.04 | kernel-3.2.18-pclos2.pae.bfs
- AMD Athlon 64 X2 5000+ CPU
- 4Gb RAM | nVidia 8500GT GPU

Offline TerryN

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 723
Re: Need help building guvcview
« Reply #4 on: August 28, 2012, 07:51:32 AM »

Edit: don't know whether this is possible but the version number of the kernel, the release number and the kerneltype (bfs, ...) should be replaced by a wild card if possible.

You could use:

Code: [Select]
usr/src/kernel-devel-`uname -r`/include/linux
but even that would only build against the API of the kernel version installed on the build machine  :)
In any case, hacking around like this is not the proper way to proceed.  The reason for the failure needs to be investigated.

Terry
« Last Edit: August 28, 2012, 10:29:46 AM by TerryN »
Dell E521 - AMD 64 X2 5000+, 4GB RAM, ATI X1300 graphics
PCLinuxOS 2013 (KDE)
|Twitter|

Offline KernelKarter

  • PCLinuxOS Tester
  • Sr. Member
  • *******
  • Posts: 270
Re: Need help building guvcview
« Reply #5 on: August 28, 2012, 07:52:26 AM »
You can try creating a link of /usr/src/kernel-devel-3.2.18-pclos2.bfs/include/linux/uvcvideo.h to /usr/include/linux
Thanks but I'd already tried that actually and it did solve the problem but, in doing so, it's created another problem which I'd rather not bring up until the first problem is solved.

Hence my question "How do I solve that without creating a symlink"  :)

-- Eddie
pclinuxos-kde-2013.04 | kernel-3.2.18-pclos2.pae.bfs
- AMD Athlon 64 X2 5000+ CPU
- 4Gb RAM | nVidia 8500GT GPU

Offline KernelKarter

  • PCLinuxOS Tester
  • Sr. Member
  • *******
  • Posts: 270
Re: Need help building guvcview
« Reply #6 on: August 28, 2012, 08:12:10 AM »
A bit of further information:

I'm using the SPEC file from the 64-bit 1.6.0 SRPM suitably tweaked to try building 1.6.1 on 32-bit and I've noticed this line:
Code: [Select]
CPPFLAGS=-I/usr/include/libavThere's no such directory on my setup  ???

-- Eddie
pclinuxos-kde-2013.04 | kernel-3.2.18-pclos2.pae.bfs
- AMD Athlon 64 X2 5000+ CPU
- 4Gb RAM | nVidia 8500GT GPU

Offline Archie

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8583
  • Aurum nostrum non est aurum vulgi.
Re: Need help building guvcview
« Reply #7 on: August 28, 2012, 08:17:29 AM »
Add the following line before %make

sed -i 's/$(CC) $(CFLAGS) $(LFLAGS) $(OBJECTS) -o $(APP_BINARY)/$(CC) $(CFLAGS) $(OBJECTS) $(LFLAGS) -o $(APP_BINARY)/g' Makefile
Since 2006 | LiCo 401868 | Bare Metal | What is necessary is never unwise. --Sarek, 2258.42


Offline TerryN

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 723
Re: Need help building guvcview
« Reply #8 on: August 28, 2012, 10:20:46 AM »
Sometime around kernel 3.2 the interface to uvcvideo changed from being IOCTL type interface to having a proper GLIBC interface.  As a result, for the 3.2 kernels there should be a uvcvideo.h for accessing the glibc API  (stuff in /usr/include/linux is for the glibc interface to the kernel and is provided by the glibc-headers-devel package). Later versions of guvcview require this new interface.

I suspect you are using glibc-headers-devel-2.6.38.  This will not have linux/uvcvideo.h.
You need glibc-headers-devel-3.2.18 but that is currently only available in the Test section of the 64 bit repo.

Terry.

Edit:
BTW moving permanently to glibc-headers-devel-3.2.18 has important implications for the PCLinuxOS Admins to consider.

« Last Edit: August 29, 2012, 01:11:17 AM by TerryN »
Dell E521 - AMD 64 X2 5000+, 4GB RAM, ATI X1300 graphics
PCLinuxOS 2013 (KDE)
|Twitter|

Offline KernelKarter

  • PCLinuxOS Tester
  • Sr. Member
  • *******
  • Posts: 270
Re: Need help building guvcview
« Reply #9 on: August 29, 2012, 01:22:49 AM »
Ahhhhhh, thank you very much indeed for the explanation, which also answers one or two other questions.

I'm marking this topic as "Abandoned" but thanks very much to everyone for their input, it is much appreciated.

-- Eddie
pclinuxos-kde-2013.04 | kernel-3.2.18-pclos2.pae.bfs
- AMD Athlon 64 X2 5000+ CPU
- 4Gb RAM | nVidia 8500GT GPU

Offline KernelKarter

  • PCLinuxOS Tester
  • Sr. Member
  • *******
  • Posts: 270
Re: Need help building guvcview
« Reply #10 on: September 02, 2012, 12:52:22 AM »
You need glibc-headers-devel-3.2.18 but that is currently only available in the Test section of the 64 bit repo.

It's now in the official 32-bit repo  ;D

guvcview now builds perfectly for 32-bit (on my build system), so I'll re-mark this topic as "Solved".
I've also requested that it be tested: http://www.pclinuxos.com/forum/index.php/topic,108751.0.html

-- Eddie
pclinuxos-kde-2013.04 | kernel-3.2.18-pclos2.pae.bfs
- AMD Athlon 64 X2 5000+ CPU
- 4Gb RAM | nVidia 8500GT GPU

Offline dougmack

  • Hero Member
  • *****
  • Posts: 962
Re: [Solved] Need help building guvcview
« Reply #11 on: September 15, 2012, 06:13:52 PM »
I tried running guvcview on my 32-bit machine, after Just17 pointed me to the download for the rpm, but it ran at a very slow frame-rate.  I'd like to try the
64-bit version on this other, faster, machine. Is there an rpm built for 3.2.18-pclos2.bfs #1 SMP PREEMPT Thu May 24 12:11:06 CEST 2012 x86_64 x86_64 x86_64 GNU/Linux?
(Must have all the dependencies available, of course--could not use guvcview-1.6.1-2.1.x86_64 found for SUSE, since the libc.so.6 and libpng14.so.14 dependencies are not available here.)

--doug
Blessed are the peacemakers...for they shall be shot at from both sides.  A. M. Greeley

Offline KernelKarter

  • PCLinuxOS Tester
  • Sr. Member
  • *******
  • Posts: 270
Re: [Solved] Need help building guvcview
« Reply #12 on: September 16, 2012, 01:39:47 AM »
Not that I'm aware of but 1.6.0 is in the 64-bit repo, perhaps you might try that.

-- Eddie
pclinuxos-kde-2013.04 | kernel-3.2.18-pclos2.pae.bfs
- AMD Athlon 64 X2 5000+ CPU
- 4Gb RAM | nVidia 8500GT GPU