Project

General

Profile

[MANUAL] Building .DEB packages on clean Ubuntu or other Debian distros

Added by saen acro over 3 years ago

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
/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

/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

  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.

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
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 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

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 (31)

RE: [MANUAL] Building .DEB packages on clean Ubuntu or other Debian distros - Added by Adrian A 6 days ago

If I want to compile with raspberry pi 4, I do get the errors:

make[6]: Nothing to be done for 'install-exec-am'.
/bin/bash ./mkinstalldirs /home/pi/tvheadend/build.linux/ffmpeg/build/ffmpeg/lib/pkgconfig
/usr/bin/install -c -m 644 theora.pc /home/pi/tvheadend/build.linux/ffmpeg/build/ffmpeg/lib/pkgconfig/theora.pc
/usr/bin/install -c -m 644 theoradec.pc /home/pi/tvheadend/build.linux/ffmpeg/build/ffmpeg/lib/pkgconfig/theoradec.pc
/usr/bin/install -c -m 644 theoraenc.pc /home/pi/tvheadend/build.linux/ffmpeg/build/ffmpeg/lib/pkgconfig/theoraenc.pc
make[6]: Leaving directory '/home/pi/tvheadend/build.linux/ffmpeg/libtheora-1.1.1'
make[5]: Leaving directory '/home/pi/tvheadend/build.linux/ffmpeg/libtheora-1.1.1'
make[4]: Leaving directory '/home/pi/tvheadend/build.linux/ffmpeg/libtheora-1.1.1'
[ 27%] Building CXX object encoder/CMakeFiles/encoder.dir/weightPrediction.cpp.o
make[6]: Leaving directory '/home/pi/tvheadend/build.linux/ffmpeg/x265_3.2/build/linux'
[ 27%] Built target encoder
make[5]: Leaving directory '/home/pi/tvheadend/build.linux/ffmpeg/x265_3.2/build/linux'
make[4]: *** [Makefile:130: all] Error 2
make[4]: Leaving directory '/home/pi/tvheadend/build.linux/ffmpeg/x265_3.2/build/linux'
make[3]: *** [Makefile.ffmpeg:277: /home/pi/tvheadend/build.linux/ffmpeg/x265_3.2/.tvh_build] Error 2
make[3]: Leaving directory '/home/pi/tvheadend'
make[2]: *** [Makefile:853: /home/pi/tvheadend/build.linux/ffmpeg/build/ffmpeg/lib/libavcodec.a] Error 2
make[2]: Leaving directory '/home/pi/tvheadend'
make[1]: *** [debian/rules:15: override_dh_auto_build] Error 2
make[1]: Leaving directory '/home/pi/tvheadend'
make: *** [debian/rules:6: build] Error 2
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2

Any help is appreciated

RE: [MANUAL] Building .DEB packages on clean Ubuntu or other Debian distros - Added by saen acro 6 days ago

Adrian A wrote:

If I want to compile with raspberry pi 4, I do get the errors:

make[6]: Nothing to be done for 'install-exec-am'.
/bin/bash ./mkinstalldirs /home/pi/tvheadend/build.linux/ffmpeg/build/ffmpeg/lib/pkgconfig
/usr/bin/install -c -m 644 theora.pc /home/pi/tvheadend/build.linux/ffmpeg/build/ffmpeg/lib/pkgconfig/theora.pc
/usr/bin/install -c -m 644 theoradec.pc /home/pi/tvheadend/build.linux/ffmpeg/build/ffmpeg/lib/pkgconfig/theoradec.pc
/usr/bin/install -c -m 644 theoraenc.pc /home/pi/tvheadend/build.linux/ffmpeg/build/ffmpeg/lib/pkgconfig/theoraenc.pc
make[6]: Leaving directory '/home/pi/tvheadend/build.linux/ffmpeg/libtheora-1.1.1'
make[5]: Leaving directory '/home/pi/tvheadend/build.linux/ffmpeg/libtheora-1.1.1'
make[4]: Leaving directory '/home/pi/tvheadend/build.linux/ffmpeg/libtheora-1.1.1'
[ 27%] Building CXX object encoder/CMakeFiles/encoder.dir/weightPrediction.cpp.o
make[6]: Leaving directory '/home/pi/tvheadend/build.linux/ffmpeg/x265_3.2/build/linux'
[ 27%] Built target encoder
make[5]: Leaving directory '/home/pi/tvheadend/build.linux/ffmpeg/x265_3.2/build/linux'
make[4]: *** [Makefile:130: all] Error 2
make[4]: Leaving directory '/home/pi/tvheadend/build.linux/ffmpeg/x265_3.2/build/linux'
make[3]: *** [Makefile.ffmpeg:277: /home/pi/tvheadend/build.linux/ffmpeg/x265_3.2/.tvh_build] Error 2
make[3]: Leaving directory '/home/pi/tvheadend'
make[2]: *** [Makefile:853: /home/pi/tvheadend/build.linux/ffmpeg/build/ffmpeg/lib/libavcodec.a] Error 2
make[2]: Leaving directory '/home/pi/tvheadend'
make[1]: *** [debian/rules:15: override_dh_auto_build] Error 2
make[1]: Leaving directory '/home/pi/tvheadend'
make: *** [debian/rules:6: build] Error 2
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2

Any help is appreciated

--disable-libx265_static
also rest "static"

RE: [MANUAL] Building .DEB packages on clean Ubuntu or other Debian distros - Added by Adrian A 6 days ago

okay, I compiled my own ffmpeg, but now I encountered the error:

/usr/bin/ld: /usr/local/lib/libvpx.a(decodemv.c.o): in function `vp8_decode_mode_mvs':
(.text+0x2400): dangerous relocation: unsupported relocation
/usr/bin/ld: (.text+0x2404): dangerous relocation: unsupported relocation
/usr/bin/ld: (.text+0x2408): dangerous relocation: unsupported relocation
/usr/bin/ld: (.text+0x240c): dangerous relocation: unsupported relocation
/usr/bin/ld: (.text+0x2430): dangerous relocation: unsupported relocation
/usr/bin/ld: (.text+0x2434): dangerous relocation: unsupported relocation
/usr/bin/ld: (.text+0x2438): dangerous relocation: unsupported relocation
/usr/bin/ld: (.text+0x243c): dangerous relocation: unsupported relocation
/usr/bin/ld: (.text+0x28e8): dangerous relocation: unsupported relocation
/usr/bin/ld: (.text+0x28ec): dangerous relocation: unsupported relocation
/usr/bin/ld: (.text+0x28f0): dangerous relocation: unsupported relocation
/usr/bin/ld: (.text+0x28f4): dangerous relocation: unsupported relocation
/usr/bin/ld: BFD (GNU Binutils for Raspbian) 2.31.1 internal error, aborting at ../../bfd/elf32-arm.c:9459 in elf32_arm_add_dynreloc

/usr/bin/ld: Please report this bug.

collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:712: /home/pi/tvheadend/build.linux/tvheadend] Error 1
make[2]: Leaving directory '/home/pi/tvheadend'
make[1]: *** [debian/rules:15: override_dh_auto_build] Error 2
make[1]: Leaving directory '/home/pi/tvheadend'
make: *** [debian/rules:6: build] Error 2
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2

real    1m35.397s
user    4m18.573s
sys     0m39.690s

any help?

RE: [MANUAL] Building .DEB packages on clean Ubuntu or other Debian distros - Added by Adrian A 6 days ago

Okay, but some libs still make problems

/usr/bin/ld: /usr/local/lib/libvpx.a(decodemv.c.o): in function `vp8_decode_mode_mvs':
(.text+0x2400): dangerous relocation: unsupported relocation
/usr/bin/ld: (.text+0x2404): dangerous relocation: unsupported relocation
/usr/bin/ld: (.text+0x2408): dangerous relocation: unsupported relocation
/usr/bin/ld: (.text+0x240c): dangerous relocation: unsupported relocation
/usr/bin/ld: (.text+0x2430): dangerous relocation: unsupported relocation
/usr/bin/ld: (.text+0x2434): dangerous relocation: unsupported relocation
/usr/bin/ld: (.text+0x2438): dangerous relocation: unsupported relocation
/usr/bin/ld: (.text+0x243c): dangerous relocation: unsupported relocation
/usr/bin/ld: (.text+0x28e8): dangerous relocation: unsupported relocation
/usr/bin/ld: (.text+0x28ec): dangerous relocation: unsupported relocation
/usr/bin/ld: (.text+0x28f0): dangerous relocation: unsupported relocation
/usr/bin/ld: (.text+0x28f4): dangerous relocation: unsupported relocation
/usr/bin/ld: /usr/local/lib/libx264.a(base.o)(.text+0xc): unresolvable R_ARM_MOVW_ABS_NC relocation against symbol `[email protected]@GLIBC_2.4'
/usr/bin/ld: final link failed: symbol needs debug section which does not exist
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:712: /home/pi/tvheadend/build.linux/tvheadend] Error 1
make[2]: Leaving directory '/home/pi/tvheadend'
make[1]: *** [debian/rules:15: override_dh_auto_build] Error 2
make[1]: Leaving directory '/home/pi/tvheadend'
make: *** [debian/rules:6: build] Error 2
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2

real    1m40.534s
user    4m20.814s
sys     0m38.719s

RE: [MANUAL] Building .DEB packages on clean Ubuntu or other Debian distros - Added by saen acro 6 days ago

Adrian A wrote:

Okay, but some libs still make problems

[...]

What is a command line?

(26-31/31)