#12401 closed defect (worksforme)
Get Pynac functions to work on FreeBSD
Reported by: | kcrisman | Owned by: | pjeremy |
---|---|---|---|
Priority: | major | Milestone: | sage-duplicate/invalid/wontfix |
Component: | porting: BSD | Keywords: | |
Cc: | pjeremy | Merged in: | |
Authors: | Reviewers: | Stephen Montgomery-Smith | |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | #9543 | Stopgaps: |
Description (last modified by )
This could just be related to the Cephes on FreeBSD ticket. But it seems that using slightly different functions in one of the Pynac files helps on FreeBSD. As reported by Stephen Montgomery-Smith:
--- sage-4.8/sage/symbolic/pynac_cc.h.orig 2010-06-28 16:37:01.000000000 +0000 +++ sage-4.8/sage/symbolic/pynac_cc.h 2012-01-21 22:48:22.000000000 +0000 @@ -1,37 +1,21 @@ -#include <math.h> +#include <cmath> inline long double sage_logl(long double x) { -#if defined(__CYGWIN__) return log(x); -#else - return logl(x); -#endif } inline long double sage_sqrtl(long double x) { -#if defined(__CYGWIN__) return sqrt(x); -#else - return sqrtl(x); -#endif } inline long double sage_tgammal(long double x) { -#if defined(__CYGWIN__) return tgamma(x); -#else - return tgammal(x); -#endif } inline long double sage_lgammal(long double x) { -#if defined(__CYGWIN__) return lgamma(x); -#else - return lgammal(x); -#endif }
Attachments (1)
Change History (9)
Changed 10 years ago by
comment:1 Changed 10 years ago by
Please use the updated patch instead. It should be possible to add this patch without interfering with builds from other OS.
--- sage-5.0.beta12/sage/symbolic/pynac_cc.h-orig 2012-04-07 22:52:53.000000000 +0000 +++ sage-5.0.beta12/sage/symbolic/pynac_cc.h 2012-04-07 22:53:27.000000000 +0000 @@ -2,7 +2,7 @@ inline long double sage_logl(long double x) { -#if defined(__CYGWIN__) +#if defined(__CYGWIN__) || defined(__FreeBSD__) return log(x); #else return logl(x); @@ -11,7 +11,7 @@ inline long double sage_sqrtl(long double x) { -#if defined(__CYGWIN__) +#if defined(__CYGWIN__) || defined(__FreeBSD__) return sqrt(x); #else return sqrtl(x); @@ -20,7 +20,7 @@ inline long double sage_tgammal(long double x) { -#if defined(__CYGWIN__) +#if defined(__CYGWIN__) || defined(__FreeBSD__) return tgamma(x); #else return tgammal(x); @@ -29,7 +29,7 @@ inline long double sage_lgammal(long double x) { -#if defined(__CYGWIN__) +#if defined(__CYGWIN__) || defined(__FreeBSD__) return lgamma(x); #else return lgammal(x);
comment:2 Changed 10 years ago by
The changes reported here do not need to be made if the following trac is committed:
comment:3 Changed 10 years ago by
- Dependencies set to #9543
- Milestone changed from sage-5.1 to sage-duplicate/invalid/wontfix
- Reviewers set to Stephen Montgomery-Smith
Okay, this sounds almost like a positive review. Once #9543 is in, we can probably close this, then.
comment:4 Changed 9 years ago by
- Status changed from new to needs_review
Well, #9543 is now in. Stephen, when you end up building Sage 5.6 (whenever that comes out), a quick switch to "positive review" is all that would be needed here.
comment:5 follow-up: ↓ 6 Changed 9 years ago by
I have already checked it out using sage 5.6.rc0. Is it OK if I set it to "positive review" now?
comment:6 in reply to: ↑ 5 Changed 9 years ago by
- Status changed from needs_review to positive_review
I have already checked it out using sage 5.6.rc0. Is it OK if I set it to "positive review" now?
That was what I meant :-) so I'll do it now. Thanks so much for your continuing help.
comment:7 Changed 9 years ago by
- Resolution set to worksforme
- Status changed from positive_review to closed
comment:8 Changed 7 years ago by
- Description modified (diff)
Updated patch for pynac_cc.h