Compiling 3.9 for latest OpenElec
#1
Hi,

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/OpenELEC.tv/build.OpenELEC-Generic.x86_64-devel/tvheadend-3.9/.x86_64-openelec-linux-gnu/support/configure.inc: 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,
Alasdair
Reply
#2
Now I do feel like I'm following you :-)

Thoughts...
  • 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...

EDIT

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.
Reply
#3
Haha Prof, good to see you again Smile

1.

$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/home/alasdair/stuff/alasdair/workspace/code_documentation/phpunit/vendor/bin/

$ which gcc
/usr/bin/gcc

so yep it should know about it.

2.

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

3.

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
Reply
#4
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.
Reply
#5
yes it does seem as if there is some issue here:
$ [ -z "$CC" ] && echo "true" || echo "false"
false

$ export CC=/usr/bin/gcc

$ echo $CC
/usr/bin/gcc

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

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

$ [ -z "$CC" ] && echo "true" || echo "false"
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.
Reply
#8
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.
Reply
#9
$ 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.
Reply
#10
Have you checked out http://saraev.ca/tvheadend/4.1/?
Reply
#11
Maybe a stupid question, but your Debian installation is 64 bit right, like the system you're building on?
* MikroTik RB5009UG+S+IN :: ZyXEL GS1900-8HP v1 :: EAP615-Wall v1 :: Netgear GS108T v3 running OpenWrt 23.05
* LibreELEC 11:  HTPC Gigabyte Brix GB-BXA8-5545 with CEC adapter, Sony XR-64A84K :: Desktop AMD Ryzen 7 5800X / Sapphire Nitro+ Radeon 6700XT  / 27" Dell U2717D QHD
* Debian Bookworm x86_64: Celeron G1610, NFS/MariaDB/ZFS server
* Blog
Reply
#12
I am experiencing the same issue.

simon@simon-VirtualBox:~/OpenELEC.tv$ PROJECT=Fusion ARCH=x86_64 scripts/create_addon tvheadend
BUILD tvheadend (deprecated packageformat, please convert soon!)
Checking support/features
/home/simon/OpenELEC.tv/build.OpenELEC-Fusion.x86_64-3.2.4/tvheadend-3.9.383/support/configure.inc: 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
Reply
#13
I can confirm the link @negge posted works on Gotham:
http://saraev.ca/tvheadend/4.1/

If you're using one of the Gotham based versions of OE, just use the zip from the link and install the new addon.
Reply
#14
I got it working! Jeffrey helped me Wink Thanks!
Reply
#15
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
Reply

Logout Mark Read Team Forum Stats Members Help
Compiling 3.9 for latest OpenElec0