Created attachment 321420 [details] build.log I tried to emerge spidermonkey 1.8.2.15 on a i586-gentoo-linux-uclibc system. It failed with the error jsnum.h:101:20:error: 'finite' was not declared in this scope I tried with gcc versions 4.5.3 and 4.6.3, and I also tried spidermonkey v1.8.5-r1, with the same result.
Created attachment 321422 [details] output of emerge --info
output of emerge -pqv spidermonkey: [ebuild N ] dev-lang/spidermonkey-1.8.2.15 USE="-threadsafe"
This bug seems to be common with many upstream packages when using uclibc -- apparently uclibc provides 'isfinite' instead of 'finite'. Should be an easy patch, If I can attach the patch here can you test? (i don't plan on setting up a uclibc chroot to test this myself)
I gladly help as much as I can. Please tell me what I need to do.
Created attachment 321516 [details, diff] attempt at a patch Try this -- afaict (without building on a uclibc system) this should allow spidermonkey to build.
Created attachment 321586 [details, diff] Working patch The second half of the patch is not necessary (and in fact, it breaks the building, as it again refers to finite() on uclibc. I removed that part and was able to emerge spidermonkey in my uclibc chroot.
I asked a couple of dev's in #gentoo-embedded about this, and it looks like the bug may actually be in uclibc (in that it doesn't properly export finite() anymore). As such I'm not sure if this will get committed to spidermonkey (or any other in-tree package). I'll keep looking into it though; glad you have a patch that works at least.
(In reply to comment #7) > I asked a couple of dev's in #gentoo-embedded about this, and it looks like > the bug may actually be in uclibc (in that it doesn't properly export > finite() anymore). As such I'm not sure if this will get committed to > spidermonkey (or any other in-tree package). > > I'll keep looking into it though; glad you have a patch that works at least. This is for sure a bug in uclibc, spidermonkey package will not be patched, uclibc needs to be fixed to properly export finite().
(In reply to comment #8) > This is for sure a bug in uclibc, spidermonkey package will not be patched, > uclibc needs to be fixed to properly export finite(). So, shall I submit another bug report for uclibc? Or will this bug report be reassigned to fix the bug there? Thanks, Mark
As stated earlier this is a bug in uclibc itself and needs to be fixed there not in every package that it breaks.
From bug 457602: Markos Chandras gentoo-dev 2013-02-14 21:15:51 UTC I believe the spidermonkey should use the isfinite() because finite() is obsolete (per the glibc man page): Note that these functions are obsolete. C99 defines macros isfinite(), isinf(), and isnan() (for all types) replacing them. Further note that the C99 isinf() has weaker guarantees on the return value. See fpclas‐ sify(3). So it is not a uClibc bug per se.
(In reply to comment #10) why ? finite() is not part of a standard. isfinite() is -- POSIX & C99: http://pubs.opengroup.org/onlinepubs/9699919799/functions/isfinite.html uClibc conforming to the standards and not providing a non-standard function (i.e. finite()) is not a bug.
*** Bug 457602 has been marked as a duplicate of this bug. ***
@Jory, can we get this fix in spidermonkey? It is pretty safe and trivial. I can test on both glibc and uclibc if you like and make sure nothing breaks either way.
I have added the patch to spidermonkey-1.8.5-r4 sorry for the delay.