Compiling 3.9 for latest OpenElec

I am attempting to compile tvheadend 3.9 for the latest OpenElec in order to solve my Duoflex C/T/T2 combi card only being shown as type: DVB-C in the adapter settings file.

Having gotten the OpenElec sources and the tvheadend tagged version 3.9 I have run into an issue attempting to compile. The command:
PROJECT=Generic ARCH=x86_64 scripts/create_addon tvheadend
aborts with the following error:
BUILD tvheadend (target)
Checking support/features
/home/alasdair/Downloads/ line 268: /tmp/9937.bin: No such file or directory
ERROR: No C compiler found

I do have gcc installed: gcc version 4.7.2 (Debian 4.7.2-5)

Running Wheezy 7.4

If anyone has any ideas on how t rectify this in order to get it to compile please do let me know.

Many Thanks,
Now I do feel like I'm following you :-)

  • Is gcc in your path (which gcc)?

  • Can you - do you have to - specify the full path through an environment variable or parameter to configure?

  • Do you have all compilation dependencies installed - build_essentials or whatever the Debian equivalent is?

I'll have a look and see if anyone's posted anything about doing this already. It's possible that there's a test addon somewhere... perhaps...


An additional thought - there's a long thread on here about compilation on Synology - maybe there's some inspiration there, as that always has toolchain issues given that's it's not really intended as a development environment.
Haha Prof, good to see you again Smile


$ echo $PATH

$ which gcc

so yep it should know about it.


Not really sure how OpenElec does it, from the directory:
the only command I issue is:
$ PROJECT=Generic ARCH=x86_64 scripts/create_addon tvheadend


Yep build-essential package is installed (the i386 version conflicts with the 64bit version).

I noticed the really long thread you mention, but didn't properly trawl it. Guess that's what I'll be doing for hours tonight Tongue
See that you have cc defined and available, as that's what the build script is calling. It should be there if you have gcc installed, but it's worth a check.

If it is, then maybe it isn't finding it... the script defines cc based on:

[ -z "$CC" ] && CC=cc

so, you could hack the script to point to gcc, or - less ugly! - I would guess that you can pass it CC as a specific argument.
yes it does seem as if there is some issue here:
$ [ -z "$CC" ] && echo "true" || echo "false"

$ export CC=/usr/bin/gcc

$ echo $CC

$ [ -z "$CC" ] && echo "true" || echo "false"
Can you use something like:

PROJECT=Generic ARCH=x86_64 CC=/usr/bin/cc scripts/create_addon tvheadend
Hang on... if that's the order in which you typed the commands...

$ [ -z "$CC" ] && echo "true" || echo "false"

... means that the -z test failed, which means $CC isn't zero length, yes? So $CC must have already been defined before you did the export.
Yeah good point.

Found the line in the file that does the test and commented and just hard-coded the CC variable, still the same result however that could be due to the file be auto-generated and overwriting my changes.

The suggestion within the thread to:
export CFLAGS=-march=native

Makes no difference either.
$ export CC="/usr/bin/cc"
$ export CFLAGS="-march-native"
$ echo $CC
$ echo $CFLAGS


Failing that, give me a crash-course on what you're doing and I'll see if I can compile a version on my 'buntu box.
Have you checked out
Maybe a stupid question, but your Debian installation is 64 bit right, like the system you're building on?
* Asus RT-AC57U, OpenWrt 19.07+ :: HP Procurve V1410-8G switch
* LibreELEC 9:  HTPC Gigabyte Brix GB-BXA8-5545 with CEC adapter, Sony KDL52-NX800 :: Desktop AMD Ryzen 7 1800X / AMD HD6950 / 27" Dell U2717D QHD
* Debian Buster x86_64: Celeron G1610, NFS/MariaDB/ZFS server
* Blog
I am experiencing the same issue.

[email protected]:~/$ PROJECT=Fusion ARCH=x86_64 scripts/create_addon tvheadend
BUILD tvheadend (deprecated packageformat, please convert soon!)
Checking support/features
/home/simon/ line 268: /tmp/20595.bin: No such file or directory
ERROR: No C compiler found

Using Ubuntu 64 bit on 64 bit host os... compiling 64 bit ubuntu.

Also... i checked.. and i have those C compilers installed Sad
I can confirm the link @negge posted works on Gotham:

If you're using one of the Gotham based versions of OE, just use the zip from the link and install the new addon.
I got it working! Jeffrey helped me Wink Thanks!
Anybody solved the "ERROR: No C compiler found" now?
The link with Gotham works great but i need a own compile on an older OE Edition

Logout Mark Read Team Forum Stats Members Help
Compiling 3.9 for latest OpenElec0
This forum uses Lukasz Tkacz MyBB addons.