v15 Unable to load libcec.so.3.0
#1
Hello everyone,

I am running Kodi 15 (self compiled) under Debian Jessie and noticed that Kodi can't load libcec.
I have cloned pulseeight repositories and build libcec on my own and installed it.

What did I miss?

Code:
root@xbmc:/usr/local/lib/x86_64-linux-gnu# ldd libcec.so.3.0
        linux-vdso.so.1 (0x00007ffe4e3dc000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007ff8c23c4000)
        libudev.so.1 => /lib/x86_64-linux-gnu/libudev.so.1 (0x00007ff8c21b5000)
        libXrandr.so.2 => /usr/lib/x86_64-linux-gnu/libXrandr.so.2 (0x00007ff8c1fab000)
        libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007ff8c1c68000)
        librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007ff8c1a60000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007ff8c185c000)
        libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007ff8c1551000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007ff8c1250000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007ff8c103a000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007ff8c0c91000)
        /lib64/ld-linux-x86-64.so.2 (0x00007ff8c28cb000)
        libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007ff8c0a7f000)
        libXrender.so.1 => /usr/lib/x86_64-linux-gnu/libXrender.so.1 (0x00007ff8c0875000)
        libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007ff8c0653000)
        libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007ff8c044f000)
        libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007ff8c024a000)
Reply
#2
Did you get a warning when configuring that libcec was not found? I had a similar issue and it turned out I had multiple libcec.pc files lying around so pkgconfig couldn't find it.
Reply
#3
Code:
15:19:11 T:140183102109760   DEBUG: SECTION:LoadDLL(libcec.so.3.0)
15:19:11 T:140183102109760   DEBUG: Loading: libcec.so.3.0
15:19:11 T:140183102109760   ERROR: Unable to load libcec.so.3.0, reason: libcec.so.3.0: cannot open shared object file: No such file or directory
15:19:11 T:140183102109760   DEBUG: Dll libcec.so.3.0 was not found in path

I have checked for libcec.pc files, only one available under /usr/local/lib/pkgconfig and the other as source file in my cloned repository. No other libcec versions are lying on the system.
Reply
#4
You need to rerun configure and post the config.log afterwards.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#5
Here is the config.log http://pastebin.com/HRMxhr6L
Reply
#6
the issue is probably the install location: /usr/local/lib/x86_64-linux-gnu is not in the default linker path.

It should be either: /usr/lib/x86_64-linux-gnu or /usr/local/lib/
Reply
#7
How to tell the cmake of pulse eight's libcec to install somewhere else?
Or in other words to obmit "x86_64-linux-gnu"?

EDIT:
Found the reason for the lib string: https://github.com/Pulse-Eight/libcec/bl...Arch.cmake
Reply
#8
yeah, its a bug. install to /usr:
cmake -DCMAKE_INSTALL_PREFIX=/usr
Reply
#9
see https://github.com/Pulse-Eight/libcec/pull/119 for a fix
Reply
#10
Didn't changed anything on kodi side, only the installation folder is different:

Code:
root@xbmc:~/xbmc# find / -name libcec*
/usr/lib/pkgconfig/libcec.pc
/usr/include/libcec
/usr/local/lib/libcec.so
/usr/local/lib/libcec.so.3.0.1
/usr/local/lib/libcec.so.3.0
/usr/local/include/libcec

config.log contains the same output.
Reply
#11
@wsnipex: Any idea? Can I enable some more detailled debug log?
Reply
#12
no, part from recompiling kodi. Works fine for everyone on ubuntu.
Reply
#13
I have found the issue why the lib isn't loaded. The bin isn't searching at the "wrong" paths.

Here the strace output http://pastebin.com/5EhH6KTm
Reply
#14
its not "the bin" thats searching for the lib, its the dynamic linker. Kodi only calls dlopen().
"man dlopen" explains how this works, in case you are not familiar with it.

So you have a couple of possibilities:
1.) install libcec to prefix /usr
2.) make sure /usr/local/lib is in your ld.so.cache:
- check that /usr/local/lib is somewhere in /etc/ld.so.conf.d/*, usually its libc.conf
- run ldconfig as root
3.) set LD_LIBRARY_PATH=/usr/local/lib as env var, either globally or when starting kodi
Reply

Logout Mark Read Team Forum Stats Members Help
Unable to load libcec.so.3.00