Skip to content

Instantly share code, notes, and snippets.

@ssalonen
Last active August 28, 2022 14:41
Show Gist options
  • Save ssalonen/2afd026ffe2b35a2f987d634cb3ed5b4 to your computer and use it in GitHub Desktop.
Save ssalonen/2afd026ffe2b35a2f987d634cb3ed5b4 to your computer and use it in GitHub Desktop.
libcec6 build
`libcec6` from raspbian repos is missing the feature for built-in CEC module of raspberry pi
Here is how to build it yourself. Based on https://github.com/Pulse-Eight/libcec/blob/master/docs/README.raspberrypi.md
```
# ensure we remove libcec from repos
sudo apt-get remove libcec6 libcec-dev cec-utils
# install p8 platform including -dev package for easy cmake
sudo apt-get install -y libp8-platform-dev libp8-platform cmake libudev-dev libxrandr-dev python3-dev swig git
# compile libcec yourself
git clone --recursive https://github.com/Pulse-Eight/libcec.git
cd libcec
git checkout libcec-6.0.2
mkdir build
cd build
cmake -DRPI_INCLUDE_DIR=/opt/vc/include -DRPI_LIB_DIR=/opt/vc/lib ..
make -j4
sudo make install
sudo ldconfig
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment