I have a retropie setup (Wheezie) running, and a while back installed libcec to get my TV remote to work with the Kodi package Installed via Retropie. ( This works by the way )

I was tying to have a go a python and the cec package to see what I could do with it. However it threw lots of errors and I couldn't import the cec package. So I decided to try the terminal first.

With little succes (see error below).

$ cec-client -t p -l


$ cec-client-3.0.1 -t p -l


== using device type 'playback device'
    libCEC version: 3.0.1, git revision: libcec-2.1.4+223-2f62595, compiled on Fri Jan  1 19:50:56 UTC 2016 by pi@retropie on Linux 4.1.13-v7+ (armv7l), features: P8_USB, DRM, P8_detect, randr
    Found devices: NONE

notice how RPI is missing from the list

Next I tried to remove lib-cec and anything that said "cec" in its name. Doing so I kind of broke Kodi and the cec client was still there.

After reinstalling Kodi again, I'm back to square one. Trying to install libcec from source, trying to also include RPI but again without success, with whatever I tried. The error below kept popping its head.

/usr/bin/ld: cannot find -lvcos
/usr/bin/ld: cannot find -lvchiq_arm
/usr/bin/ld: cannot find -lbcm_host
collect2: error: ld returned 1 exit status
src/libcec/CMakeFiles/cec.dir/build.make:888: recipe for target 'src/libcec/libcec.so.3.1.0' failed
make[2]: *** [src/libcec/libcec.so.3.1.0] Error 1
CMakeFiles/Makefile2:227: recipe for target 'src/libcec/CMakeFiles/cec.dir/all' failed
make[1]: *** [src/libcec/CMakeFiles/cec.dir/all] Error 2
Makefile:113: recipe for target 'all' failed
make: *** [all] Error 2

So after going in full circle I decided to ask here. Needless to say, I'm pretty new to the building from source scene.

2 Answers 2


The only way I was able to fix this, is upgrading to Jessie and rebuilding it from source.

This time I didn't use make install but checkinstall to not have those issues in future.


Those error message from the linker ld is tell you it cannot find the required librariesheader files to linkinclude with the software that has been when it is compiled. That usually means installing the development versions of something that you may already have the runtime part of - or installing both - it depends! As for the specifics of your case:

/usr/bin/ld: cannot find -lvcos
/usr/bin/ld: cannot find -lvchiq_arm
/usr/bin/ld: cannot find -lbcm_host

The -l (that is an 'el' BTW) flag is used to tell the linker the name of the library to link with (and an -L flag would tell it where to find it if it is not in the usual place. All three of those libraries libvcos.so, libvchiq_arm.so and libbcm_host.so which is what the linker will be looking for, are (on my Raspbian "Jessie" RPi) found in the /opt/vc/lib/ directory and are part of the libraspberrypi0 package. This does seem to be available for Wheezy (indeed it seems essential for usage of some parts of the RPi hardware) so my best guess is that you need to get -L /opt/vc/lib included in the commands used to run the linker...!


I got that wrong - and I would have run into the same issue myself - the libraries are present but the headers are NOT! We would both need a package called libraspberrypi-dev which, as the name suggests, provides the headers and other development files needed when compiling code in addition to the runtime files needed when using the libraries concerned.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.