OpenPHT

Building under an Ubuntu Derivative

Here's the post of someone who first got it working that I've seen

https://forums.plex.tv/t/build-working-openpht-1-9-0-from-source-on-ubuntu-bionic-18-04-lts/363351

Specifically, the patches make it so that you can avoid installing old package version



(after you pull)


wget https://github.com/RasPlex/Dockerfiles/raw/master/patches/plexht-0001-cec-update-to-libcec-4.patch
wget https://github.com/RasPlex/Dockerfiles/raw/master/patches/plexht-0002-websocketpp-openssl.patch
patch -p1 < plexht-0001-cec-update-to-libcec-4.patch # libcec>=4
patch -p1 < plexht-0002-websocketpp-openssl.patch # openssl>=1.1




sudo apt install build-essential git-core

sudo add-apt-repository ppa:team-xbmc/ppa

sudo apt-get update
sudo apt-get build-dep kodi

sudo apt-get install libsdl-image1.2-dev libflac++-dev libshairport-dev








Troubleshooting

$ sudo apt-get build-dep
E: Must specify at least one package to check builddeps for

    sudo nano /etc/apt/sources.list
    # Uncomment all the sourced lines, e.g.

    #deb-src

Could NOT find libcrypto

    sudo apt-get install libssl-dev

Could NOT find GLEW

    sudo apt-get install libglew-dev

Could NOT find VORBIS

    sudo apt-get install libvorbis-dev

Could NOT find MPEG2

    libmpeg2-4-dev

Could NOT find RTMP

    librtmp-dev

Could NOT find SHAIRPLAY

    libshairplay-dev



---

Errors during Make

‘CEC::libcec_configuration {aka struct CEC::libcec_configuration}’ has no member named ‘bPowerOnScreensaver’

    Add the option to disable CEC
  
    -DENABLE_CEC=off
    #make clean and make again

or

Add the old sources from xenial

    https://packages.ubuntu.com/xenial/libs/libcec3
    https://packages.ubuntu.com/xenial/libcec-dev

    wget http://mirrors.kernel.org/ubuntu/pool/universe/libc/libcec/libcec3_3.0.1+dfsg2-9build1_amd64.deb
    wget http://mirrors.kernel.org/ubuntu/pool/universe/libc/libcec/libcec-dev_3.0.1+dfsg2-9build1_amd64.deb

    sudo dpkg --force-all -i libcec3_3.0.1+dfsg2-9build1_amd64.deb
    sudo dpkg --force-all -i libcec-dev_3.0.1+dfsg2-9build1_amd64.deb



 error: ‘SSL_R_SHORT_READ’ was not declared in this scope


    https://packages.ubuntu.com/xenial/libssl-dev

    wget http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl-dev_1.0.2g-1ubuntu4.14_amd64.deb

    sudo dpkg --force-all -i libssl-dev_1.0.2g-1ubuntu4.14_amd64.deb



Sources:

https://forums.plex.tv/t/building-openpht-for-ubuntu/125965
https://techoverflow.net/2018/05/03/how-to-fix-apt-get-source-you-must-put-some-source-uris-in-your-sources-list/
https://github.com/RasPlex/OpenPHT/issues/246
https://www.linuxquestions.org/questions/linux-newbie-8/ubuntu-how-to-install-package-from-older-distro%27s-ppa-4175598045/
Comments