Project

General

Profile

Problem installing the Ubuntu 23.10 tvheadend package

Added by Stanislav Dombrovskiy 12 months ago

Problem installing the Ubuntu 23.10 tvheadend package (4.3.0~pre+202307191953-0~built202307192056~gitc531383ca~ubuntu23.10.1) from the mamarley/tvheadend-git repository
The tvheadend package is compiled using legacy Ubuntu 23.04 libraries
libavformat59 7.5.1
libavcodec59 7.5.1
libavutil57 7.5.1

Ubuntu version 23.10
libavcodec60 7.6.0
libavformat60 7.6.0
libavutil58 7.6.0
Downgrading libswresample4:amd64 from 7:6.0-6ubuntu1 to 7:5.1.2-3ubuntu1 allows you to install outdated libraries and the tvheadend package, but causes conflicts with a lot of other programs.


Replies (5)

RE: Problem installing the Ubuntu 23.10 tvheadend package - Added by Jonas Lang 12 months ago

Assuming you followed the instructions as laid out in this link https://launchpad.net/~mamarley/+archive/ubuntu/tvheadend-git if you are experiencing problems with the PPA you can contact him directly as mentioned in the link.

Not sure what hardware you are installing on but I’ve laid out some simple copy/paste instructions for building on your own hardware which I’ve fully tested as per the x86_64 platform. https://tvheadend.org/boards/4/topics/47932

Alternatively you could use the Snap installer to install TVH. It’s not ideal but does work. You didn’t mention what hardware you were installing on.

RE: Problem installing the Ubuntu 23.10 tvheadend package - Added by Stanislav Dombrovskiy 12 months ago

Due to the older version of tvheadend 4.2 in the SNAP system, I created another solution to install the tvheadend package version 4.3 on Ubuntu 23.10 from the mamarley/tvheadend-git repository

To do this you need:
1) get root rights

2) Find outdated version 23.04 packages and download from the Ubuntu repository into a separate clean folder

libswscale6_5.1.2-3ubuntu1_amd64.deb
libavutil57_5.1.2-3ubuntu1_amd64.deb
libavutil57_5.1.2-3ubuntu1_i386.deb
libcodec2-1.0_1.0.5-1ubuntu2_amd64.deb
libplacebo208_4.208.0-3_amd64.deb
libpostproc56_5.1.2-3ubuntu1_amd64.deb

Install packages:
# dpkg -i *

3) Find outdated version 23.04 packages and download from the Ubuntu repository into a separate clean folder

libavcodec59_5.1.2-3ubuntu1_amd64.deb
libavfilter8_5.1.2-3ubuntu1_amd64.deb
libavformat59_5.1.2-3ubuntu1_amd64.deb
libswresample4_5.1.2-3ubuntu1_amd64.deb
libswresample4_5.1.2-3ubuntu1_i386.deb

Run commands to get files from packages:
# dpkg-deb -x libavcodec59_5.1.2-3ubuntu1_amd64.deb libavcodec59
# dpkg-deb -x libavfilter8_5.1.2-3ubuntu1_amd64.deb libavfilter8_5
# dpkg-deb -x libavformat59_5.1.2-3ubuntu1_amd64.deb libavformat59_5
# dpkg-deb -x libswresample4_5.1.2-3ubuntu1_amd64.deb libswresample4_5
# dpkg-deb -x libswresample4_5.1.2-3ubuntu1_i386.deb libswresample4_5_i386

4) In the /usr/local/lib/ directory, create subdirectories tvheadend and i386
/usr/local/lib/tvheadend
/usr/local/lib/tvheadend/i386

5) Go to the directories obtained by unzipping the packages in step 3) and perform the following steps:

a) copy the files to the directory - /usr/local/lib/tvheadend

libavcodec59/usr/lib/lib/x86_64-linux-gnu/ @libavcodec.so.59
libavcodec59/usr/lib/lib/x86_64-linux-gnu/ libavcodec.so.59.37.100

libavfilter8_5/usr/lib/x86_64-linux-gnu/ @libavfilter.so.8
libavfilter8_5/usr/lib/x86_64-linux-gnu/ libavfilter.so.8.44.100

libavformat59_5/usr/lib/x86_64-linux-gnu/ @libavformat.so.59
libavformat59_5/usr/lib/x86_64-linux-gnu/ libavformat.so.59.27.100

libswresample4_5/usr/lib/x86_64-linux-gnu/ @libswresample.so.4
libswresample4_5/usr/lib/x86_64-linux-gnu/ libswresample.so.4.7.100

b) copy the files to the directory - /usr/local/lib/tvheadend/i386

libswresample4_5_i386/usr/lib/i386-linux-gnu/ @libswresample.so.4
libswresample4_5_i386/usr/lib/i386-linux-gnu/ libswresample.so.4.7.100

Thus, we installed the required libraries for the TVheadend package to work in the /usr/local/lib/tvheadend and /usr/local/lib/tvheadend/i386 folders.

6) To register libraries, you need to make changes to the LD configuration
Go to the /etc/ld.so.conf.d directory and create a tvheadend.conf file
# touch tvheadend.conf

Open the tvheadend.conf file with an editor and add the following lines:
/usr/local/lib/tvheadend
/usr/local/lib/tvheadend/i386

Save the tvheadend.conf file and run the command:
# /sbin/ldconfig

This way we will register all libraries in the /usr/local/lib/tvheadend directory

7) It is impossible to install the standard tvheadend package from the mamarley/tvheadend-git repository, because it requires the presence of outdated libavcodec59, libavfilter8, libavformat59, libswresample4 packages that conflict with the new libavcodec60, libavfilter9, libavformat60 packages. To do this, we need to download the tvheadend package, disassemble it, make changes to the dependency requirements and build it again:

Download package ' tvheadend ' from repository ' mamarley/tvheadend-git '
# wget https://ppa.launchpadcontent.net/mamarley/tvheadend-git/ubuntu/pool/main/t/tvheadend/tvheadend_4.3.0~pre+202307191953-0~built202307192056~gitc531383ca~ubuntu23.10.1_amd64.deb

Parse the package into the ' package ' directory
# dpkg-deb -x ./tvheadend_4.3.0~pre+202307191953-0~built202307192056~gitc531383ca~ubuntu23.10.1_amd64.deb package

Get the package configuration into the ' DEBIAN ' directory
# dpkg-deb --control tvheadend_4.3.0~pre+202307191953-0~built202307192056~gitc531383ca~ubuntu23.10.1_amd64.deb package/DEBIAN

Go to the DEBIAN directory and open the ' control ' file with an editor
/package/DEBIAN/control

Make the following changes in the ' Depends ' line:
Instead of libavcodec59 (>= 7:5.0) install libavcodec60 (>= 7:6.0)
Instead of libavfilter8 (>= 7:5.0) install libavfilter9 (>= 7:6.0)
Instead of libavformat59 (>= 7:5.0) install libavformat60 (>= 7:6.0)

Save the control file and build a new package tvheadend_23_10.deb with the new installed dependencies:
# dpkg -b package tvheadend_23_10.deb

8) Install the new package tvheadend_23_10.deb
# dpkg -i tvheadend_23_10.deb

9) To ensure that when updating packages, your new tvheadend_23_10.deb package is not replaced with a faulty one from the repository, you need to open the Synaptic package editor and set the tvheadend package update block. You can also temporarily disconnect from the mamarley/tvheadend-git repository

10) To finally solve the problem, you need to wait until the error in SRC is fixed or fix it yourself by replacing ffmpeg 5.x with ffmpeg 6.x

RE: Problem installing the Ubuntu 23.10 tvheadend package - Added by Jonas Lang 12 months ago

Was there a reason why you didn’t try to build TVH yourself. It’s a lot more straightforward. Did you contact Michael Marley and report the difficulties you were experiencing. You still didn’t indicate what hardware you were attempting to install TVH on.

RE: Problem installing the Ubuntu 23.10 tvheadend package - Added by Stanislav Dombrovskiy 12 months ago

Yes, I contacted Michael Marley and received the following response from him:
---------------
I apologize for this issue, but there isn't anything I can do about it.
The problem is that Ubuntu upgraded from ffmpeg 5.x to ffmpeg 6.x and
TVHeadend is incompatible with ffmpeg 6.x. Therefore, all recent
compilations have failed, leaving the old binaries from before the
ffmpeg 6.x upgrade. There isn't anything I can do about that until
TVHeadend adds support for ffmpeg 6.x.

---------------

I tried to compile TVH myself from the official source, but nothing worked.
# git clone https://github.com/tvheadend/tvheadend.git
# cd tvheadend
# ./configure
# make

An error occurred during compilation:
./libavcodec/x86/mathops.h: Assembly messages:
./libavcodec/x86/mathops.h:125: Error: operand type mismatch for "shr"
make[2]: *** [ffbuild/common.mak:81: libavformat/adtsenc.o] Error 1
make[2]: exit directory "/root/DVB_TBS/src/tmp/tvheadend/build.linux/ffmpeg/ffmpeg-5.1.3"
make[1]: *** [Makefile.ffmpeg:693: /root/DVB_TBS/src/tmp/tvheadend/build.linux/ffmpeg/ffmpeg-5.1.3/.tvh_build] Error 2

./libavcodec/x86/mathops.h:125: Error: operand type mismatch for "shr"
The problem is in the mathops.h file on line 125. I don't understand what needs to be added to get the "shr" operand

My operating system version:
Linux ubuntu 6.5.0-10-generic #10-Ubuntu SMP PREEMPT_DYNAMIC Fri Oct 13 13:49:38 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Kernel: 6.5.0-10-generic
Operating system: Ubuntu 23.10.1
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 23.10
Release: 23.10
Codename: mantic
Architecture: x86_64

CPU op-mode(s): 32-bit, 64-bit
Address sizes: 46 bits physical, 48 bits virtual
Byte order: Little Endian
CPU: 12
On-line CPU list: 0-11
Manufacturer ID: GenuineIntel
Model name: Intel(R) Core(TM) i7-5820K CPU @ 3.30GHz
CPU family: 6
Model: 63
Threads per core: 2
Cores per socket: 6
Sockets: 1
Stepping: 2
Virtualization features:
Virtualization: VT-x
Caches (sum of all):
L1d: 192 KiB (6 instances)
L1i: 192 KiB (6 instances)
L2: 1.5 MiB (6 instances)
L3: 15 MiB (1 instance)
NUMA:
NUMA node(s): 1
NUMA node0 CPU: 0-11
Vulnerabilities:
Gather data sampling: Not affected
Itlb multihit: KVM: Mitigation: VMX disabled
L1tf: Mitigation; PTE Inversion; VMX conditional cache flushes, SMT vulnerable
Mds: Mitigation; Clear CPU buffers; SMT vulnerable
Meltdown: Mitigation; PTI
Mmio stale data: Mitigation; Clear CPU buffers; SMT vulnerable
Retbled: Not affected
Spec rstack overflow: Not affected
Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl
Specter v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Specter v2: Mitigation; Retpolines, IBPB conditional, IBRS_FW, STIBP conditional, RSB filling, PBRSB-eIBRS Not affected
Srbds: Not affected
Tsx async abortion: Not affected

Motherboard:
Getting SMBIOS data from sysfs.
SMBIOS 3.0.0 present.
Handle 0x0002, DMI type 2, 15 bytes
Base Board Information
Manufacturer: ASUSTeK COMPUTER INC.
Product Name: X99-A/USB 3.1
Version: Rev 1.xx
Asset Tag: Default string
Features:
Board is a hosting board
Board is replaceable
Location In Chassis: Default string
Chassis Handle: 0x0003
Type: Motherboard
Contained Object Handles: 0

RE: Problem installing the Ubuntu 23.10 tvheadend package - Added by Jonas Lang 12 months ago

If you haven’t already done so I suggest opening an issue at the following location. https://tvheadend.org/projects/tvheadend/issues

I have seen the issue about FFMPEG versioning being discussed on the github in the form of a PR so you may also want to participate there too
https://github.com/tvheadend/tvheadend/pull/1522

    (1-5/5)