Build from https://github.com/tvheadend/tvheadend Error
Added by Chan Tai Man almost 12 years ago
I use raspberry pi build from source get below error
./build.linux/src/timeshift/timeshift_filemgr.o: In function `atomic_add_u64':
/root/tvheadend/src/atomic.h:36: undefined reference to `__sync_fetch_and_add_8'
/root/tvheadend/src/atomic.h:36: undefined reference to `__sync_fetch_and_add_8'
/root/tvheadend/src/atomic.h:36: undefined reference to `__sync_fetch_and_add_8'
./build.linux/src/timeshift/timeshift_writer.o: In function `atomic_add_u64':
/root/tvheadend/src/atomic.h:36: undefined reference to `__sync_fetch_and_add_8'
collect2: ld returned 1 exit status
make: *** [build.linux/tvheadend] Error 1
How to fix it.
Thanks
Replies (4)
RE: Build from https://github.com/tvheadend/tvheadend Error - Added by Adam Sutton almost 12 years ago
For now the simple answer may be to disable timeshift code (./configure --disable-timeshift) as it hte only thing using that function.
Adam
RE: Build from https://github.com/tvheadend/tvheadend Error - Added by Chan Tai Man almost 12 years ago
Thank you reply.
Sorry what mean "hte"?
RE: Build from https://github.com/tvheadend/tvheadend Error - Added by Ron L almost 12 years ago
My guess would be a typo of "the".
RE: Build from https://github.com/tvheadend/tvheadend Error - Added by Dave Chapman almost 12 years ago
One solution is to built with a newer version of gcc.
On Raspbian, I successfully compiled current tvh with:
sudo apt-get install gcc-4.7 CC=gcc-4.7 ./configure make
This installs the newer version of gcc (the 4.7 branch) but only uses it for compiling tvh. Everything else will continue to use the existing 4.6 version.