Bug #1634
closed
GCC version used is 4.2.1
- Status changed from New to Rejected
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.
Adam
Adam Sutton wrote:
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.
I'm the author of the gcc4.2 PR. Atomics were added no later than gcc4.1, according to this link.
I'm pretty sure Randy's issue has to do with his processor (and perhaps a bug in gcc), not his compiler version. Another synology user had success building with gcc4.2 by specifying ARCH=native. That does not seem to work for non-atom processors though.
I just noticed a small build issue with gcc4.2.x has crept into the trunk in the last month which I intend to issue a PR for:
src/tvhtime.c: In function ‘tvhtime_update’:
src/tvhtime.c:98: warning: implicit declaration of function ‘llabs’
src/tvhtime.c:98: warning: incompatible implicit declaration of built-in function ‘llabs’
However if you remove "-Werror" from the Makefile it compiles fine.
I also noticed the successful compiling directly on Synology NAS but in my case i'm using the Synology toolchain found in SynoCommunity spksrc. https://github.com/SynoCommunity/spksrc/blob/develop/README.rst
I can compile it on my NAS but i prefer packages at this moment ;)
Maybe someone finds out how to get this working with Syno's toolchain but for now i'll stick with version 3.2.18
Hi, I have the same llabs error when compiling with gcc 4.3.2.
By removing the -Werror parameter from the Makefile it builds succesfully.
You'll say that the gcc version is somewhat old, and that's true, but when compiling for embedded systems like QNAP and Synology you haven't a lot of choices unfortunately.
Do you think that the makefile workaround is acceptable or not? Or, better, are you planning to fix this small issue in the upcomings gits?
I'm not asking about the "__sync_fetch_and_add_4" but the "warning: incompatible implicit declaration of built-in function ‘llabs’".
Sometimes after posting the ideas arrive...
After documenting on the llabs function, it seems that when using old gcc version you have to define _ISOC9X_SOURCE, see: http://linux.die.net/man/3/llabs.
Don't know if it's correct (I do not know C at all) but it works, so I've submitted PR270.
Also available in: Atom
PDF