• Tutorials & FAQ
  • TVHeadend build and install on Ubuntu 22.04 64 bit x86_64 platform for beginners

Hello Everyone,
I'm new and tried my best to follow the instruction however i'm stuck, when requesting auto-build, i had below error:-

AUTOBUILD_CONFIGURE_EXTRA=--enable-libffmpeg_static\ --enable-trace\ --enable-debug ./Autobuild.sh

`OS identified using lsb_release command
On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean
Building for noble-x86_64
dpkg-buildpackage: warning: cannot determine CC system type, falling back to default (native compilation)
dpkg-buildpackage: info: source package tvheadend
dpkg-buildpackage: info: source version 4.3-2351g078a822cfnoble
dpkg-buildpackage: info: source distribution noble
dpkg-buildpackage: info: source changed by Andreas Öman andreas@tvheadend.org
dpkg-architecture: warning: cannot determine CC system type, falling back to default (native compilation)
dpkg-buildpackage: info: host architecture amd64
dpkg-source --before-build .
fakeroot debian/rules clean
dh clean --with-systemd
dh: warning: Compatibility levels before 10 are deprecated (level 7 in use)
dh_clean -O--with-systemd
rm -f debian/debhelper-build-stamp
rm -rf debian/.debhelper/
rm -f debian/tvheadend-dbg.debhelper.log debian/tvheadend.debhelper.log
dh_clean: warning: Compatibility levels before 10 are deprecated (level 7 in use)
rm -f -- debian/tvheadend.substvars debian/tvheadend-dbg.substvars debian/files
rm -fr -- debian/tvheadend/ debian/tmp/ debian/tvheadend-dbg/
find . ( ( \
( -path .*/.git -o -path .*/.svn -o -path .*/.bzr -o -path .*/.hg -o -path .*/CVS -o -path .*/.pc -o -path .*/_darcs ) -prune -o -type f -a \
( -name '##' -o -name '.~' -o -name '~' -o -name DEADJOE \
-o -name '
.orig' -o -name '.rej' -o -name '.bak' \
-o -name '..orig' -o -name ..rej -o -name '.SUMS' \
-o -name TAGS -o ( -path '/.deps/' -a -name '*.P' ) \
) -exec rm -f {} + ) -o \
( -type d -a ( -name autom4te.cache -o -name pycache ) -prune -exec rm -rf {} + ) )
debian/rules build
dh build --with-systemd
dh: warning: Compatibility levels before 10 are deprecated (level 7 in use)
dh_update_autotools_config -O--with-systemd
debian/rules override_dh_auto_configure
make[1]: Entering directory '/home/ali/tvheadend'
dh_auto_configure -- --enable-libffmpeg_static --enable-trace --enable-debug --arch=x86_64
dh_auto_configure: warning: Compatibility levels before 10 are deprecated (level 7 in use)
./configure --build=x86_64-linux-gnu --prefix=/usr --includedir=\${prefix}/include --mandir=\${prefix}/share/man --infodir=\${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-option-checking --disable-silent-rules --libexecdir=\${prefix}/lib/tvheadend --disable-maintainer-mode --disable-dependency-tracking --enable-libffmpeg_static --enable-trace --enable-debug --arch=x86_64
Checking support/features
ERROR: No C compiler found
dh_auto_configure: error: ./configure --build=x86_64-linux-gnu --prefix=/usr --includedir=\${prefix}/include --mandir=\${prefix}/share/man --infodir=\${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-option-checking --disable-silent-rules --libexecdir=\${prefix}/lib/tvheadend --disable-maintainer-mode --disable-dependency-tracking --enable-libffmpeg_static --enable-trace --enable-debug --arch=x86_64 returned exit code 1
make[1]: *** [debian/rules:17: override_dh_auto_configure] Error 2
make[1]: Leaving directory '/home/ali/tvheadend'
make: *** [debian/rules:11: build] Error 2
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2
`

If you look at the title of the post it states build instructions for Ubuntu 22.04 and not Ubuntu 24.04. as you are trying to build for. Have you tried these build instructions on Ubuntu 22.04 yet.

If you follow the log output it is telling you that no C compiler is found. If you’ve searched a little you’ll find that you need to install a C compiler via the following command

sudo apt install build-essential

This should give you the tools to complete the build process.

I haven’t tried building on Ubuntu 24.04 yet as I’ve no requirement at the moment for it. Just follow the build process log output when it fails as it usually points you to any further packages that need to be installed.

Thanks Jonas for your comments, Since i'n new user in Linux not noted the subject is for previous version, No i did not try 22.04, i just installed 24.04 in my pc and tried the mentioned process.

after pasting the command > sudo apt install build-essential, got the message > build-essential is already the newest version (12.10ubuntu1). issue remain same ERROR: No C compiler found

sounds in need to go back 22.04, Thanks for your support.

    AliSLR as I mentioned I built TVH on Ubuntu 22.04 (I use the LTS version of Ubuntu every time so no urgency to upgrade to Ubuntu 24.04). There may well be changes to the Ubuntu 24.04 v Ubuntu 22.04 repositories that I’m not aware of.

    In case things have changed could you enter the following in a Terminal session

    sudo apt install gcc

    and post the output here.

    @DeltaMikeCharlie i’d like to try and help users, particularly those who are new to compiling TVH from source through the process I created a while back and keep it updated and relevant so I value their feedback as it benefits others.

    Of course if we were to draw the build/compilation process to its logical conclusion we’d be using the method outlined in the TVH documentation

    https://old.tvheadend.org/projects/tvheadend/wiki/Building

      DeltaMikeCharlie I don’t have the rights or privileges to do so.

      Maybe you could make a separate post with you script you linked to instead of having it buried in one of those endless posts that are impossible to search for a new user. It would certainly make more sense.

        Did you know there's a docker image available? Should install and run on most any linux with docker setup. There's even a PI4 binary.

        https://hub.docker.com/r/linuxserver/tvheadend

        It works fine. Looks like they keep it up to date. Nothing to do but install it and run it. Not sure why you're going through all the extra work to run build scripts etc. unless you're hacking the code, not really a beginner task.

        Unless I'm missing something in which case apologies I'm new here 🙂

        Jonas Lang I don’t have the rights or privileges to do so.

        There should be a link on the main page giving you the necessary edit privileges. Is that not working?

          DeltaMikeCharlie
          Thanks DeltamMikeCharlie, i went through the process, while entry ./configure had same error message, No C Compiler found, sounds not lucky 🙂
          ali@AMD:~/tvh-build/tvheadend$ ./configure
          /home/ali/tvh-build/tvheadend/support/configure.inc: line 22: cc: command not found
          Checking support/features
          ERROR: No C compiler found

            Jonas Lang
            Once again thanks for your support and your try to help me new user, below is output of >sudo apt install cc.
            it's OK for me to downgrade to 22.04 and try again, as I'm learning and it will not harm me.

            ali@AMD:~/tvh-build/tvheadend$ sudo apt install gcc
            Reading package lists... Done
            Building dependency tree... Done
            Reading state information... Done
            gcc is already the newest version (4:13.2.0-7ubuntu1).
            0 upgraded, 0 newly installed, 0 to remove and 9 not upgraded.

              is it the correct Ubuntu build which to install ==>> ubuntu-22.04.4-desktop-amd64

                AliSLR what would be a big help is if users posted a full list of both hardware and OS they are using. Once again the title of this post is very clear and concise.

                  AliSLR it appears that all the tools required to build and compile TVH are correctly installed. As I stated previously I built and compiled TVH on Ubuntu 22.04 on an x86_64 Intel processor platform and it works every time. When I get time I may try it on Ubuntu 24.04 but not at the moment

                  Flole it doesn’t appear so. If required maybe you could move it if you find that more appropriate.

                  Jonas Lang
                  here is my hardware and OS details, with Linux is it matter what is CPU structure using if it's inter or AMD.
                  any how sincerely thank you.


                    AliSLR as far as I know it should make no difference here. As I suggested install Ubuntu 22.04 and use my instructions outlined above.

                    AliSLR /home/ali/tvh-build/tvheadend/support/configure.inc: line 22: cc: command not found
                    Checking support/features
                    ERROR: No C compiler found

                    It sounds like your C compiler is missing.

                    AliSLR gcc is already the newest version (4:13.2.0-7ubuntu1).

                    But this contradicts that.

                    Have you installed the build-essential package?

                    Looking at the line that you failed on, perhaps your C compiler is not in the right path.

                    tvheadend/tvheadendblob/49ac9387186d32b55a399a04155e835eac22c6c1/support/configure.inc#L22C1-L22C65

                    [ -z "$ARCH" ] && ARCH=$($CC -dumpmachine | cut -d '-' -f 1)

                      I installed 22.04. and inserted below said command, but still have the error:-

                      `ali@AMD:~/build/tvheadend/master$ AUTOBUILD_CONFIGURE_EXTRA=--enable-libffmpeg_static\ --enable-trace\ --enable-debug ./Autobuild.sh
                      OS identified using lsb_release command
                      On branch master
                      Your branch is up to date with 'origin/master'.

                      nothing to commit, working tree clean
                      Building for jammy-x86_64
                      Autobuild/debian.sh: line 45: dpkg-buildpackage: command not found
                      ali@AMD:~/build/tvheadend/master$
                      `

                      DeltaMikeCharlie
                      Yes, Build-essential was there actually, However now formatted my D drive and installed Ubuntu 22.04.4 as i could not find 22.04 in Ubuntu download links.