libv4l testing instructions

Jun 22, 2009 12:34

Hi all,

Every now and then I need to ask people to test the latest libv4l, so I decided it would be a good idea to post some generic testing instructions here to have a place to point people to:

1. Install
=======

libv4l needs make, a working C-compiler (gcc), and libjpeg +
its header files to build. If you don't have these you need to install them
first. See your distributions documentation on how to install make and
the compiler (often called development tools / chain). For libjpeg,
you need to install the libjpeg62-dev under Debian/Ubuntu and the
libjpeg-devel package under Fedora / RHEL.

Howto install and test libv4l depends on your system. There are
different instructions for if you have a 32 bit system or a 64 bit system.
which is using multilib. A 64 bit system without multilib is the same as
a 32 bit system.

To find out what you have do:
ls -d /usr/lib64

If this command gives a "No such file or directory" error, use the
Non multilib instructions, if this command is successfull, you likely have multilib.

Note: I've received some reports that there us a /usr/lib64 directory on some 32
bit installs of Ubuntu. If you're quite sure you are running a normal (32 bit) version
of Ubuntu you likely are and you should follow the Non multilib instructions.

Ok, so you have a multilib system, to find out which (dubbed Fedora and Ubuntu
multilib, because those are the most well known examples, do):

ls -d /usr/lib32
If this command gives a "No such file or directory" error, use the Fedora multilib
instructions. If this command succeeds use the Ubuntu multilib instructions. Note
the ubuntu multilib instructions also apply to gentoo and the Fedora multilib instructions
also apply to [open]Suse.

Non multilib instructions:
-------------------------------
tar xvfj v4l-utils-.tar.bz2
cd v4l-utils-/lib
make PREFIX=/usr
sudo make install PREFIX=/usr

Fedora Multilib instructions:
-----------------------------------
Basic 64 bit install:
tar xvfj v4l-utils-.tar.bz2
cd v4l-utils-/lib
make PREFIX=/usr LIBDIR=/usr/lib64
sudo make install PREFIX=/usr LIBDIR=/usr/lib64

If you also want to use 32 bit apps (such as skype), you
will need to have the 32 bit libc headers installed, on Fedora
this can be done like this:
Fedora 10-: "sudo yum install glibc-devel.i386"
Fedora 11:  "sudo yum install glibc-devel.i586"
Fedora 12+: "sudo yum install glibc-devel.i686"
[open]Suse: install glibc-devel-32bit and gcc-32bit

Then do:
make clean
make PREFIX=/usr CFLAGS=-m32 LDFLAGS=-m32
sudo make install PREFIX=/usr

Ubuntu Multilib instructions:
-----------------------------------
tar xvfj v4l-utils-.tar.bz2
cd v4l-utils-/lib
make PREFIX=/usr
sudo make install PREFIX=/usr

If you also want to use 32 bit apps (such as skype), you
will need to have the 32 bit libc headers installed, on Ubuntu
this can be done like this:
sudo apt-get install libc6-dev-i386
On gentoo this can be done like this:
sudo emerge -v app-emulation/emul-linux-x86-compat
Then do:
make clean
make PREFIX=/usr CFLAGS=-m32 LDFLAGS=-m32 LIBDIR=/usr/lib32
sudo make install PREFIX=/usr LIBDIR=/usr/lib32

2. Testing
========
You have a chance that your webcam app use libv4l or have an appropriate
script starting it. In that case you don't have to do anything. Just run
the application. This is the most common situation with Ubuntu and Fedora
packages. If your problem remains unsolved, then your app might not use libv4l.  
In that case start the application from a terminal like this:

Non multilib:
----------------
LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so

Note on Ubuntu sometimes skype is using a wrapper script, so if skype
does not work try:
LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so skype.real

Fedora multilib:
--------------------
For 64 bit applications (allmost all apps):
LD_PRELOAD=/usr/lib64/libv4l/v4l1compat.so

For 32 bit applications (you only need it for proprietary softwares, which
don't have a 64 bit version, like skype):
LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so skype

Ubuntu multilib:
--------------------
For 64 bit applications (allmost all apps):
LD_PRELOAD=/usr/lib64/libv4l/v4l1compat.so skype

For 32 bit applications (you only need it for proprietary softwares, which
don't have a 64 bit version, like skype):
LD_PRELOAD=/usr/lib32/libv4l/v4l1compat.so skype

Note on Ubuntu sometimes skype is using a wrapper script, so if skype
does not work try:
LD_PRELOAD=/usr/lib32/libv4l/v4l1compat.so skype.real

kernel

Previous post Next post
Up