• 1
  • 2(current)
  • 3
  • 4
  • 5
  • 35
HOW-TO Compile Tvheadend & HDHomerun on Synology NAS
#16
Wife fell asleep, going to try it out now. :-) Will report later.

Compile fails. Here's the pastebin: http://pastebin.com/kQeJ03nu
I did a ./configure without any additional parameters.
Reply
#17
After checking out the right branch using

Code:
git clone -b gcc421 https://github.com/acmyo/tvheadend.git

and using

Code:
./configure --disable-avahi --release

I got a little further. It errors out at another point. Output of make -k: http://pastebin.com/MdrX1yQa

Hope this helps.
Reply
#18
Z3r0: Thanks for taking a look. I read up above in this thread that gcc4.2.1 was available on the synology box. I'm guessing your errors are from an even earlier version of gcc. Can you confirm your compiler version?

You get that like so:
Code:
[acm@juanita:~]$ gcc --version
gcc (GCC) 4.4.5 20110214
...

Another tip for folks, if you remove the "-Werror" from the Makefile, gcc wont stop on warning conditions that can be overlooked. That won't help in your case though.

thanks
Reply
#19
DiskStation> gcc --version
gcc (GCC) 4.2.1
Reply
#20
Z3r0:

I think we're actually pretty close. From what I can tell the errors have to do with the fact that you're running with an atom processor.

I wont be able to test on an atom processor until later this week, but I'm hoping something like this will work (which you're welcome to try):

Code:
export CFLAGS=-march=native
export V=1    # to show the full gcc output
./configure --disable-avahi --release
make

If that fails, I might try replacing "native" with each of these, and then executing the "configure" and "make" again:
  • i386
  • i586
  • i686
  • prescott
Reply
#21
Dude, it WORKS! :-))))
Compile went smoothly. I think the native CFLAG did the trick.

Thank you very much for your help!
Reply
#22
@acmyo
I tried to compile TVH with SynoCommunit's spksrc and it gives me the following error.

undefined reference to `__sync_fetch_and_add_4'

http://pastebin.com/UPisBHRR

Before i'm going to compile it straight on my NAS i first wanted to test this with Synology's toolchain.

Edit:
Looks like the same issue as @Z3rO i'll try your solution mentioned here in spksrc
http://forum.xbmc.org/showthread.php?tid...pid1334262

Edit2:
Using export CFLAGS=-march=native with spksrc doesn't work, invalid option
Setting it to armv5te for my DS211 results in the same error as before.

Only option for me left is to compile it on Synology itself then for now.
Reply
#23
@schumi2004: I don't know anything about spksrc, so it makes your question more difficult. Can you tell me:
- What version of gcc are you compiling with?
- The DS211 is a armv5te, but does spksrc run on your DS211 or another system?
- What command do you use to kick off spksrc?
- Have you tried compiling directly without spksrc (like Z3r0) to see if the issue is spksrc or the fact that you run on a different CPU?
Reply
#24
@acmyo
Sorry my fault, spksrc is a cross compilation framework intended to compile and package softwares for Synology NAS.
It compiles packages which you can use with Synology package manager so you don't need to bootstrap or manual install using command-line.
I compile my packages on a virtualbox with ubuntu using spksrc,

https://github.com/SynoCommunity/spksrc/...README.rst

I have a modified fork which uses git as source for this package (which you can try your self) but it failes at the same point as @Z3rO

in order to create a package for it i do: make ARCH=88f6281 tvheadend

The GCC version is 4.2.1 which is included in Synology's toolchain , the same as spksrc is using.
Reply
#25
Would any of you be able to upload the HDHR .spk file? I found one but does not seem to find my hdhomerun any time. Sad So bored with this CRAP! even the newly released dvblink package on synology's repo does not find the hdhomerun.
Reply
#26
Have put in a number of hours trying to compile tvheadend with --enable-avahi using the cross-compilation tools (spksrc) for Synology. No problems at all without avahi-support but a real showstopper when included. Have chased all the dependencies but are stuck at at fulfilling the "avahi-client requirement". Have anybody crosscompiled successfully with avahi-supportHuh
Reply
#27
@wabe

Are you getting the same error as me mentioned here?

undefined reference to `__sync_fetch_and_add_4'
Reply
#28
hi,
on this thread : https://www.lonelycoder.com/redmine/boar...ssage-2974 (i'am the author of the thread).

the solution was :
"If you want I think you can replace atomic.h with the one from Showtime
see: https://github.com/andoma/showtime/blob/...h/atomic.h
That file include asm specific code when you are on gcc versions below 4.3"
Reply
#29
Going to test it later today. Also noticed PR is merged in master branch now Wink

Edit:
Noticed the solution is 1 year old, will it still work with current builds ?

Edit:
Nope it isn't!
http://pastebin.com/BHcAtm2U
Reply
#30
If we want it to compile with spksrc from SynoCommunity we need to find a solution our self

https://www.lonelycoder.com/redmine/issues/1634#note-2

Quote:That commit is somewhat misleading and I'm not entirely sure how they were compiling with GCC 4.2 (unless that was related to TVH 3.2) as this is no longer support due to use of GCC atomic intrinsic ops. The changes were merged as they are generally good things.

But you might want to contact the author, maybe they have another solution (i.e. custom replacement for atomics?) to the problem. Nothing will be done in TVH though, it's too much hassle to maintain such ops for a plethora of platforms when support already exists in later versions of GCC.
Reply
  • 1
  • 2(current)
  • 3
  • 4
  • 5
  • 35

Logout Mark Read Team Forum Stats Members Help
HOW-TO Compile Tvheadend & HDHomerun on Synology NAS1