Why doesn't LD_PRELOAD "v4l1compat.so" work with 64-bit Skype? [duplicate]

Possible Duplicate:
Skype video not working after upgrade from 11.10 to 12.04

I am trying to troubleshoot my webcam and make it work with skype.

One workaround that is often suggested is to LD_PRELOAD the v4l1compat.so file. But when trying that, I get an error message:

fdr@maggie:~$ LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libv4l/v4l1compat.so skype
ERROR: ld.so: object '/usr/lib/x86_64-linux-gnu/libv4l/v4l1compat.so' from LD_PRELOAD cannot be preloaded: ignored.

and I am rather sure the path is correct:

fdr@maggie:~$ ls /usr/lib/x86_64-linux-gnu/libv4l/v4l1compat.so 
/usr/lib/x86_64-linux-gnu/libv4l/v4l1compat.so

and the kernel and skype have matching architecture:

fdr@maggie:~$ uname -a
Linux maggie 3.2.0-29-generic #46-Ubuntu SMP Fri Jul 27 17:03:23 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
fdr@maggie:~$ dpkg -s skype | grep Architecture
Architecture: amd64

So my question is:

What is causing the "... from LD_PRELOAD cannot be preloaded: ignored" error message?


I think I found out.

Although installed from the 64 bit package, Skype is compiled for 32 bit:

fdr@maggie:~$ file `which skype`
/usr/bin/skype: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, BuildID[sha1]=0xd6667f895e58d47966d6a572b13125e9110ee256, stripped

Hence of these two:

fdr@maggie:~$ locate v4l1compat
/usr/lib/i386-linux-gnu/libv4l/v4l1compat.so
/usr/lib/x86_64-linux-gnu/libv4l/v4l1compat.so

the i386 one must be used in LD_PRELOAD.