Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 402223 - app-emulation/emul-linux-x86-medialibs-20110928 can't load /usr/lib32/libv4l/v4l1compat.so
Summary: app-emulation/emul-linux-x86-medialibs-20110928 can't load /usr/lib32/libv4l/...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Alexis Ballier
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-05 01:52 UTC by pierre
Modified: 2012-02-08 21:17 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
libv4l-0.8.5.ebuild with multilib (libv4l-0.8.5.ebuild,1.76 KB, text/plain)
2012-02-05 01:55 UTC, pierre
Details

Note You need to log in before you can comment on or make changes to this bug.
Description pierre 2012-02-05 01:52:30 UTC
on a amd64 multilib setup, to use skype with a "Bus 001 Device 002: ID 0402:5602 ALi Corp. M5602 Video Camera Controller", I have to use libv4l x86 v4l1compat.so libraries.

it is usually provided by app-emulation/emul-linux-x86-medialibs.
so I do the 
export LD_PRELOAD=/usr/lib32/libv4l/v4l1compat.so && skype but I get 
"ERROR: ld.so: object '/usr/lib32/libv4l/v4l1compat.so' from LD_PRELOAD cannot be preloaded: ignored"

ldd -d -r /usr/lib32/libv4l/v4l1compat.so gives no error message

inspired by comment #3 on http://bugs.gentoo.org/show_bug.cgi?id=283746, I've made an ebuild to build libv4l with multilib. once I have removed duplicate files from emul-linux-x86-medialibs, it does build and install nicely. but still, I have the exact same message.

ldd -d -r /usr/lib32/libv4l/v4l1compat.so now gives
	linux-gate.so.1 =>  (0xf77a0000)
	libv4l1.so.0 => /usr/lib32/libv4l1.so.0 (0xf7770000)
	libc.so.6 => /lib32/libc.so.6 (0xf7614000)
	libv4l2.so.0 => /usr/lib32/libv4l2.so.0 (0xf7608000)
	libpthread.so.0 => /lib32/libpthread.so.0 (0xf75ee000)
	/lib/ld-linux.so.2 (0xf77a1000)
	libv4lconvert.so.0 => /usr/lib32/libv4lconvert.so.0 (0xf7578000)
	librt.so.1 => /lib32/librt.so.1 (0xf756f000)
	libm.so.6 => /lib32/libm.so.6 (0xf7549000)
	libjpeg.so.8 => /usr/lib32/libjpeg.so.8 (0xf74f9000)

file /usr/lib32/libv4l/v4l1compat.so gives 
/usr/lib32/libv4l/v4l1compat.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, stripped

everything else works just fine. I really don't understand why I can't load either emul-linux-x86-medialibs or my own library... so please help me investigate that one!

Reproducible: Always

Steps to Reproduce:
1.install last skype
2.install either last emul-linux-x86-medialibs or last libv4l multilib
3.launch skype with a LD_PRELOAD=/usr/lib32/libv4l/v4l1compat.so
Actual Results:  
"ERROR: ld.so: object '/usr/lib32/libv4l/v4l1compat.so' from LD_PRELOAD cannot be preloaded: ignored"

Expected Results:  
no error message and display my face on the screen!!!

Portage 2.1.10.44 (default/linux/amd64/10.0, gcc-4.5.3, glibc-2.13-r4, 3.2.1-gentoo-r2 x86_64)
=================================================================
System uname: Linux-3.2.1-gentoo-r2-x86_64-AMD_Turion-tm-_64_X2_Mobile_Technology_TL-58-with-gentoo-2.1
Timestamp of tree: Sat, 04 Feb 2012 23:00:01 +0000
ccache version 3.1.6 [enabled]
app-shells/bash:          4.1_p9
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.6.6-r2, 2.7.2-r3
dev-util/ccache:          3.1.6
dev-util/cmake:           2.8.6-r4
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.1
sys-apps/openrc:          0.9.8.4
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.9.6-r3, 1.11.1
sys-devel/binutils:       2.21.1-r1
sys-devel/gcc:            4.5.3-r1
sys-devel/gcc-config:     1.4.1-r1
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 3.1 (virtual/os-headers)
sys-libs/glibc:           2.13-r4
Repositories: gentoo pierre
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=k8 -msse3 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=k8 -msse3 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs buildpkg ccache distlocks ebuild-locks fixlafiles news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://mirror.ovh.net/gentoo-distfiles/ ftp://mirror.ovh.net/gentoo-distfiles/ ftp://gentoo.imj.fr/pub/gentoo/ ftp://ftp.free.fr/mirrors/ftp.gentoo.org/ "
LANG="en_US.UTF-8"
LC_ALL=""
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="fr en fr_FR en_US"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/local/packages/"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/pierre"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X a52 aac aalib acl acpi alsa amd64 ati bash-completion berkdb bzip2 cairo ccache cdr cli consolekit cracklib crypt cxx dbus dga dri dvd exif ffmpeg flac fontconfig fortran gallium gdbm gif gimp gpm gstreamer gtk iconv imagemagic ipv6 java java6 jpeg jpeg2k lcms libnotify lm_sensors loop-aes lxde mikmod mmx mmxext modules mp3 mpeg mudflap multilib ncurses networkmanager nls nptl nptlonly ogg opengl openmp pam pcre pdf png policykit pppd radeon raw readline sdl session smp sqlite sse sse2 ssl startup-notification svg sysfs tcpd thunar tiff truetype udev unicode usb v4l v4l2 vim-syntax vorbis wifi x264 xfce xinerama xml xml2 xorg xpm xv zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan stage tables krita karbon braindump" CAMERAS="canon" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="fr en fr_FR en_US" LIRC_DEVICES="packard_bell" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="ati radeon r300" XFCE_PLUGINS="logout clock brightness" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 pierre 2012-02-05 01:55:25 UTC
Created attachment 300935 [details]
libv4l-0.8.5.ebuild with multilib

here is the modified libv4l-0.8.5.ebuild with multilib enabled
Comment 2 Pacho Ramos gentoo-dev 2012-02-06 19:31:19 UTC
Not sure what is wrong with libv4l as you say also "native" lib is broken :/
Comment 3 pierre 2012-02-06 22:01:03 UTC
there is a new version of libv4l ebuild : media-libs/libv4l-0.8.5-r1 

it adds a patch. but it doesn't help...
Comment 4 pierre 2012-02-06 22:16:24 UTC
I've also tried to downgrade libv4l to 0.8.4 and 0.8.3 . no luck
versions prior to 0.8.1 do not compile with "newer" kernel. they miss a linux/videodev.h file as mention in http://freecode.com/projects/libv4l/releases/330187
Comment 5 pierre 2012-02-06 22:32:26 UTC
I have emailed Hans de Goede ( who owns libv4l git )at he's redhat.com address if he can have a look on that bug. I will report any answer...
Comment 6 Alexandre Rostovtsev (RETIRED) gentoo-dev 2012-02-06 23:26:11 UTC
Pierre, you cannot do "export LD_PRELOAD=/usr/lib32/libv4l/v4l1compat.so && skype". This is because Gentoo's /usr/bin/skype is a shell script which on your machine is interpreted by a 64-bit /bin/sh, and 64-bit executables cannot preload 32-bit libraries.

Instead, you must create /usr/local/bin/skype so that it looks something like this:

#!/bin/sh
cd "/opt/skype"
if [ -n "/opt/skype" ] ; then
        if [ "${LD_LIBRARY_PATH+set}" = "set" ] ; then
                export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/opt/skype"
        else
                export LD_LIBRARY_PATH="/opt/skype"
        fi
fi
export LD_PRELOAD=/usr/lib32/libv4l/v4l2convert.so
exec /opt/skype/skype "$@"

Then chmod +x /usr/local/bin/skype, and make sure that either /usr/local/bin comes before /usr/bin in your PATH, or that you use the /usr/local/bin version whenever you launch skype.
Comment 7 pierre 2012-02-08 21:17:10 UTC
now I really feel stupid...

even if my webcam still doesn't work! But At least, I don't have error message...