Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 431560 - dev-lang/spidermonkey-1.8.2.15: building w/uClibc fails due to finite() vs isfinite()
Summary: dev-lang/spidermonkey-1.8.2.15: building w/uClibc fails due to finite() vs is...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords: InVCS
: 457602 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-08-15 18:24 UTC by Mark Reiche
Modified: 2013-06-08 21:36 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,23.04 KB, text/plain)
2012-08-15 18:24 UTC, Mark Reiche
Details
output of emerge --info (info,3.91 KB, text/plain)
2012-08-15 18:26 UTC, Mark Reiche
Details
attempt at a patch (uclibc.patch,514 bytes, patch)
2012-08-16 20:15 UTC, Ian Stakenvicius (RETIRED)
Details | Diff
Working patch (uclibc.patch,263 bytes, patch)
2012-08-17 19:31 UTC, Mark Reiche
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Reiche 2012-08-15 18:24:43 UTC
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.
Comment 1 Mark Reiche 2012-08-15 18:26:19 UTC
Created attachment 321422 [details]
output of emerge --info
Comment 2 Mark Reiche 2012-08-15 18:29:23 UTC
output of emerge -pqv spidermonkey:
[ebuild  N    ] dev-lang/spidermonkey-1.8.2.15  USE="-threadsafe"
Comment 3 Ian Stakenvicius (RETIRED) gentoo-dev 2012-08-16 16:55:16 UTC
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)
Comment 4 Mark Reiche 2012-08-16 20:14:48 UTC
I gladly help as much as I can.
Please tell me what I need to do.
Comment 5 Ian Stakenvicius (RETIRED) gentoo-dev 2012-08-16 20:15:21 UTC
Created attachment 321516 [details, diff]
attempt at a patch

Try this -- afaict (without building on a uclibc system) this should allow spidermonkey to build.
Comment 6 Mark Reiche 2012-08-17 19:31:40 UTC
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.
Comment 7 Ian Stakenvicius (RETIRED) gentoo-dev 2012-08-17 19:38:39 UTC
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.
Comment 8 Jory A. Pratt gentoo-dev 2012-08-29 02:23:32 UTC
(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().
Comment 9 Mark Reiche 2012-08-29 05:42:18 UTC
(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
Comment 10 Jory A. Pratt gentoo-dev 2012-11-25 12:59:43 UTC
As stated earlier this is a bug in uclibc itself and needs to be fixed there not in every package that it breaks.
Comment 11 Mark Reiche 2013-02-14 22:08:43 UTC
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.
Comment 12 SpanKY gentoo-dev 2013-02-18 06:26:28 UTC
(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.
Comment 13 SpanKY gentoo-dev 2013-02-18 06:26:46 UTC
*** Bug 457602 has been marked as a duplicate of this bug. ***
Comment 14 Anthony Basile gentoo-dev 2013-05-28 15:28:20 UTC
@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.
Comment 15 Jory A. Pratt gentoo-dev 2013-06-08 21:36:09 UTC
I have added the patch to spidermonkey-1.8.5-r4 sorry for the delay.