OpenPHT 1.6 building error on Ubuntu 14.04

I am having issues with building OpenPHT1.6 on Ubuntu 14.04. Here are the commands I am using:

Update cmake on Ubuntu 14.04 as OpenPHT 1.6 needs cmake 3.1 or higher:
sudo add-apt-repository ppa:george-edison55/cmake-3.x
sudo apt-get update && sudo apt-get dist-upgrade

cd ~
wget https://github.com/RasPlex/OpenPHT/archive/v1.6.0.113-46fadd5e.tar.gz
tar -xvzf v1.6.0.113-46fadd5e.tar.gz
mkdir ~/openpht-build
cd ~/openpht-build

cmake -DCMAKE_BUILD_TYPE=Debug -DCOMPRESS_TEXTURES=on -DENABLE_AUTOUPDATE=off -DCMAKE_INSTALL_PREFIX=/opt/openpht “~/OpenPHT-1.6.0.113-46fadd5e”

make => this gives me an error!

It seems the “make” fails during the ffmpeg build. First it was complaining about unknown options. I have identified the following unknown options:
“–disable-iwmmxt”, “–disable-libdirac”, --disable-mlib", “–disable-sram”, “–disable-vis”, “–enable-aandct”, “–enable-fastdiv”, “–enable-golomb”, “–enable-huffman”, “–enable-lpc”.

I have edited the ./lib/ffmpeg/CMakeLists.txt file to remove the unknown options. Now I get the following error during “make”:

gcc is unable to create an executable file.
If gcc is a cross-compiler, use the --enable-cross-compile option.
Only do this if you know what cross compiling means.
C compiler test failed.
If you think configure made a mistake, make sure you are using the latest
version from Git. If the latest version fails, report the problem to the
ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file “config.log” produced by configure as this will help
solve the problem.
make[2]: *** [lib/ffmpeg/ffmpeg/src/ffmpeg-stamp/ffmpeg-configure] Error 1
make[1]: *** [lib/ffmpeg/CMakeFiles/ffmpeg.dir/all] Error 2
make: *** [all] Error

Any ideas?

I will try to do the same this weekend, will check if I get the same issue.

I get the same build error on ubuntu 16.04

Hi,

Just finish on a fresh install (ALL) to have a clean Ubuntu 16.04 up to date (In a Vmware guest system)
Status now : (sorry it’s in French (but easy to translate) … ) .
I get an error also for ffmpeg (but a little different)

Error copying directory from “/root/sources/OpenPHT-1.6.0.113-46fadd5e/lib/ffmpeg” to “/root/sources/OpenPHT-1.6.0.113-46fadd5e/lib/ffmpeg/ffmpeg/src/ffmpeg”.
lib/ffmpeg/CMakeFiles/ffmpeg.dir/build.make:89 : la recette pour la cible « lib/ffmpeg/ffmpeg/src/ffmpeg-stamp/ffmpeg-download » a échouée
make[2]: *** [lib/ffmpeg/ffmpeg/src/ffmpeg-stamp/ffmpeg-download] Erreur 1
CMakeFiles/Makefile2:385 : la recette pour la cible « lib/ffmpeg/CMakeFiles/ffmpeg.dir/all » a échouée
make[1]: *** [lib/ffmpeg/CMakeFiles/ffmpeg.dir/all] Erreur 2
Makefile:149 : la recette pour la cible « all » a échouée
make: *** [all] Erreur 2

During Cmake only ONE none blocking problem persist :

– No package ‘libshairplay’ found

even
+++++++
root@philippe-VM16-04:~/sources/OpenPHT-1.6.0.113-46fadd5e# dpkg -l libshairplay*
Souhait=inconnU/Installé/suppRimé/Purgé/H=à garder
| État=Non/Installé/fichier-Config/dépaqUeté/échec-conFig/H=semi-installé/W=attend-traitement-déclenchements
|/ Err?=(aucune)/besoin Réinstallation (État,Err: majuscule=mauvais)
||/ Nom Version Architecture Description
++±=============================-===================-===================-===============================================================
ii libshairplay-dev:amd64 0.9.0.1-2~xenial amd64 Free portable AirPlay server implementation (development files)
ii libshairplay0:amd64 0.9.0.1-2~xenial amd64 Free portable AirPlay server implementation (development files)
root@philippe-VM16-04:~/sources/OpenPHT-1.6.0.113-46fadd5e#
+++++++

Philippe.
NB I have strange line that appear in orange and large ??? sorry but I don’t know why …

The cmake files was never updated for generic linux builds only for libreelec builds in the openpht-1.6 branch.

You can use ENABLE_SHAIRPLAY or ENABLE_SHAIRPORT to control what lib to use.

I have used the following cmake command for compile tests of the openpht-1.5 branch on ubuntu wily.

cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCOMPRESS_TEXTURES=ON -DENABLE_AUTOUPDATE=ON -DENABLE_SHAIRPLAY=OFF -DENABLE_SHAIRPORT=ON -DUSE_INTERNAL_FFMPEG=ON ..

The following CONFIG_FLAGS makes ffmpeg compile but openpht will fail to link:

set(CONFIG_FLAGS --target-os=${OS} --cc=${CMAKE_C_COMPILER} --cxx=${CMAKE_CXX_COMPILER} --sysinclude="${CMAKE_PREFIX_PATH}/usr/include" --enable-shared --disable-static --disable-debug --disable-muxers --disable-encoders --disable-devices --disable-doc --disable-ffplay --disable-ffmpeg --disable-sdl --disable-ffprobe --disable-ffserver --enable-gpl --enable-runtime-cpudetect --enable-postproc --enable-pthreads --enable-muxer=spdif --enable-muxer=adts --enable-muxer=asf --enable-muxer=ipod --enable-encoder=ac3 --enable-encoder=aac --enable-protocol=http --enable-protocol=https --enable-gnutls --enable-vdpau --enable-vaapi --enable-libvorbis --enable-muxer=ogg --enable-encoder=libvorbis)

Hi,

Thanks for your help

following your remark … I have use SHAIRPLAY and SHAIRPORT
Also I have not see in the long list of cmake variable : USE_INTERNAL_FFMPEG …
so in 16.04 ffmpeg (provide in Ubuntu) is at good level 2.8 …
so adding this variable with NO bypass the ffmpeg problem …

Now I will run the make (and re-run each time a new library is missing) … but all any step by step advance …

I will inform of result here … for the moment make just pass the 50% … so nothing sure but one more one by one we progress …

Philippe.

Hi,
some **success **…
It’s late (in France) but the compile and link + texture generation is complete without any fatal error (only some warning (as usual) in the code)


[100%] Linking CXX executable plexhometheater
[100%] Built target OpenPHT
Scanning dependencies of target CompressTextures
[100%] Generating Textures.xbt

[100%] Built target CompressTextures

I will test it tomorrow …

BUT a good first step …

Philippe.

The config.log contains the following additional info. Will troubleshoot on the weekend.

plex@htpc:~/openpht-build$ tail -10 ./lib/ffmpeg/ffmpeg/src/ffmpeg-build/config.log
check_ld cc
check_cc
BEGIN /tmp/ffconf.BzRb0NzJ.c
1 int main(void){ return 0; }
END /tmp/ffconf.BzRb0NzJ.c
gcc --sysroot= -isysroot -c -o /tmp/ffconf.lK5e6YLs.o /tmp/ffconf.BzRb0NzJ.c
gcc --sysroot= -isysroot -o /tmp/ffconf.vZw6zq0m /tmp/ffconf.lK5e6YLs.o
/tmp/ffconf.vZw6zq0m: file not recognized: File truncated
collect2: error: ld returned 1 exit status
C compiler test failed.

I don’t have the time and experience to build it myself but it would be so great to have binaries of OpenPHT for Ubuntu, or at least a comprehensive guide on how to compile. Hope you guys can get it done!

Hi,

F.Y.I. (after a first series of tests … )
under Ubuntu 16.04 … **OpenPHT seems to run as well ** (even for the moment I will run only short tests)

Now I can (based on this) try to solve the problem with ffmpeg :
Error copying directory from “/root/sources/OpenPHT-1.6.0.113-46fadd5e/lib/ffmpeg” to “/root/sources/OpenPHT-1.6.0.113-46fadd5e/lib/ffmpeg/ffmpeg/src/ffmpeg”.

to be able to use the integrated ffmpeg and not the Ubuntu one (2.8.6) … (for coherency)

Philippe.

following your remark … I have use SHAIRPLAY and SHAIRPORT
Also I have not see in the long list of cmake variable : USE_INTERNAL_FFMPEG …
so in 16.04 ffmpeg (provide in Ubuntu) is at good level 2.8 …
so adding this variable with NO bypass the ffmpeg problem …

Hello,

I ran into the same FFMPEG problem and would like to bypass as well, FFMPEG is installed and good on Ubuntu 14.04.

however if I saerch for Use_Internal_FFMPEG I get a lot of files with this text.

Which one did you edit to bypass?

Thanks

Hi,

No don’t edit anythings … just add in cmake command :
-DUSE_INTERNAL_FFMPEG=OFF

It’s all and enough …

in fact you can have ALL the possible parameters by doing :
in root folder of the OpenPHT source
cmake -LAH … unfortunately a long list but fortunately with a comment before each … to identify the usage …
ex.
… …
// Use internal FFmpeg?
USE_INTERNAL_FFMPEG:BOOL=ON
… …

Philippe.
NB Thanks to Kwiboo … to open my eyes …

Thx for the respone, Father_mande.

In between my last post and you replying I also figured it out, how to add the command to cmake.

However (I’m on Ubuntu 14.04) I get errors:

cmake -DCMAKE_BUILD_TYPE=Debug -DCOMPRESS_TEXTURES=on -DUSE_INTERNAL_FFMPEG=OFF -DENABLE_AUTOUPDATE=off -DCMAKE_INSTALL_PREFIX=/opt/openpht "~/openpht-src"

-- Looking for FFmpeg library avdevice - not found
-- Looking for FFmpeg library avfilter - not found
-- Looking for FFmpeg library postproc - not found
-- Looking for FFmpeg library swresample - not found
CMake Error at plex/CMakeModules/FindFFmpeg.cmake:141 (MESSAGE):
  Could not find FFMPEG

apt-get install ffmpeg

ffmpeg is already installed.

cmake -DCMAKE_BUILD_TYPE=Debug -DCOMPRESS_TEXTURES=on -DUSE_INTERNAL_FFMPEG=OFF -DENABLE_AUTOUPDATE=off -DCMAKE_INSTALL_PREFIX=/opt/openpht “~/OpenPHT-1.6.0.113-46fadd5e”
– Looking for FFmpeg library swresample - found
CMake Error at plex/CMakeModules/FindFFmpeg.cmake:141 (MESSAGE):
Could not find FFMPEG
Call Stack (most recent call first):
plex/CMakeModules/CMakeFunctions.cmake:143 (find_package)
plex/CMakeModules/PlatformConfigLINUX.cmake:55 (plex_find_package)
plex/CMakeModules/CMakeConfig.cmake:74 (include)
CMakeLists.txt:55 (include)

sudo apt-get install ffmpeg
ffmpeg is already the newest version (7:2.8.6-1ubuntu2).

You will need the libavdevice-dev package not ffmpeg (it depends on all other ffmpeg dev packages)

Also note that the system bundled ffmpeg do not have some kodi specific patches and a plex.direct specific patch. Using ffmpeg avio as network transport will not work correctly.

yeah so i installed that package and got hit with this on the make
[ 8%] Performing configure step for ‘ffmpeg’
Unknown option “–disable-iwmmxt”.
See /home/htpc/openpht1.6/lib/ffmpeg/ffmpeg/src/ffmpeg/configure --help for available options.
lib/ffmpeg/CMakeFiles/ffmpeg.dir/build.make:107: recipe for target ‘lib/ffmpeg/ffmpeg/src/ffmpeg-stamp/ffmpeg-configure’ failed
make[2]: *** [lib/ffmpeg/ffmpeg/src/ffmpeg-stamp/ffmpeg-configure] Error 1
CMakeFiles/Makefile2:385: recipe for target ‘lib/ffmpeg/CMakeFiles/ffmpeg.dir/all’ failed
make[1]: *** [lib/ffmpeg/CMakeFiles/ffmpeg.dir/all] Error 2
Makefile:149: recipe for target ‘all’ failed
make: *** [all] Error 2

woof i forgot to cmake with -DUSE_INTERNAL_FFMPEG=OFF
since i did that things look clean. thanks man

Okay so after getting that additional package installed this worked:
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCOMPRESS_TEXTURES=ON -DENABLE_AUTOUPDATE=ON -DENABLE_SHAIRPLAY=OFF -DENABLE_SHAIRPORT=ON -DUSE_INTERNAL_FFMPEG=OFF “~/OpenPHT-1.6.0.113-46fadd5e/”
make
sudo make install

TonioRoffo it looks like you need to install at least these additional packages:
libavdevice-dev libavdevice-dev libpostproc-dev libswresample-dev
sudo apt install each one should be fine

Note that libswresample-dev package is not available on Ubuntu 14.04, so the cmake will fail even if using the -DUSE_INTERNAL_FFMPEG=OFF option.

It seems like the only option is to use a ppa to install ffmpeg or compile yourself. The internal ffmpeg provided with OpenPHT1.6 fails during compilation on Ubuntu.

Thanks kwiboo & lukemz for pointing out for new option to denable ffmpeg.

Hey, vdimitrov can we use this ppa https://launchpad.net/~archivematica/+archive/ubuntu/externals-dev/+build/9040122 ? to install libswewsample.

while installing by dpkg I am getting this error :

dpkg: error processing package libswresample-dev (–install):
dependency problems - leaving unconfigured
Errors were encountered while processing:
libswresample2:amd64
libswresample-dev