Forums » Tutorial and setups »
[MANUAL] Building .DEB packages on clean Ubuntu or other Debian distros
Added by saen acro almost 8 years ago
- Table of contents
- Manual debugging step by step
- GPU VA hardware acceleration aka Transcoding
- Short version of all needed packages
- How to clone Github repo to local folder
- ARM OpenMax support
- Python
- Automated build script
Manual debugging step by step¶
There is a manual in WIKI with says there is a some needed packages dependency
https://tvheadend.org/projects/tvheadend/wiki/Building
Following this manual (from wiki) there is no chance to make any package
So here is how to solve this:
(Ubuntu 14.04LTS x86_64 used but possible to be used on newer, even "x86" version)
There is a lot of packages with need to install
First packages from wiki
sudo apt install build-essential git pkg-config libssl-dev bzip2 wget libavahi-client-dev zlib1g-dev libavcodec-dev libavutil-dev libavformat-dev libswscale-dev libavresample-dev
so let see is this correct by running
./configure
and result is
/opt/tvheadend# ./configure Checking support/features checking for cc execinfo.h ... ok checking for cc -mmmx ... ok checking for cc -msse2 ... ok checking for cc -Wunused-result ... ok checking for cc getloadavg ... ok checking for cc atomic64 ... ok checking for cc atomic_time_t ... ok checking for cc bitops64 ... ok checking for cc lockowner ... ok checking for cc qsort_r ... ok checking for cc stime ... ok checking for cc gmtoff ... ok checking for cc recvmmsg ... ok checking for cc sendmmsg ... ok checking for cc libiconv ... fail checking for cc libdvben50221 ... fail checking for cc ifnames ... ok checking for py module gzip ... ok checking for pkg-config ... ok checking for xgettext ... fail ERROR: no gettext binaries found
surprise nothing happens
so we need package gettext
sudo apt install gettext
again configure command
/opt/tvheadend# ./configure Checking support/features checking for cc execinfo.h ... ok checking for cc -mmmx ... ok checking for cc -msse2 ... ok checking for cc -Wunused-result ... ok checking for cc getloadavg ... ok checking for cc atomic64 ... ok checking for cc atomic_time_t ... ok checking for cc bitops64 ... ok checking for cc lockowner ... ok checking for cc qsort_r ... ok checking for cc stime ... ok checking for cc gmtoff ... ok checking for cc recvmmsg ... ok checking for cc sendmmsg ... ok checking for cc libiconv ... fail checking for cc libdvben50221 ... fail checking for cc ifnames ... ok checking for py module gzip ... ok checking for pkg-config ... ok checking for xgettext ... ok checking for msgmerge ... ok checking for gzip ... ok checking for bzip2 ... ok checking for pkg openssl ... ok (detected 1.0.1f) checking for cc linux/dvb/version.h ... ok checking for pkg zlib ... ok (detected 1.2.8) checking for pkg liburiparser ... fail (detected <none>) checking for pkg avahi-client ... ok (detected 0.6.31) checking for cmake ... fail ERROR: cmake not found
Again missing essential part
sudo apt install cmake
Again configure ShowHide
/opt/tvheadend# ./configure Checking support/features checking for cc execinfo.h ... ok checking for cc -mmmx ... ok checking for cc -msse2 ... ok checking for cc -Wunused-result ... ok checking for cc getloadavg ... ok checking for cc atomic64 ... ok checking for cc atomic_time_t ... ok checking for cc bitops64 ... ok checking for cc lockowner ... ok checking for cc qsort_r ... ok checking for cc stime ... ok checking for cc gmtoff ... ok checking for cc recvmmsg ... ok checking for cc sendmmsg ... ok checking for cc libiconv ... fail checking for cc libdvben50221 ... fail checking for cc ifnames ... ok checking for py module gzip ... ok checking for pkg-config ... ok checking for xgettext ... ok checking for msgmerge ... ok checking for gzip ... ok checking for bzip2 ... ok checking for pkg openssl ... ok (detected 1.0.1f) checking for cc linux/dvb/version.h ... ok checking for pkg zlib ... ok (detected 1.2.8) checking for pkg liburiparser ... fail (detected <none>) checking for pkg avahi-client ... ok (detected 0.6.31) checking for cmake ... ok checking for cc -lstdc++ ... ok checking for cc nvEncodeAPI.h ... fail checking for cc sys/inotify.h ... ok fetching dvb-scan files ... ok checking for pkg dbus-1 ... ok (detected 1.6.18) Compiler: Using C compiler: cc Build for arch: x86_64 Binaries: Using PYTHON: python Using GZIP: gzip Using BZIP2: bzip2 Options: pie yes ccdebug no cwc yes capmt yes constcw yes linuxdvb yes satip_server yes satip_client yes hdhomerun_client yes hdhomerun_static yes iptv yes tsfile yes dvbscan yes timeshift yes trace yes imagecache yes avahi yes zlib yes libav yes ffmpeg_static yes libx264 yes libx264_static yes libx265 yes libx265_static yes libvpx yes libvpx_static yes libtheora yes libtheora_static yes libvorbis yes libvorbis_static yes libfdkaac yes libfdkaac_static yes nvenc no qsv no libmfx_static no inotify yes epoll yes uriparser no ccache no tvhcsa yes bundle no dvbcsa no dvben50221 no kqueue no dbus_1 yes android no tsdebug no gtimer_check no slow_memoryinfo no libsystemd_daemon no bintray_cache yes execinfo yes mmx yes sse2 yes W_unused_result yes getloadavg yes atomic64 yes atomic_time_t yes bitops64 yes lockowner yes qsort_r yes stime yes gmtoff yes recvmmsg yes sendmmsg yes ifnames yes py_gzip yes bin_pkg_config yes bin_xgettext yes bin_msgmerge yes bin_gzip yes bin_bzip2 yes ssl yes linuxdvbapi yes upnp yes bin_cmake yes stdcpp yes libogg_static yes inotify_h yes mpegts yes mpegts_dvb yes Packages: openssl 1.0.1f zlib 1.2.8 avahi-client 0.6.31 dbus-1 1.6.18 Installation paths: Prefix: /usr/local Binaries: ${prefix}/bin Libraries: ${prefix}/lib Data files: ${prefix}/share Man pages: ${datadir}/man Final Binary: /opt/tvheadend/build.linux/tvheadend Tvheadend Data Directory: /usr/local/share/tvheadend
And success, there is a chance to build .DEB, but is it so simple are we miss some?
checking for cc libiconv ... fail checking for cc libdvben50221 ... fail checking for pkg liburiparser ... fail (detected <none>)
those maby not 100% needed but lets install it:
libiconv
there is some strange with this library in newer version it is build in in in other library
sudo apt install libiconv-hook-dev
/// this will not solve dependency error message, maby error in configure script
libdvben50221
this is DVB-CI support for hardware CAM module on some devices
solved by instaling dvb-apps
sudo apt install dvb-apps
liburiparser
sudo apt install liburiparser-dev
Let's see with configure ShowHide
/opt/tvheadend# ./configure Checking support/features checking for cc execinfo.h ... ok checking for cc -mmmx ... ok checking for cc -msse2 ... ok checking for cc -Wunused-result ... ok checking for cc getloadavg ... ok checking for cc atomic64 ... ok checking for cc atomic_time_t ... ok checking for cc bitops64 ... ok checking for cc lockowner ... ok checking for cc qsort_r ... ok checking for cc stime ... ok checking for cc gmtoff ... ok checking for cc recvmmsg ... ok checking for cc sendmmsg ... ok checking for cc libiconv ... fail checking for cc libdvben50221 ... ok checking for cc ifnames ... ok checking for py module gzip ... ok checking for pkg-config ... ok checking for xgettext ... ok checking for msgmerge ... ok checking for gzip ... ok checking for bzip2 ... ok checking for pkg openssl ... ok (detected 1.0.1f) checking for cc linux/dvb/version.h ... ok checking for pkg zlib ... ok (detected 1.2.8) checking for pkg liburiparser ... ok (detected 0.7.5) checking for pkg avahi-client ... ok (detected 0.6.31) checking for cmake ... ok checking for cc -lstdc++ ... ok checking for cc nvEncodeAPI.h ... fail checking for cc sys/inotify.h ... ok fetching dvb-scan files ... ok checking for pkg dbus-1 ... ok (detected 1.6.18) Compiler: Using C compiler: cc Using LD flags: -ldvben50221 -ldvbapi -lucsi Build for arch: x86_64 Binaries: Using PYTHON: python Using GZIP: gzip Using BZIP2: bzip2 Options: pie yes ccdebug no cwc yes capmt yes constcw yes linuxdvb yes satip_server yes satip_client yes hdhomerun_client yes hdhomerun_static yes iptv yes tsfile yes dvbscan yes timeshift yes trace yes imagecache yes avahi yes zlib yes libav yes ffmpeg_static yes libx264 yes libx264_static yes libx265 yes libx265_static yes libvpx yes libvpx_static yes libtheora yes libtheora_static yes libvorbis yes libvorbis_static yes libfdkaac yes libfdkaac_static yes nvenc no qsv no libmfx_static no inotify yes epoll yes uriparser yes ccache no tvhcsa yes bundle no dvbcsa no dvben50221 yes kqueue no dbus_1 yes android no tsdebug no gtimer_check no slow_memoryinfo no libsystemd_daemon no bintray_cache yes execinfo yes mmx yes sse2 yes W_unused_result yes getloadavg yes atomic64 yes atomic_time_t yes bitops64 yes lockowner yes qsort_r yes stime yes gmtoff yes recvmmsg yes sendmmsg yes libdvben50221 yes ifnames yes py_gzip yes bin_pkg_config yes bin_xgettext yes bin_msgmerge yes bin_gzip yes bin_bzip2 yes ssl yes linuxdvbapi yes upnp yes bin_cmake yes stdcpp yes libogg_static yes inotify_h yes linuxdvb_ca yes mpegts yes mpegts_dvb yes Packages: openssl 1.0.1f zlib 1.2.8 liburiparser 0.7.5 avahi-client 0.6.31 dbus-1 1.6.18 Installation paths: Prefix: /usr/local Binaries: ${prefix}/bin Libraries: ${prefix}/lib Data files: ${prefix}/share Man pages: ${datadir}/man Final Binary: /opt/tvheadend/build.linux/tvheadend Tvheadend Data Directory: /usr/local/share/tvheadend
Some will ask about
checking for cc nvEncodeAPI.h ... fail
this is NVENC (nVidia hardware accelerator for transcoding)
I don't use nVidia can't help, there is a separate topic
So let's continue with bulding of .DEB packages.
Next step is to use Autobuild.sh, with will make all automatically. or not.
/opt/tvheadend# ./Autobuild.sh dpkg-buildpackage: пакет източник tvheadend dpkg-buildpackage: source version 4.1-2398~gc38af4c dpkg-buildpackage: source distribution unstable dpkg-buildpackage: source changed by Andreas Öman <[email protected]> dpkg-buildpackage: host architecture amd64 dpkg-source --before-build tvheadend dpkg-checkbuilddeps: Unmet build dependencies: debhelper (>= 7.0.50) libcurl4-gnutls-dev dpkg-buildpackage: warning: build dependencies/conflicts unsatisfied; aborting dpkg-buildpackage: warning: (Use -d flag to override.)
Again something missing
sudo apt install debhelper libcurl4-gnutls-dev
Crossing fingers an run again Autobuild.sh
If everything is OK,
compilation of FFMPEG X264/5 OGG AAC and some other codecs will be compiled before TVHeadend and finally .DEB files.
If there is no critical errors at the end there is show something as this
dpkg-buildpackage: binary only upload (no source included) doozer-versioned-artifact:/opt/tvheadend/../tvheadend_4.1-2398~gc38af4c_amd64.deb:deb:application/x-deb:tvheadend_4.1-2398~gc38af4c_amd64.deb doozer-versioned-artifact:/opt/tvheadend/../tvheadend-dbg_4.1-2398~gc38af4c_amd64.deb:deb:application/x-deb:tvheadend-dbg_4.1-2398~gc38af4c_amd64.deb doozer-versioned-artifact:/opt/tvheadend/../tvheadend_4.1-2398~gc38af4c_amd64.changes:changes:text/plain:tvheadend_4.1-2398~gc38af4c_amd64.changes
/opt/tvheadend/../
this mean that I'm using /opt/tvheadend/ (source from git)
and files are generated in ../ (upper level) in this case /opt
installation can be done by command
sudo dpkg -i tvheadend_4.1-2398~gc38af4c_amd64.deb
=====
Edit new dependency libpcre /Perl 5 Compatible Regular Expression Library/
to install it add
Sudo apt instal libpcre2-dev
Warning library is not accessible to all OS versions then use libpcre3-dev
GPU VA hardware acceleration aka Transcoding¶
checking for pkg libva >=0.38.0 ... ok (detected 0.39.0)
checking for pkg libva-x11 >=0.38.0 ... ok (detected 0.39.0)
checking for pkg libva-drm >=0.38.0 ... ok (detected 0.39.0)
libva-dev
libva-drm1 (libva-drm2)
libva-x11-1 (libva-x11-1)
i965-va-driver-shaders (Latest Debian probably Ubuntu 20.04 for Intel GPU)
to work hardware need to support VA-API version minimum 0.39.0
ex.
ShowHide
i5-4440 - HD4600
# vainfo
error: XDG_RUNTIME_DIR not set in the environment.
error: can't connect to X server!
libva info: VA-API version 0.39.0 <<<<<<<<<<<<<<<<<<<<<<<<<<<
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_39
libva info: va_openDriver() returns 0
vainfo: VA-API version: 0.39 (libva 1.7.0)
vainfo: Driver version: Intel i965 driver for Intel(R) Haswell Desktop - 1.7.0
vainfo: Supported profile and entrypoints
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Simple : VAEntrypointEncSlice
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointEncSlice
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
VAProfileH264Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointEncSlice
VAProfileH264High : VAEntrypointVLD
VAProfileH264High : VAEntrypointEncSlice
VAProfileH264MultiviewHigh : VAEntrypointVLD
VAProfileH264MultiviewHigh : VAEntrypointEncSlice
VAProfileH264StereoHigh : VAEntrypointVLD
VAProfileH264StereoHigh : VAEntrypointEncSlice
VAProfileVC1Simple : VAEntrypointVLD
VAProfileVC1Main : VAEntrypointVLD
VAProfileVC1Advanced : VAEntrypointVLD
VAProfileNone : VAEntrypointVideoProc
VAProfileJPEGBaseline : VAEntrypointVLD
there is a situation when Intel drivers are very buggy but work also
ex:
ShowHide
Intel Corporation Atom Processor D410 - IGMA3510
#vainfo
error: XDG_RUNTIME_DIR not set in the environment.
error: can't connect to X server!
libva info: VA-API version 0.39.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/i386-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_39
libva error: /usr/lib/i386-linux-gnu/dri/i965_drv_video.so init failed
libva info: va_openDriver() returns -1
vaInitialize failed with error code -1 (unknown libva error),exit
Short version of all needed packages¶
sudo apt install build-essential git ccache libpcre2-dev pkg-config libssl-dev bzip2 \
wget libavahi-client-dev zlib1g-dev libavcodec-dev libavutil-dev libavformat-dev \
libswscale-dev libavresample-dev gettext cmake libiconv-hook-dev liburiparser-dev \
debhelper libcurl4-gnutls-dev python-minimal libdvbcsa-dev python-requests
If libpcre2-dev not found use libpcre3-dev
Optional packages for optional features
sudo apt install dvb-apps libva-dev libva-drm1 libva-x11-1
If used Ubuntu 18.04+ libva-drm2 libva-x11-2
To enable SYSTEMD service --enable-libsystemd_daemon on Ubuntu 18.04 and upper, install libsystemd-dev
Keep in mind, this will install ~400+Mb packages.
Some packages will install other packages to satisfy its dependencies
How to clone Github repo to local folder¶
Usually regular command to clone repo is
git clone https://github.com/tvheadend/tvheadend.git
This will download latest source code (unstable) ready for compilation
but if need stable or other
use command
git clone -b release/4.2 https://github.com/tvheadend/tvheadend.git
command explained
git clone -b <branch> <remote_repo>
branch list can be seen at https://github.com/tvheadend/tvheadend
ARM OpenMax support¶
Use only on ARM boards
apt install libomxil-bellagio-dev
do not forget to add option
--enable-omx
Python¶
Autobuild script search for python but it was replaced by python3
solution:
--python=/usr/bin/python3
Automated build script¶
Currently just clone only latest repo source code and compile it
#!/bin/bash
BASE=$(dirname "$0")
(
if [ -d "$BASE/tvheadend" ]; then
cd "$BASE/tvheadend"
git pull
else
cd "$BASE"
git clone https://github.com/tvheadend/tvheadend.git tvheadend # --depth=5 (need version tag workaround else 0.0.0 version)
cd "$BASE/tvheadend"
fi
time AUTOBUILD_CONFIGURE_EXTRA="--disable-bintray_cache --enable-vaapi --enable-nvenc --disable-hdhomerun_client --disable-hdhomerun_static " ./Autobuild.sh -j$(nproc) # edit only betwin "quotation marks"
) | tee "$BASE/build.log"
Use command
./configure --help
to see possible options.
Usage: ./configure [options] Miscellaneous --help Print this message Installation Paths --prefix=DIR$ Installation root [/usr/local] --bindir=DIR Install binaries in DIR [${prefix}/bin] --libdir=DIR Install libraries in DIR [${prefix}/lib] --mandir=DIR Install man pages in DIR [${datadir}/man] --datadir=DIR Install data files in DIR [${prefix}/share] Compiler/Arch --cc=CC Build using compiler [cc] --cflags=CFLAGS Build using C flags --ldflags=LDFLAGS Build using LD flags --cpu=CPU Build and optimize for specific CPU --arch=ARCH Build for architecture [x86_64] --platform=PLATFORM Build for platform [linux] --nowerror Build without -Werror CFLAGS --python=PYTHON Use python binary [python] Options --disable-pie Disable pie --enable-ccdebug Enable ccdebug --disable-cardclient Disable cardclient --enable-cardclient Enable cardclient --disable-cwc Disable cwc --disable-cccam Disable cccam --disable-capmt Disable capmt --disable-constcw Disable constcw --disable-linuxdvb Disable linuxdvb --disable-satip_server Disable satip_server --disable-satip_client Disable satip_client --enable-hdhomerun_client Enable hdhomerun_client --disable-hdhomerun_static Disable hdhomerun_static --disable-iptv Disable iptv --disable-tsfile Disable tsfile --disable-dvbscan Disable dvbscan --disable-timeshift Disable timeshift --disable-trace Disable trace --disable-avahi Disable avahi --enable-avahi Enable avahi --disable-zlib Disable zlib --enable-zlib Enable zlib --disable-libav Disable libav --enable-libav Enable libav --disable-ffmpeg_static Disable ffmpeg_static --disable-libx264 Disable libx264 --disable-libx264_static Disable libx264_static --disable-libx265 Disable libx265 --disable-libx265_static Disable libx265_static --disable-libvpx Disable libvpx --disable-libvpx_static Disable libvpx_static --disable-libtheora Disable libtheora --disable-libtheora_static Disable libtheora_static --disable-libvorbis Disable libvorbis --disable-libvorbis_static Disable libvorbis_static --enable-libfdkaac Enable libfdkaac --disable-libfdkaac_static Disable libfdkaac_static --disable-libopus Disable libopus --disable-libopus_static Disable libopus_static --enable-nvenc Enable nvenc --disable-vaapi Disable vaapi --enable-vaapi Enable vaapi --enable-mmal Enable mmal --enable-omx Enable omx --disable-inotify Disable inotify --enable-inotify Enable inotify --disable-epoll Disable epoll --enable-epoll Enable epoll --disable-pcre Disable pcre --enable-pcre Enable pcre --disable-pcre2 Disable pcre2 --enable-pcre2 Enable pcre2 --disable-uriparser Disable uriparser --enable-uriparser Enable uriparser --disable-ccache Disable ccache --enable-ccache Enable ccache --disable-tvhcsa Disable tvhcsa --enable-tvhcsa Enable tvhcsa --enable-bundle Enable bundle --enable-pngquant Enable pngquant --enable-kqueue Enable kqueue --disable-dbus_1 Disable dbus_1 --enable-dbus_1 Enable dbus_1 --enable-android Enable android --enable-gtimer_check Enable gtimer_check --enable-slow_memoryinfo Enable slow_memoryinfo --enable-libsystemd_daemon Enable libsystemd_daemon --disable-pcloud_cache Disable pcloud_cache --disable-ddci Disable ddci --enable-cclang_threadsan Enable cclang_threadsan --enable-gperftools Enable gperftools
Replies (92)
RE: [MANUAL] Building .DEB packages on clean Ubuntu or other Debian distros - Added by Sean Warner about 2 years ago
I'm sorry but I need help again!
OK so I installed gperftools so that Google gperftools profiler error has now been solved.
But still tvheadend won't build because it cannot find mmal??
This is the build script I am using:
##!/bin/bash # # Name: build.sh # # Description: Build script for tvheadend on Ubuntu 20.04 32bit on Raspberry 4 with 4Gb or 8Gb # Note: Only a couple of miniro changes as noted below to make this build on 64bit # Usage: # sudo -i # ln -s /usr /opt/vc # ln -s /usr/bin/python2 /usr/bin/python # cd /usr/local/src # ./build.sh # # Note: the "ln" about is because some raspberry userspace packages are compiled from source during build, # the files are installed in their "proper" locations in /usr. # But some third-party scripts expect e.g. /opt/vc/bin/vcgencmd; # Thus the hack # ln -s /usr /opt/vc # # # Also the following needs to be put into /boot/firmware/config.txt # #gpu_mem=128 #[pi4] #dtoverlay=vc4-fkms-v3d,cma-128 #max_framebuffers=2 BASE=$(dirname "$0") if [ ! -x /usr/bin/python ] ; then echo "/usr/bin/python must exist for this to compile" exit 1 fi if [ ! -d /opt/vc ] ; then echo "/opt/vc must exist and be linked to /usr for tvheadend to compile" exit 1 fi ( if [ -d "$BASE/tvheadend" ]; then cd "$BASE/tvheadend" make distclean git pull else apt-get update apt install -y \ build-essential \ cmake \ pkg-config \ git \ ccache \ bzip2 \ wget \ gettext \ debhelper \ python3 \ python3-dev \ python3-pip \ python3-rpi.gpio \ python2-minimal \ python-rpi.gpio \ dvb-apps \ libraspberrypi-dev \ libraspberrypi-bin \ libraspberrypi0 \ libssl-dev \ libavahi-client-dev \ zlib1g-dev \ libavcodec-dev \ libavcodec-extra \ libavfilter-dev \ libavfilter-extra \ libavformat-dev \ libavutil-dev \ fdkacc \ libfdk-aac-dev \ libfdk-aac1 \ libswscale-dev \ libdvbcsa-dev \ libavresample-dev \ libiconv-hook-dev \ libkqueue-dev \ liburiparser-dev \ libcurl4-gnutls-dev \ libpcre2-dev \ libpcre3-dev \ libva-dev \ libva-drm2 \ libva-x11-2 \ libsystemd-dev \ libomxil-bellagio-dev \ libprotobuf-dev \ libtcmalloc-minimal4 \ libgoogle-perftools-dev # The following my not existing Ubuntu 20.04 64bit (arm64) remove from above as required # libkqueue-dev # fdkacc # libfdk-aac-dev # libfdk-aac1 # Cant' find the following for armhf or arm64 #i965-va-driver-shaders # # Install rpi-userland libraries / binaries # snap install rpi-userland --edge cd "$BASE" git clone -v https://github.com/tvheadend/tvheadend.git tvheadend # --depth=5 (need version tag workaround else 0.0.0 version) #git clone -b -v release/4.2 https://github.com/tvheadend/tvheadend.git cd "$BASE/tvheadend" fi echo "AUTOBUILD_CONFIGURE_EXTRA=\"\${AUTOBUILD_CONFIGURE_EXTRA:-} --arch=armhf\"" > Autobuild/focal-armhf.sh echo "DEBDIST=focal" >> Autobuild/focal-armhf.sh echo "source Autobuild/debian.sh" >> Autobuild/focal-armhf.sh echo "AUTOBUILD_CONFIGURE_EXTRA=\"\${AUTOBUILD_CONFIGURE_EXTRA:-} --arch=arm64\"" > Autobuild/focal-arm64.sh echo "DEBDIST=focal" >> Autobuild/focal-arm64.sh echo "source Autobuild/debian.sh" >> Autobuild/focal-arm64.sh time ( AUTOBUILD_CONFIGURE_EXTRA="" AUTOBUILD_CONFIGURE_EXTRA="$AUTOBUILD_CONFIGURE_EXTRA --disable-android --enable-pie --enable-avahi --enable-libsystemd_daemon --disable-bintray_cache --enable-libopus --enable-libtheora --enable-libvorbis --enable-libfdkaac --enable-omx" AUTOBUILD_CONFIGURE_EXTRA="$AUTOBUILD_CONFIGURE_EXTRA --disable-libvpx_static --disable-libvpx --disable-libav" AUTOBUILD_CONFIGURE_EXTRA="$AUTOBUILD_CONFIGURE_EXTRA --disable-libtheora_static --disable-libtheora --disable-vaapi --enable-gperftools" AUTOBUILD_CONFIGURE_EXTRA="$AUTOBUILD_CONFIGURE_EXTRA --enable-gtimer_check --enable-slow_memoryinfo --enable-cclang_threadsan --enable-ccdebug" export AUTOBUILD_CONFIGURE_EXTRA ./Autobuild.sh -j$(nproc) -t focal-arm64 ) ) 2>&1 | tee "$BASE/build.log"
These are the features and options that appear in the "build log":
Checking support/features checking for cc execinfo.h ... ok checking for cc -mmmx ... fail checking for cc -msse2 ... fail checking for cc -Wunused-result ... ok checking for cc -fstack-protector ... ok checking for cc -fstack-protector-strong ... ok checking for cc -fstack-check ... ok checking for cc -fPIE ... ok checking for cc strlcat ... fail checking for cc strlcpy ... fail checking for cc fdatasync ... ok checking for cc getloadavg ... ok checking for cc atomic32 ... ok checking for cc atomic64 ... ok checking for cc atomic_time_t ... ok checking for cc atomic_ptr ... ok checking for cc bitops64 ... ok checking for cc lockowner ... ok checking for cc qsort_r ... ok checking for cc stime ... fail checking for cc gmtoff ... ok checking for cc recvmmsg ... ok checking for cc sendmmsg ... ok checking for cc libiconv ... fail ^ using build-in glibc iconv routines checking for cc ifnames ... ok checking for cc cclang_threadsan ... fail checking for py module gzip ... ok checking for pkg-config ... ok checking for xgettext ... ok checking for msgmerge ... ok checking for gzip ... ok checking for bzip2 ... ok checking for pkg openssl ... ok (detected 3.0.2) checking for cc linux/dvb/version.h ... ok checking for pkg zlib ... ok (detected 1.2.11) checking for pkg libpcre2-8 ... ok (detected 10.39) checking for pkg liburiparser ... ok (detected 0.9.6) checking for pkg avahi-client ... ok (detected 0.8) checking for cmake ... ok checking for cc -lstdc++ ... ok checking for cc bcm_host.h ... ok checking for cc OMX_Core.h ... ok checking for cc sys/inotify.h ... ok checking for cc inotify_init1 ... ok checking for cc dvbcsa/dvbcsa.h ... ok checking for cc -ldvbcsa ... ok fetching dvb-scan files ... ok checking for cc epoll_create1 ... ok checking for pkg dbus-1 ... ok (detected 1.12.20) checking for pkg libsystemd-daemon ... fail (detected <none>) checking for pkg libsystemd ... ok (detected 249) Compiler: Using C compiler: cc Using C flags: -I/opt/vc/include/IL Using LD flags: -ldvbcsa Build for arch: arm64 Binaries: Using PYTHON: python Using GZIP: gzip Using BZIP2: bzip2 Options: pie yes ccdebug yes cardclient yes cwc yes cccam yes capmt yes constcw yes linuxdvb yes satip_server yes satip_client yes hdhomerun_client yes hdhomerun_static yes iptv yes tsfile yes dvbscan yes timeshift yes trace yes avahi yes zlib yes libav yes ffmpeg_static yes libx264 yes libx264_static yes libx265 yes libx265_static yes libvpx no libvpx_static no libtheora no libtheora_static no libvorbis yes libvorbis_static yes libfdkaac yes libfdkaac_static yes libopus yes libopus_static yes nvenc no vaapi no mmal yes omx yes inotify yes epoll yes pcre no pcre2 yes uriparser yes ccache no tvhcsa yes bundle no pngquant no kqueue no dbus_1 yes android no gtimer_check yes slow_memoryinfo yes libsystemd_daemon yes pcloud_cache yes ddci yes cclang_threadsan yes gperftools yes execinfo yes W_unused_result yes f_stack_protector yes f_stack_protector_strong yes f_stack_check yes f_PIE yes fdatasync yes getloadavg yes atomic32 yes atomic64 yes atomic_time_t yes atomic_ptr yes bitops64 yes lockowner yes qsort_r yes gmtoff yes recvmmsg yes sendmmsg yes ifnames yes py_gzip yes bin_pkg_config yes bin_xgettext yes bin_msgmerge yes bin_gzip yes bin_bzip2 yes ssl yes linuxdvbapi yes linuxdvb_ca yes upnp yes bin_cmake yes stdcpp yes libogg_static yes omx_rpi yes inotify_h yes inotify_init1 yes dvbcsa yes epoll_create1 yes mpegts yes mpegts_dvb yes Packages: openssl 3.0.2 zlib 1.2.11 libpcre2-8 10.39 liburiparser 0.9.6 avahi-client 0.8 dbus-1 1.12.20 libsystemd 249 Installation paths: Prefix: /usr Binaries: ${prefix}/bin Libraries: ${prefix}/lib Data files: ${prefix}/share Man pages: /usr/share/man Final Binary: /usr/local/src/tvheadend/build.linux/tvheadend Tvheadend Data Directory: /usr/share/tvheadend
These are the last lines I get before the build fails, it keeps failing on ERROR: mmal not found...
Install the project... -- Install configuration: "Release" -- Installing: /usr/local/src/tvheadend/build.linux/ffmpeg/build/ffmpeg/lib/libx265.a -- Installing: /usr/local/src/tvheadend/build.linux/ffmpeg/build/ffmpeg/include/x265.h -- Installing: /usr/local/src/tvheadend/build.linux/ffmpeg/build/ffmpeg/include/x265_config.h -- Installing: /usr/local/src/tvheadend/build.linux/ffmpeg/build/ffmpeg/lib/pkgconfig/x265.pc -- Installing: /usr/local/src/tvheadend/build.linux/ffmpeg/build/ffmpeg/bin/x265 make[4]: Leaving directory '/usr/local/src/tvheadend/build.linux/ffmpeg/x265_3.5/build/linux' mv /usr/local/src/tvheadend/build.linux/ffmpeg/build/ffmpeg/lib/pkgconfig/x265.pc /usr/local/src/tvheadend/build.linux/ffmpeg/build/ffmpeg/lib/pkgconfig/x265.pc.old sed -e 's,-ldl,-ldl -lpthread,g' \ < /usr/local/src/tvheadend/build.linux/ffmpeg/build/ffmpeg/lib/pkgconfig/x265.pc.old \ > /usr/local/src/tvheadend/build.linux/ffmpeg/build/ffmpeg/lib/pkgconfig/x265.pc cd /usr/local/src/tvheadend/build.linux/ffmpeg/ffmpeg-4.4.1 && FFMPEG_PREFIX=/usr/local/src/tvheadend/build.linux/ffmpeg/build/ffmpeg PKG_CONFIG=/usr/local/src/tvheadend/support/pkg-config.ffmpeg ./configure --prefix=/ffmpeg --enable-static --disable-shared \ --disable-all \ --enable-gpl \ --enable-nonfree \ --extra-cflags="-I/usr/local/src/tvheadend/build.linux/ffmpeg/build/ffmpeg/include -fPIE" \ --extra-libs="-L/usr/local/src/tvheadend/build.linux/ffmpeg/build/ffmpeg/lib -ldl" \ --pkg-config="/usr/local/src/tvheadend/support/pkg-config.ffmpeg" \ --enable-openssl \ --enable-avutil --enable-avcodec --enable-avformat --enable-swscale --enable-avresample --enable-swresample --enable-avfilter \ --enable-libx264 --enable-libx265 --enable-libvorbis --enable-libfdk-aac --enable-libopus --enable-mmal --enable-omx --enable-omx_rpi --enable-nonfree \ --enable-protocol=file --enable-protocol=http --enable-protocol=https --enable-protocol=hls --enable-protocol=mmsh --enable-protocol=mmst --enable-protocol=rtmp --enable-protocol=rtmpe --enable-protocol=rtmps --enable-protocol=rtmpt --enable-protocol=rtmpte --enable-protocol=rtmpts --enable-protocol=ffrtmpcrypt --enable-protocol=ffrtmphttp --enable-protocol=rtp --enable-protocol=srtp --enable-protocol=tcp --enable-protocol=udp --enable-protocol=udplite --enable-protocol=unix --enable-protocol=crypto \ --enable-decoder=mpeg2video --enable-decoder=mp2 --enable-decoder=aac --enable-decoder=vorbis --enable-decoder=ac3 --enable-decoder=eac3 --enable-decoder=aac_latm --enable-decoder=opus --enable-decoder=h264 --enable-decoder=hevc --enable-decoder=theora --enable-decoder=flac --enable-decoder=libvorbis --enable-decoder=h264_mmal \ --enable-encoder=mpeg2video --enable-encoder=mp2 --enable-encoder=aac --enable-encoder=vorbis --enable-encoder=flac --enable-encoder=libx264 --enable-encoder=libx265 --enable-encoder=libvorbis --enable-encoder=libfdk_aac --enable-encoder=libopus --enable-encoder=h264_omx \ --enable-demuxer=mpegts --enable-demuxer=matroska --enable-demuxer=hls --enable-demuxer=flv --enable-demuxer=live_flv \ --enable-muxer=mpegts --enable-muxer=matroska --enable-muxer=mp4 --enable-muxer=ogg \ --enable-bsf=h264_mp4toannexb --enable-bsf=hevc_mp4toannexb \ --enable-filter=yadif --enable-filter=format --enable-filter=hwupload --enable-filter=hwdownload --enable-filter=scale --enable-filter=null --enable-filter=aresample --enable-filter=anull \ --enable-hwaccel=h264_mmal --enable-hwaccel=mpeg2_mmal \ --disable-programs \ --disable-doc \ --disable-htmlpages \ --disable-manpages \ --disable-podpages \ --disable-txtpages ERROR: mmal not found 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 [email protected] mailing list or IRC #ffmpeg on irc.libera.chat. Include the log file "ffbuild/config.log" produced by configure as this will help solve the problem. make[3]: *** [Makefile.ffmpeg:693: /usr/local/src/tvheadend/build.linux/ffmpeg/ffmpeg-4.4.1/.tvh_build] Error 1 make[3]: Leaving directory '/usr/local/src/tvheadend' make[2]: *** [Makefile:854: /usr/local/src/tvheadend/build.linux/ffmpeg/build/ffmpeg/lib/libavcodec.a] Error 2 make[2]: Leaving directory '/usr/local/src/tvheadend' make[1]: *** [debian/rules:15: override_dh_auto_build] Error 2 make[1]: Leaving directory '/usr/local/src/tvheadend' make: *** [debian/rules:6: build] Error 2 dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 real 9m11.704s user 18m58.740s sys 6m13.291s
I'm not sure why it is looking for mmal?
I followed through on my investigations about rpi-userland and managed to install it on my Ubuntu Pi 4 arm64 using https://gist.github.com/satmandu/c462ab301cbe09bd6e7cf4db7f626727
I was hoping this would allow the build process to "see" that I have mmal because... well I do:
root@ubuntu:/usr/local/src# dpkg -L rpiuserland | grep mmal /opt/vc/lib/pkgconfig/mmal.pc /opt/vc/src/hello_pi/hello_mmal_encode /opt/vc/src/hello_pi/hello_mmal_encode/Makefile /opt/vc/src/hello_pi/hello_mmal_encode/mmal_encode.c root@ubuntu:/usr/local/src#
Except unlike the bcm stuff I don't seem to have the mmal library files??
Maybe that's why I am still getting that MMAL not found error?
ubuntu@ubuntu:~$ dpkg -L rpiuserland | grep bcm /opt/vc/include/bcm_host.h /opt/vc/lib/libbcm_host.so /opt/vc/lib/pkgconfig/bcm_host.pc ubuntu@ubuntu:~$ ls -l /opt/vc/lib/ | grep mmal ubuntu@ubuntu:~$
Should these files also be in /opt/vc/lib/:
libmmal_components.so
libmmal_core.so
libmmal.so
libmmal_util.so
libmmal_vc_client.so
How do I solve this ---> ERROR: mmal not found
Any help very much appreciated !
Flex
RE: [MANUAL] Building .DEB packages on clean Ubuntu or other Debian distros - Added by saen acro about 2 years ago
mmal is not supported on 64bit userland systems
https://github.com/raspberrypi/userland/issues/688
Maby you need to skip it until Raspberry team solve it.
attach just build.log
there is not SPOOL/Collapse option in Redmine
RE: [MANUAL] Building .DEB packages on clean Ubuntu or other Debian distros - Added by Sean Warner about 2 years ago
@saen acro
Maybe you are correct. If I add --disable-ffmpeg_static then it DOES build.
I have attached the build log.
These are the build options I use and everything else as before. I left out any mention of mmal and have --enable-omx
time ( AUTOBUILD_CONFIGURE_EXTRA="" AUTOBUILD_CONFIGURE_EXTRA="$AUTOBUILD_CONFIGURE_EXTRA --disable-android --enable-pie --enable-avahi --enable-libsystemd_daemon --disable-bintray_cache" AUTOBUILD_CONFIGURE_EXTRA="$AUTOBUILD_CONFIGURE_EXTRA --enable-libopus --enable-libvorbis --enable-libfdkaac --enable-omx" AUTOBUILD_CONFIGURE_EXTRA="$AUTOBUILD_CONFIGURE_EXTRA --disable-libvpx_static --disable-libvpx --disable-libav" AUTOBUILD_CONFIGURE_EXTRA="$AUTOBUILD_CONFIGURE_EXTRA --disable-libtheora_static --disable-libtheora --disable-vaapi --enable-gperftools" AUTOBUILD_CONFIGURE_EXTRA="$AUTOBUILD_CONFIGURE_EXTRA --enable-gtimer_check --enable-slow_memoryinfo --enable-cclang_threadsan --enable-ccdebug" export AUTOBUILD_CONFIGURE_EXTRA ./Autobuild.sh -j$(nproc) -t focal-arm64 )
But with these settings I still get:
ERROR: mmal not found
I was hoping there might be a workaround but maybe it's as simple as MMAL is just not currently supported in 64-bit Pi systems as you say.
My current tvheadend build is actually from Michael Marley PPA:
https://launchpad.net/~mamarley/+archive/ubuntu/tvheadend-git
I asked him and he said the build log for his ARMv8 builds shows that OMX acceleration is enabled but MMAL is not.
So then how do I build tvheadend with OMX support and omit the MMAL? I'm not sure now how to turn OFF MMAL.
I tried
--disable-mmal
Except I don't think --disable-mmal is actually a config option at all.
If I try...
--disable-mmal
OR
just do not include any mention of mmal in the config options I still get the build error:
ERROR: mmal not found
How do I tell the build process not to use MMAL but to use OMX?
If I add --disable-ffmpeg_static will I still get OMX support? Is there a way to test that you have OMX support other than looking at the build.log ?
Thanks so much for your support on here.
Flex
RE: [MANUAL] Building .DEB packages on clean Ubuntu or other Debian distros - Added by saen acro about 2 years ago
why use so big peace of text
time (
AUTOBUILD_CONFIGURE_EXTRA=""
AUTOBUILD_CONFIGURE_EXTRA="$AUTOBUILD_CONFIGURE_EXTRA --disable-android --enable-pie --enable-avahi --enable-libsystemd_daemon --disable-bintray_cache"
AUTOBUILD_CONFIGURE_EXTRA="$AUTOBUILD_CONFIGURE_EXTRA --enable-libopus --enable-libvorbis --enable-libfdkaac --enable-omx"
AUTOBUILD_CONFIGURE_EXTRA="$AUTOBUILD_CONFIGURE_EXTRA --disable-libvpx_static --disable-libvpx --disable-libav"
AUTOBUILD_CONFIGURE_EXTRA="$AUTOBUILD_CONFIGURE_EXTRA --disable-libtheora_static --disable-libtheora --disable-vaapi --enable-gperftools"
AUTOBUILD_CONFIGURE_EXTRA="$AUTOBUILD_CONFIGURE_EXTRA --enable-gtimer_check --enable-slow_memoryinfo --enable-cclang_threadsan --enable-ccdebug"
export AUTOBUILD_CONFIGURE_EXTRA
./Autobuild.sh -j$(nproc) -t focal-arm64
)
just use
time (
AUTOBUILD_CONFIGURE_EXTRA="--disable-android --enable-pie --enable-avahi --enable-libsystemd_daemon --disable-bintray_cache \
--enable-libopus --enable-libvorbis --enable-libfdkaac --enable-omx \
--disable-libvpx_static --disable-libvpx --disable-libav \
--disable-libtheora_static --disable-libtheora --disable-vaapi --enable-gperftools \
--enable-gtimer_check --enable-slow_memoryinfo --enable-cclang_threadsan --enable-ccdebug" \
./Autobuild.sh -j$(nproc) -t focal-arm64
)
where "\" is new line of long text line
"export" without "unset" is not good idea
-t focal-arm64
This is useless if used in device directly, this is for cross-compilation.
RE: [MANUAL] Building .DEB packages on clean Ubuntu or other Debian distros - Added by Sean Warner about 2 years ago
Cheers.
OK I figured out that to enable OpenMAX (omx) and disable MMAL when building on my Pi 4 running Ubuntu I do this in the config options:
Leave this out...
--enable-mmal (there is no --disable-mmal option)
Add in...
--enable-omx --disable-ffmpeg_static
As saen acro said before you also need to add in...
--disable-libav --disable-vaapi
Question, with my Michael Marley tvheadend installation running on my Pi 4 all of these encoders are available:
cat /var/log/syslog | grep encoder Oct 8 11:23:02 ubuntu tvheadend[285687]: transcode: '&TVHMPEG2VIDEOEncoder' encoder helper registered Oct 8 11:23:02 ubuntu tvheadend[285687]: transcode: '&TVHH264Encoder' encoder helper registered Oct 8 11:23:02 ubuntu tvheadend[285687]: transcode: '&TVHHEVCEncoder' encoder helper registered Oct 8 11:23:02 ubuntu tvheadend[285687]: transcode: '&TVHAACEncoder' encoder helper registered Oct 8 11:23:02 ubuntu tvheadend[285687]: codec: 'mpeg2video' encoder registered Oct 8 11:23:02 ubuntu tvheadend[285687]: codec: 'mp2' encoder registered Oct 8 11:23:02 ubuntu tvheadend[285687]: codec: 'aac' encoder registered Oct 8 11:23:02 ubuntu tvheadend[285687]: codec: 'vorbis' encoder registered Oct 8 11:23:02 ubuntu tvheadend[285687]: codec: 'flac' encoder registered Oct 8 11:23:02 ubuntu tvheadend[285687]: codec: 'libx264' encoder registered Oct 8 11:23:02 ubuntu tvheadend[285687]: codec: 'libx265' encoder registered Oct 8 11:23:02 ubuntu tvheadend[285687]: codec: 'libvpx' encoder registered Oct 8 11:23:02 ubuntu tvheadend[285687]: codec: 'libvpx-vp9' encoder registered Oct 8 11:23:02 ubuntu tvheadend[285687]: codec: 'libtheora' encoder registered Oct 8 11:23:02 ubuntu tvheadend[285687]: codec: 'libvorbis' encoder registered Oct 8 11:23:02 ubuntu tvheadend[285687]: codec: 'libfdk_aac' encoder registered Oct 8 11:23:02 ubuntu tvheadend[285687]: codec: 'libopus' encoder registered Oct 8 11:23:02 ubuntu tvheadend[285687]: codec: 'h264_vaapi' encoder registered Oct 8 11:23:02 ubuntu tvheadend[285687]: codec: 'hevc_vaapi' encoder registered Oct 8 11:23:02 ubuntu tvheadend[285687]: codec: 'vp8_vaapi' encoder registered Oct 8 11:23:02 ubuntu tvheadend[285687]: codec: 'vp9_vaapi' encoder registered Oct 8 11:23:02 ubuntu tvheadend[285687]: codec: 'h264_nvenc' encoder registered Oct 8 11:23:02 ubuntu tvheadend[285687]: codec: 'hevc_nvenc' encoder registered Oct 8 11:23:02 ubuntu tvheadend[285687]: codec: 'h264_omx' encoder registered
But when I build tvheadend on the Pi 4 myself I have to disable vaapi, libtheora or it won't build?
So how come those encoders above register on my Pi 4 in the Michael Marley build? Maybe because that tvheadend was built/cross compiled on an intel CPU?
Will they work on my Pi 4? For instance 'h264_vaapi' or 'libtheora'?
Cheers,
Flex
RE: [MANUAL] Building .DEB packages on clean Ubuntu or other Debian distros - Added by saen acro about 2 years ago
Codecs are mostly part of FFMPEG library
https://tvheadend.org/issues/6177
https://github.com/tvheadend/tvheadend/pull/1460
you can read mmarley log of his build in Launchpad
latest in moment build for ARM64
./configure --build=aarch64-linux-gnu --prefix=/usr --includedir=\${prefix}/include --mandir=\${prefix}/share/man \
--infodir=\${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=\${prefix}/lib/aarch64-linux-gnu \
--libexecdir=\${prefix}/lib/aarch64-linux-gnu --disable-maintainer-mode --disable-dependency-tracking --prefix=/usr --enable-hdhomerun_client \
--disable-hdhomerun_static --disable-dvbscan --enable-libav --disable-ffmpeg_static --enable-libx264 --disable-libx264_static --enable-libx265 \
--disable-libx265_static --enable-libvpx --disable-libvpx_static --enable-libtheora --disable-libtheora_static --enable-libvorbis \
--disable-libvorbis_static --enable-libfdkaac --disable-libfdkaac_static --enable-libopus --disable-libopus_static --enable-vaapi --enable-nvenc \
--enable-omx --enable-dvbcsa --enable-dvben50221 --enable-libsystemd_daemon --enable-pcre2 --enable-pngquant --enable-ddci --python=/usr/bin/python3
in "About > toggle details" are build environment also.
RE: [MANUAL] Building .DEB packages on clean Ubuntu or other Debian distros - Added by Sean Warner about 2 years ago
@saen acro
Nice one... that's just what I need because I want to know how to build tvheadend with the same setup MMarley uses.
You mentioned in a previous post that when building tvh on a Pi it is not necessary to do:
ln -s /usr /opt/vc
or
ln -s /usr/bin/python2 /usr/bin/python
In the case of python you can put --python=/usr/bin/python3 in the build config.
How would I put...
ln -s /usr /opt/vc
in the build config?
Something like:
--includedir=/opt/vc
??
Flex
RE: [MANUAL] Building .DEB packages on clean Ubuntu or other Debian distros - Added by saen acro about 2 years ago
Reading this:
https://forums.raspberrypi.com/viewtopic.php?t=107185
I guess you need to read value of export command:
export
and add to it, not in compilation parameters.
as suggested in this forum
http://dev1galaxy.org/viewtopic.php?id=2967
export LD_LIBRARY_PATH=/opt/vc/lib
RE: [MANUAL] Building .DEB packages on clean Ubuntu or other Debian distros - Added by Sean Warner about 2 years ago
@saen acro
Awesome... I made that change now and it works!
I'm studying MMarleys build log https://launchpadlibrarian.net/627632817/buildlog_ubuntu-jammy-arm64.tvheadend_4.3.0~pre+202210071820-0~built202210071932~git81838dbb6~ubuntu22.04.1_BUILDING.txt.gz
I'm trying to understand why he is able to build with libav support but I cannot? I sent Michael an email I'll let you know what he says. Unless you know?!
His build config has --enable-libav --disable-ffmpeg_static but my build fails unless I do --disable-libav --disable-ffmpeg_static
I installed libva-dev and tried with --enable-libav --disable-ffmpeg_static. I get a lot of errors: "Package libavresample was not found in the pkg-config search path." then it fails but I actually don't think those errors are the reason why it fails but maybe it is?
Maybe the version of libva-dev on MMarleys build system requires libswresample-dev but on Ubuntu Pi 4 libva-dev requires libavresample-dev which is now unavailable to me.
ubuntu@ubuntu:~$ sudo apt install libavresample Reading package lists... Done Building dependency tree... Done Reading state information... Done E: Unable to locate package libavresample ubuntu@ubuntu:~$ sudo apt install libavresample-dev Reading package lists... Done Building dependency tree... Done Reading state information... Done Package libavresample-dev is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source E: Package 'libavresample-dev' has no installation candidate
I'm sure this is not very important but I'm in too deep now to let it go!
Flex
RE: [MANUAL] Building .DEB packages on clean Ubuntu or other Debian distros - Added by saen acro about 2 years ago
His build use Launchpad environment with is Ubuntu 20.04
There is a list of all packages installed (468) compare it to yours
RE: [MANUAL] Building .DEB packages on clean Ubuntu or other Debian distros - Added by Sean Warner about 2 years ago
As far as I can see I am using the same package list.
I am getting a bunch of libavresample errors but so does MMarleys build. They don't cause his build to fail so when mine fails is probably due to something else:
At the very end I get:
No package 'libavresample' found Package libavresample was not found in the pkg-config search path. Perhaps you should add the directory containing `libavresample.pc' to the PKG_CONFIG_PATH environment variable No package 'libavresample' found /usr/bin/ld: /usr/local/src/tvheadend/build.linux/src/transcoding/codec/codecs/libs/libvpx.o: undefined reference to symbol 'vpx_codec_control_' /usr/bin/ld: /lib/aarch64-linux-gnu/libvpx.so.7: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status make[2]: *** [Makefile:713: /usr/local/src/tvheadend/build.linux/tvheadend] Error 1 make[2]: Leaving directory '/usr/local/src/tvheadend' make[1]: *** [debian/rules:15: override_dh_auto_build] Error 2 make[1]: Leaving directory '/usr/local/src/tvheadend' make: *** [debian/rules:6: build] Error 2 dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 real 0m29.349s user 0m18.436s sys 0m23.722s
I googled about:
libvpx.so.7: error adding symbols: DSO missing from command line
See page https://github.com/audacity/audacity/issues/3173 talks about differences in the linker you use and compiler flags... so maybe my compiler/linker is different from teh MMarley set up.
MMarley set up:
Compiler: Using C compiler: cc Using C flags: -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security Using LD flags: -Wl,-Bsymbolic-functions -flto=auto -ffat-lto-objects -flto=auto -Wl,-z,relro -Wl,-z,now -lhdhomerun -ldvbcsa Build for arch: aarch64
My set up:
Compiler: Using C compiler: ccache cc Using LD flags: -lhdhomerun -ldvbcsa Build for arch: aarch64
I tried add those flags like this:
AUTOBUILD_CONFIGURE_EXTRA="--enable-hdhomerun_client --disable-hdhomerun_static --enable-dvbscan --enable-dvbcsa --enable-dvben50221 \ --disable-android --enable-libav --disable-ffmpeg_static --enable-libx264 --disable-libx264_static --enable-libx265 --disable-libx265_static \ --enable-libvpx --disable-libvpx_static --enable-libtheora --disable-libtheora_static --enable-avahi --enable-pie --enable-nvenc --enable-ccache \ --enable-gperftools --enable-gtimer_check --disable-bintray_cache --enable-slow_memoryinfo --enable-cclang_threadsan --enable-ccdebug --enable-ddci \ --enable-libvorbis --disable-libvorbis_static --enable-libfdkaac --disable-libfdkaac_static --enable-libopus --disable-libopus_static \ --enable-vaapi --enable-nvenc --enable-omx --enable-libsystemd_daemon --enable-pcre2 --enable-pngquant --python=/usr/bin/python3 \ --cflags=-g -O2 -flto=auto -ffat-lto-objects -flto=auto -ffat-lto-objects -fstack-protector-strong \ -Wformat -Werror=format-security \ --ldflags=-Wl,-Bsymbolic-functions -flto=auto -ffat-lto-objects -flto=auto -Wl,-z,relro -Wl,-z,now -lhdhomerun -ldvbcsa" \ ./Autobuild.sh -j$(nproc)
But my build log still only has these compiler settings..
Compiler: Using C compiler: ccache cc Using C flags: -g Using LD flags: -Wl,-Bsymbolic-functions -lhdhomerun -ldvbcsa Build for arch: aarch64
And the build still fails as above.
That's annoying.
Flex
RE: [MANUAL] Building .DEB packages on clean Ubuntu or other Debian distros - Added by saen acro about 2 years ago
Have you try to install?
libavresample-dev
RE: [MANUAL] Building .DEB packages on clean Ubuntu or other Debian distros - Added by Sean Warner about 2 years ago
Yes I have.
ubuntu@ubuntu:~$ sudo apt install libavresample-dev Reading package lists... Done Building dependency tree... Done Reading state information... Done Package libavresample-dev is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source E: Package 'libavresample-dev' has no installation candidate ubuntu@ubuntu:~$ sudo apt install libavresample Reading package lists... Done Building dependency tree... Done Reading state information... Done E: Unable to locate package libavresample
I could be wrong but I don't think that's the reason for the build fail. I think the dependency on libavresample was removed from tvheadend. https://github.com/rpmfusion/tvheadend/blob/master/tvheadend-4.3-libavresample.patch
Although clearly something else is looking for libavresample (maybe the libav package?) I hardly know what I'm talking about!
MMarleys successful build output also has about 100 of these errors:
No package 'libavresample' found Package libavresample was not found in the pkg-config search path. Perhaps you should add the directory containing `libavresample.pc' to the PKG_CONFIG_PATH environment variable
You say MMarley has 486 installed packages. I wasn't able to find that number or anyway how do I get that list of 486?
I went to the section: "Install main build dependencies (apt-based resolver)"
The following NEW packages will be installed: autoconf automake autopoint autotools-dev bsdextrautils debhelper debugedit dh-autoreconf dh-strip-nondeterminism dwz file fontconfig fontconfig-config fonts-dejavu-core gettext gettext-base git git-man groff-base intltool-debian libaom3 libarchive-zip-perl libasound2 libasound2-data libass9 libasyncns0 libavahi-client-dev libavahi-client3 libavahi-common-data libavahi-common-dev libavahi-common3 libavcodec-dev libavcodec58 libavfilter-dev libavfilter7 libavformat-dev libavformat58 libavutil-dev libavutil56 libblas3 libbluray2 libbrotli1 libbs2b0 libbsd0 libcairo-gobject2 libcairo2 libchromaprint1 libcodec2-1.0 libcurl3-gnutls libdatrie1 libdav1d5 libdbus-1-3 libdbus-1-dev libdebhelper-perl libdeflate0 libdrm-amdgpu1 libdrm-common libdrm-nouveau2 libdrm-radeon1 libdrm2 libdvbcsa-dev libdvbcsa1 libdw1 libedit2 libelf1 liberror-perl libexpat1 libfdk-aac-dev libfdk-aac2 libffi-dev libfile-stripnondeterminism-perl libflac8 libflite1 libfontconfig1 libfreetype6 libfribidi0 libgdk-pixbuf-2.0-0 libgdk-pixbuf2.0-common libgfortran5 libgl1 libgl1-mesa-dri libglapi-mesa libglib2.0-0 libglvnd0 libglx-mesa0 libglx0 libgme0 libgraphite2-3 libgsm1 libharfbuzz0b libhdhomerun-dev libhdhomerun4 libicu70 libimagequant0 libjbig0 libjpeg-turbo8 libjpeg8 liblapack3 libldap-2.5-0 liblilv-0-0 libllvm13 libmagic-mgc libmagic1 libmd0 libmp3lame0 libmpdec3 libmpg123-0 libmysofa1 libnghttp2-14 libnorm1 libnuma1 libogg0 libopenjp2-7 libopenmpt0 libopus-dev libopus0 libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0 libpcre2-16-0 libpcre2-32-0 libpcre2-dev libpcre2-posix3 libpgm-5.3-0 libpipeline1 libpixman-1-0 libpocketsphinx3 libpostproc-dev libpostproc55 libpsl5 libpulse0 libpython3-stdlib libpython3.10-minimal libpython3.10-stdlib librabbitmq4 librsvg2-2 librtmp1 librubberband2 libsamplerate0 libsasl2-2 libsasl2-modules-db libsensors-config libsensors5 libserd-0-0 libset-scalar-perl libshine3 libsigsegv2 libsnappy1v5 libsndfile1 libsodium23 libsord-0-0 libsoxr0 libspeex1 libsphinxbase3 libsratom-0-0 libsrt1.4-gnutls libssh-4 libssh-gcrypt-4 libssl-dev libsub-override-perl libswresample-dev libswresample3 libswscale-dev libswscale5 libsystemd-dev libthai-data libthai0 libtheora0 libtiff5 libtool libtwolame0 libuchardet0 libudfread0 liburiparser-dev liburiparser1 libva-dev libva-drm2 libva-glx2 libva-wayland2 libva-x11-2 libva2 libvdpau1 libvidstab1.1 libvorbis0a libvorbisenc2 libvorbisfile3 libvpx-dev libvpx7 libvulkan1 libwayland-bin libwayland-client0 libwayland-cursor0 libwayland-dev libwayland-egl1 libwayland-server0 libwebp7 libwebpmux3 libx11-6 libx11-data libx11-xcb1 libx264-163 libx264-dev libx265-199 libx265-dev libxau6 libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0 libxcb-present0 libxcb-render0 libxcb-shm0 libxcb-sync1 libxcb-xfixes0 libxcb1 libxdmcp6 libxext6 libxfixes3 libxml2 libxrender1 libxshmfence1 libxvidcore4 libxxf86vm1 libzimg2 libzmq5 libzvbi-common libzvbi0 m4 man-db markdown media-types ocl-icd-libopencl1 pkg-config pngquant po-debconf python3 python3-all python3-certifi python3-chardet python3-distutils python3-idna python3-lib2to3 python3-minimal python3-pkg-resources python3-requests python3-six python3-urllib3 python3.10 python3.10-minimal sbuild-build-depends-main-dummy shared-mime-info ucf wget zlib1g-dev
I double checked and I had them all, except for sbuild-build-depends-main-dummy which I was not able to install but I'm guessing it is not really a package?
But that list is not 489 packages. Where did you get 489 from?
Michael told me that another different thing about his PPA build process is his build recipe takes the regular TVHeadend git repository and merges in the "master-debian-lp" branch. I don't know what that means but maybe some of his packages are different from mine?
Flex
RE: [MANUAL] Building .DEB packages on clean Ubuntu or other Debian distros - Added by saen acro about 2 years ago
RE: [MANUAL] Building .DEB packages on clean Ubuntu or other Debian distros - Added by Sean Warner about 2 years ago
libavresample-dev is not in apt repository in Ubuntu 22.04 but I tried installing it just now from your link, thank you, https://ubuntu.pkgs.org/20.04/ubuntu-updates-universe-arm64/libavresample-dev_4.2.7-0ubuntu0.1_arm64.deb.html
This idea won't work because I am using Ubuntu 22.04 on which libavresample-dev has been replaced by libswresample.
When I tried to install libavresample-dev from the .deb file there were lots of unmet dependencies because other packages it relies on need to be older versions, e.g: it needed libavutil-dev 7.4.2.7 but I have 7.4.4.2 but that was just one package, lots of other packages are affected! For a while I tried uninstalling some of them and replacing them also with older versions but that will just end up breaking my whole system.
Maybe I could downgrade my OS to Ubuntu 20.04 and then get access to all these older packages from apt. But as I mentioned I don't think that installing libavresample-dev is a show stopper because MMarley doesn't have it either in his Ubuntu 22.04 that successfully builds tvheadend.... also with libav support.
In order to build TVH with libav support I think I could be missing some other package maybe from that list of 489 packages you mentioned in a previous post. How did you get that list of 489 packages?
Cheers,
Flex
RE: [MANUAL] Building .DEB packages on clean Ubuntu or other Debian distros - Added by saen acro about 2 years ago
Read first lines of his log
https://launchpad.net/~mamarley/+archive/ubuntu/tvheadend-git/+build/24532956 RUN: /usr/share/launchpad-buildd/bin/builder-prep Kernel version: Linux bos02-arm64-031 5.4.0-126-generic #142-Ubuntu SMP Fri Aug 26 12:15:55 UTC 2022 aarch64 Buildd toolchain package versions: launchpad-buildd_222~591~ubuntu20.04.1 python3-lpbuildd_222~591~ubuntu20.04.1 sbuild_0.79.0-1ubuntu1 git-build-recipe_0.3.6 git_1:2.25.1-1ubuntu3.5 dpkg-dev_1.19.7ubuntu3.2 python3-debian_0.1.36ubuntu1. Syncing the system clock with the buildd NTP service... 7 Oct 19:35:23 ntpdate[1807]: adjust time server 10.211.37.1 offset -0.000011 sec RUN: /usr/share/launchpad-buildd/bin/in-target unpack-chroot --backend=chroot --series=jammy --arch=arm64 PACKAGEBUILD-24532956 --image-type chroot /home/buildd/filecache-default/d7d0133902b8cc1df688a841d4b96e994eeac2e0 Creating target for build PACKAGEBUILD-24532956 RUN: /usr/share/launchpad-buildd/bin/in-target mount-chroot --backend=chroot --series=jammy --arch=arm64 PACKAGEBUILD-24532956 Starting target for build PACKAGEBUILD-24532956 RUN: /usr/share/launchpad-buildd/bin/in-target override-sources-list --backend=chroot --series=jammy --arch=arm64 PACKAGEBUILD-24532956 'deb http://ppa.launchpadcontent.net/mamarley/tvheadend-git/ubuntu jammy main' 'deb http://ftpmaster.internal/ubuntu jammy main restricted universe multiverse' 'deb http://ftpmaster.internal/ubuntu jammy-security main restricted universe multiverse' 'deb http://ftpmaster.internal/ubuntu jammy-updates main restricted universe multiverse' 'deb http://ftpmaster.internal/ubuntu jammy-proposed main restricted universe multiverse' Overriding sources.list in build-PACKAGEBUILD-24532956 RUN: /usr/share/launchpad-buildd/bin/in-target add-trusted-keys --backend=chroot --series=jammy --arch=arm64 PACKAGEBUILD-24532956 Adding trusted keys to build-PACKAGEBUILD-24532956 pub rsa1024/26F4EF8440618B66 2009-01-22 [SC] Key fingerprint = A0D4 7AB4 E99F F9F9 C0EA 949A 26F4 EF84 4061 8B66 uid Launchpad PPA for Michael Marley RUN: /usr/share/launchpad-buildd/bin/in-target update-debian-chroot --backend=chroot --series=jammy --arch=arm64 PACKAGEBUILD-24532956
This is clear 20.04 it's not 22.04
I guess launchpad have cross-compilation toolchain and build ARM64 packages on AMD64 machine.
Count in log repeats of "Get :" = 468 Packages
RE: [MANUAL] Building .DEB packages on clean Ubuntu or other Debian distros - Added by Sean Warner about 2 years ago
Thanks for the hint, except:
Get:10 http://ftpmaster.internal/ubuntu jammy/restricted arm64 Packages
How do I figure out what package is in that "Get" and how do I get it?!
Cheers,
Flex
RE: [MANUAL] Building .DEB packages on clean Ubuntu or other Debian distros - Added by saen acro about 2 years ago
Sean Warner wrote:
Thanks for the hint, except:
[...]How do I figure out what package is in that "Get" and how do I get it?!
Cheers,
Flex
This is Launchpad secret proprietary repo
RE: [MANUAL] Building .DEB packages on clean Ubuntu or other Debian distros - Added by Stefan S. about 2 years ago
Hi there,
I'm trying to compile and run TVH on Ubuntu 20.04.5 with following arguments:
./configure --disable-ffmpeg_static --disable-libfdkaac_static --disable-libtheora_static --disable-libopus_static --disable-libvorbis_static --disable-libvpx_static --disable-libx264_static --disable-libx265_static --disable-libfdkaac --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --disable-avahi --disable-dbus_1 --disable-bintray_cache --disable-execinfo --disable-hdhomerun_static --enable-hdhomerun_client --enable-libav --enable-pngquant --enable-trace --enable-vaapi --infodir=/usr/share/info --localstatedir=/var --mandir=/usr/share/man --prefix=/usr --ldflags-ldvbcsa --ldflags-ldhomerun --cc=cc --arch=x86_x64 --platform=linux --python=python3 --sysconfdir=/config
Output result is as follows:
Checking support/features checking for cc -mmmx ... ok checking for cc -msse2 ... ok checking for cc -Wunused-result ... ok checking for cc -fstack-protector ... ok checking for cc -fstack-protector-strong ... ok checking for cc -fstack-check ... ok checking for cc -fPIE ... ok checking for cc strlcat ... fail checking for cc strlcpy ... fail checking for cc fdatasync ... ok checking for cc getloadavg ... ok checking for cc atomic32 ... ok checking for cc atomic64 ... ok checking for cc atomic_time_t ... ok checking for cc atomic_ptr ... ok checking for cc bitops64 ... ok checking for cc lockowner ... ok checking for cc qsort_r ... ok checking for cc stime ... fail checking for cc gmtoff ... ok checking for cc recvmmsg ... ok checking for cc sendmmsg ... ok checking for cc libiconv ... fail ^ using build-in glibc iconv routines checking for cc ifnames ... ok checking for cc cclang_threadsan ... fail checking for py module gzip ... ok checking for pkg-config ... ok checking for xgettext ... ok checking for msgmerge ... ok checking for gzip ... ok checking for bzip2 ... ok checking for pkg openssl ... ok (detected 1.1.1f) checking for cc linux/dvb/version.h ... ok checking for cc libhdhomerun/hdhomerun.h ... ok checking for pkg zlib ... ok (detected 1.2.11) checking for pkg libpcre2-8 ... ok (detected 10.34) checking for pkg liburiparser ... ok (detected 0.9.3) checking for pkg libavfilter >=6.47.100 ... ok (detected 7.57.100) checking for pkg libswresample >=2.1.100 ... ok (detected 3.5.100) checking for pkg libavresample >=3.0.0 ... ok (detected 4.0.0) checking for pkg libswscale >=4.1.100 ... ok (detected 5.5.100) checking for pkg libavformat >=57.41.100 ... ok (detected 58.29.100) checking for pkg libavcodec >=57.48.101 ... ok (detected 58.54.100) checking for pkg libavutil >=55.28.100 ... ok (detected 56.31.100) checking for pkg libva >=0.38.0 ... ok (detected 1.7.0) checking for pkg libva-drm >=0.38.0 ... ok (detected 1.7.0) checking for cc sys/inotify.h ... ok checking for cc inotify_init1 ... ok checking for cc dvbcsa/dvbcsa.h ... ok checking for cc -ldvbcsa ... ok fetching dvb-scan files ... ok checking for cc epoll_create1 ... ok Compiler: Using C compiler: ccache cc Using LD flags: -lhdhomerun -ldvbcsa Build for arch: x86_x64 Binaries: Using PYTHON: python3 Using GZIP: gzip Using BZIP2: bzip2 Options: pie yes ccdebug no cardclient yes cwc yes cccam yes capmt yes constcw yes linuxdvb yes satip_server yes satip_client yes hdhomerun_client yes hdhomerun_static no iptv yes tsfile yes dvbscan yes timeshift yes trace yes avahi no zlib yes libav yes ffmpeg_static no libx264 yes libx264_static no libx265 yes libx265_static no libvpx yes libvpx_static no libtheora yes libtheora_static no libvorbis yes libvorbis_static no libfdkaac no libfdkaac_static no libopus yes libopus_static no nvenc no vaapi yes mmal no omx no inotify yes epoll yes pcre no pcre2 yes uriparser yes ccache yes tvhcsa yes bundle no pngquant yes kqueue no dbus_1 no android no gtimer_check no slow_memoryinfo no libsystemd_daemon no pcloud_cache yes ddci yes cclang_threadsan no gperftools no execinfo no mmx yes sse2 yes W_unused_result yes f_stack_protector yes f_stack_protector_strong yes f_stack_check yes f_PIE yes fdatasync yes getloadavg yes atomic32 yes atomic64 yes atomic_time_t yes atomic_ptr yes bitops64 yes lockowner yes qsort_r yes gmtoff yes recvmmsg yes sendmmsg yes ifnames yes py_gzip yes bin_pkg_config yes bin_xgettext yes bin_msgmerge yes bin_gzip yes bin_bzip2 yes ssl yes linuxdvbapi yes linuxdvb_ca yes libhdhomerun yes upnp yes hwaccels yes inotify_h yes inotify_init1 yes dvbcsa yes epoll_create1 yes mpegts yes mpegts_dvb yes Packages: openssl 1.1.1f zlib 1.2.11 libpcre2-8 10.34 liburiparser 0.9.3 libavfilter 7.57.100 libswresample 3.5.100 libavresample 4.0.0 libswscale 5.5.100 libavformat 58.29.100 libavcodec 58.54.100 libavutil 56.31.100 libva 1.7.0 libva-drm 1.7.0 Installation paths: Prefix: /usr Binaries: ${prefix}/bin Libraries: ${prefix}/lib Data files: ${prefix}/share Man pages: /usr/share/man Final Binary: /root/tvheadend/build.linux/tvheadend Tvheadend Data Directory: /usr/share/tvheadend
which looks OK in my opinion. When I then do...
make -j$(nproc)
it compiles successfully but afterwards, when trying to run tvheadend binary with -C flag, it aborts:
root@tvheadend-ubuntu:~/tvheadend/build.linux# ./tvheadend -C 2022-10-11 08:08:44.390 [ INFO] main: Log started 2022-10-11 08:08:44.390 [ INFO] http: Starting HTTP server 0.0.0.0:9981 2022-10-11 08:08:44.390 [ INFO] htsp: Starting HTSP server 0.0.0.0:9982 2022-10-11 08:08:44.422 [ INFO] config: loaded 2022-10-11 08:08:44.423 [ INFO] config: scanfile (re)initialization with path <none> 2022-10-11 08:08:44.424 [ INFO] transcode: 'video' context type registered 2022-10-11 08:08:44.424 [ INFO] transcode: 'audio' context type registered 2022-10-11 08:08:44.424 [ INFO] transcode: '&TVHH264Decoder' decoder helper registered 2022-10-11 08:08:44.424 [ INFO] transcode: '&TVHTHEORADecoder' decoder helper registered 2022-10-11 08:08:44.424 [ INFO] transcode: '&TVHAACDecoder' decoder helper registered 2022-10-11 08:08:44.424 [ INFO] transcode: '&TVHVORBISDecoder' decoder helper registered 2022-10-11 08:08:44.424 [ INFO] transcode: '&TVHOPUSDecoder' decoder helper registered 2022-10-11 08:08:44.424 [ INFO] transcode: '&TVHMPEG2VIDEOEncoder' encoder helper registered 2022-10-11 08:08:44.424 [ INFO] transcode: '&TVHH264Encoder' encoder helper registered 2022-10-11 08:08:44.424 [ INFO] transcode: '&TVHHEVCEncoder' encoder helper registered 2022-10-11 08:08:44.424 [ INFO] transcode: '&TVHAACEncoder' encoder helper registered 2022-10-11 08:08:44.427 [ INFO] codec: 'mpeg2video' encoder registered 2022-10-11 08:08:44.428 [ INFO] codec: 'mp2' encoder registered 2022-10-11 08:08:44.428 [ INFO] codec: 'aac' encoder registered 2022-10-11 08:08:44.428 [ INFO] codec: 'vorbis' encoder registered 2022-10-11 08:08:44.428 [ INFO] codec: 'flac' encoder registered 2022-10-11 08:08:44.428 [ INFO] codec: 'libx264' encoder registered 2022-10-11 08:08:44.428 [ INFO] codec: 'libx265' encoder registered 2022-10-11 08:08:44.428 [ INFO] codec: 'libvpx' encoder registered 2022-10-11 08:08:44.429 [ INFO] codec: 'libvpx-vp9' encoder registered 2022-10-11 08:08:44.429 [ INFO] codec: 'libtheora' encoder registered 2022-10-11 08:08:44.429 [ INFO] codec: 'libvorbis' encoder registered 2022-10-11 08:08:44.429 [ INFO] codec: 'libopus' encoder registered 2022-10-11 08:08:44.429 [ INFO] codec: 'h264_vaapi' encoder registered 2022-10-11 08:08:44.429 [ INFO] codec: 'hevc_vaapi' encoder registered 2022-10-11 08:08:44.429 [ INFO] codec: 'vp8_vaapi' encoder registered 2022-10-11 08:08:44.429 [ INFO] codec: 'vp9_vaapi' encoder registered 2022-10-11 08:08:44.429 [ ALERT] profile: no default streaming profile! reinstall data files Aborted
Any suggestions?
Thanks!
EDIT:
ok, stupid me... I should start the binary with --noacl arg rather than -C :)
Now I can run the binary.
RE: [MANUAL] Building .DEB packages on clean Ubuntu or other Debian distros - Added by Sean Warner about 2 years ago
Stefan A S.
Hello Stefan can I ask you a favor please?
I am also trying to build tvh. In my case, on Ubuntu server 22.04. If I enable libav it won't build otherwise it does. I think I could missing a specific package.
I see you got it to build with libav support. Could you please do a...
apt list --installed
on your system and post the results here?
Cheers,
Flex
RE: [MANUAL] Building .DEB packages on clean Ubuntu or other Debian distros - Added by saen acro about 2 years ago
Sean Warner wrote:
Stefan A S.
Hello Stefan can I ask you a favor please?
I am also trying to build tvh. In my case, on Ubuntu server 22.04. If I enable libav it won't build otherwise it does. I think I could missing a specific package.
I see you got it to build with libav support. Could you please do a...
[...]
on your system and post the results here?
Cheers,
Flex
He build for:
Build for arch: x86_x64
ARM64 is a total different thing
sell RP4 and take "Jaguarboard One Plus"
RE: [MANUAL] Building .DEB packages on clean Ubuntu or other Debian distros - Added by Sean Warner about 2 years ago
I got it to build with libav support.
I took a hint from the post by Stefan S... THANK YOU.
I was getting this build error: “DSO missing from command line?” I googled and came across this page https://candid.technology/how-to-fix-error-adding-symbols-dso-missing-from-command-line/ giving suggestions about why that error might occur and one of the reasons was in the compile command to "Try switching the library order". So I thought maybe I needed to have the magic --enable-libav LATER in my AUTOBUILD_CONFIGURE_EXTRA="" list just as Stefan S does?
These are all the things I did differently to make it build with libav support:
I changed my config list to these and in this order... basically almost the same as Stefan S:
--disable-ffmpeg_static --disable-libfdkaac_static --disable-libtheora_static --disable-libopus_static --disable-libvorbis_static --disable-libvpx_static --disable-libx264_static --disable-libx265_static --disable-libfdkaac --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --disable-avahi --disable-dbus_1 --disable-bintray_cache --disable-execinfo --disable-hdhomerun_static --enable-hdhomerun_client --enable-libav --enable-pngquant --enable-trace --enable-vaapi --prefix=/usr --ldflags-ldvbcsa --ldflags-ldhomerun --platform=linux --python=python3
I don't know if these next things made any difference...
I also commented out these two lines at the top of the buildTVH.sh
#export LD_LIBRARY_PATH=/opt/vc/lib #export PKG_CONFIG_PATH=$HOME/ffmpeg_build/lib/pkgconfig
• And manually made the symbolic link again...
# sudo ln -s /usr /opt/vc
• I had also installed these packages earlier...
libavcodec-dev libswresample-dev libavformat-dev libavfilter-dev
... but the build also failed after installing them so installing them surely didn't make it work?
I have the same support/features now as Stefan S except no -mmx and -msse2 which apparently are Intel processor things. Stefan S has "libavresample"!! So his build output didn't have a million warnings like this:
No package 'libavresample' found CC src/input/mpegts/tsdemux.o Package libavresample was not found in the pkg-config search path. Perhaps you should add the directory containing `libavresample.pc' to the PKG_CONFIG_PATH environment variable
Really I think the TVH code should be updated to stop those dependency warnings because libavresample is not needed to make a successful build.
I made a fresh Ubuntu 22.04 install on my Pi 4, updated it and installed my .deb file like this:
sudo apt-get update sudo dpkg -i tvheadend_4.3-2038~g5f9404117_arm64.deb
It installed fine, I got the Web UI set-up wizard and TVH runs as a systemd service!
In the end maybe it was moving the --enable-libav further down the list of config options that made it build. No idea why. MMarley has his --enable-libav almost at the beginning of the list and his builds. I have also now left out some options I had in before (e.g: --enable-nvenc --enable-omx and a few others) maybe putting them back in will break it again!
Anyway, thank you to @saen acro especially for all your help and patience!
Flex
RE: [MANUAL] Building .DEB packages on clean Ubuntu or other Debian distros - Added by Sean Warner about 2 years ago
By process of elimination I finally discovered why my TVH was not building.
It was this option which I was enabling:
--enable-ccdebug
With that enabled the build fails like this:
/usr/bin/ld: /usr/local/src/tvheadend/build.linux/src/transcoding/codec/codecs/libs/libvpx.o: undefined reference to symbol 'vpx_codec_control_' /usr/bin/ld: /lib/aarch64-linux-gnu/libvpx.so.7: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status make[2]: *** [Makefile:713: /usr/local/src/tvheadend/build.linux/tvheadend] Error 1
ccdebug is disabled by default... I don't know if anyone ever enables it. MMarley does not and Stefan S above didn't. I'm not even sure ccdebug exists. I googled lots, there is a mention of it in https://linux-packages.com/aur/package/ccdebug but the AUR is not much use to me building on Ubuntu. Also it doesn't appear to actually be in the AUR https://aur.archlinux.org/ccdebug.git and this mentioned webpage http://ccdebug.sourceforge.net/ doesn't exist! ccdebug is also not mentioned on github and I searched the apt repository for related matches but didn't find anything:
sudo apt-cache search cc sudo apt-cache search debug
So I'm guessing that --enable-ccdebug is no longer a valid tvheadend build option? If so it should be removed.
It would help if the TVH build options were documented clearly. Someone asked about that here https://tvheadend.org/boards/5/topics/30792 a few years ago but that went nowhere it seems.
If anyone knows about ccdebug please let me know. I'd like to get 100% closure on this!
Cheers,
Flex
RE: [MANUAL] Building .DEB packages on clean Ubuntu or other Debian distros - Added by saen acro almost 2 years ago
Sean Warner wrote:
So I'm guessing that --enable-ccdebug is no longer a valid tvheadend build option? If so it should be removed.
It would help if the TVH build options were documented clearly. Someone asked about that here https://tvheadend.org/boards/5/topics/30792 a few years ago but that went nowhere it seems.
If anyone knows about ccdebug please let me know. I'd like to get 100% closure on this!
Cheers,
Flex
Option is compatible with old OS's, and removing is not an option.
Look at this location:
https://github.com/tvheadend/tvheadend/tree/master/Autobuild
and create Jammy Jellyfish equivalent suggestions.
if watch older branches in this location have more OS's
Q. Why people use old OS?
A. Because driver for some devices is unstable or incompatible with newer.
RE: [MANUAL] Building .DEB packages on clean Ubuntu or other Debian distros - Added by D M almost 2 years ago
Can anyone help get this build to succeed? I tried ubuntu and Debian, but it always fails. It always ends with the following.
CC src/esstream.o CC src/streaming.o CC src/channels.o CC src/subscriptions.o CC src/service.o CC src/htsp_server.o CC src/htsmsg.o CC src/htsmsg_binary.o src/htsmsg_binary.c: In function ‘htsmsg_binary_des0’: src/htsmsg_binary.c:80:39: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=] 80 | ((char *)f->_hmf_name)[namelen] = 0; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ In file included from src/htsmsg_binary.h:22, from src/htsmsg_binary.c:26: src/htsmsg.h:84:14: note: at offset 0 to object ‘_hmf_name’ with size 0 declared here 84 | const char _hmf_name[0]; | ^~~~~~~~~ In file included from /usr/include/string.h:495, from src/htsmsg_binary.c:24: In function ‘memcpy’, inlined from ‘htsmsg_binary_des0’ at src/htsmsg_binary.c:98:7: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:34:10: error: writing 16 bytes into a region of size 0 [-Werror=stringop-overflow=] 34 | return __builtin___memcpy_chk (__dest, __src, __len, __bos0 (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from src/htsmsg_binary.h:22, from src/htsmsg_binary.c:26: src/htsmsg_binary.c: In function ‘htsmsg_binary_des0’: src/htsmsg.h:84:14: note: at offset 0 to object ‘_hmf_name’ with size 0 declared here 84 | const char _hmf_name[0]; | ^~~~~~~~~ cc1: all warnings being treated as errors make[2]: *** [Makefile:715: /home/debian/tvheadend/build.linux/src/htsmsg_binary.o] Error 1 make[2]: Leaving directory '/home/debian/tvheadend' make[1]: *** [debian/rules:15: override_dh_auto_build] Error 2 make[1]: Leaving directory '/home/debian/tvheadend' make: *** [debian/rules:6: build] Error 2 dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2