Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get Pynac functions to work on FreeBSD #12401

Closed
kcrisman opened this issue Jan 31, 2012 · 10 comments
Closed

Get Pynac functions to work on FreeBSD #12401

kcrisman opened this issue Jan 31, 2012 · 10 comments

Comments

@kcrisman
Copy link
Member

This could just be related to the [ticket:9543 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 
 }

Depends on #9543

CC: @peterjeremy

Component: porting: BSD

Reviewer: Stephen Montgomery-Smith

Issue created by migration from https://trac.sagemath.org/ticket/12401

@sagetrac-stephen
Copy link
Mannequin

sagetrac-stephen mannequin commented Apr 8, 2012

Attachment: spkg-patch-sage-5.0.beta12_-_sage_symbolic_pynac_cc.h.gz

Updated patch for pynac_cc.h

@sagetrac-stephen
Copy link
Mannequin

sagetrac-stephen mannequin commented Apr 8, 2012

comment:1

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);

@sagetrac-stephen
Copy link
Mannequin

sagetrac-stephen mannequin commented Apr 14, 2012

comment:2

The changes reported here do not need to be made if the following trac is committed:

#9543

@kcrisman
Copy link
Member Author

Reviewer: Stephen Montgomery-Smith

@kcrisman
Copy link
Member Author

Dependencies: #9543

@kcrisman
Copy link
Member Author

comment:3

Okay, this sounds almost like a positive review. Once #9543 is in, we can probably close this, then.

@kcrisman kcrisman removed this from the sage-5.1 milestone Jun 20, 2012
@kcrisman
Copy link
Member Author

comment:4

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.

@sagetrac-stephen
Copy link
Mannequin

sagetrac-stephen mannequin commented Jan 16, 2013

comment:5

I have already checked it out using sage 5.6.rc0. Is it OK if I set it to "positive review" now?

@kcrisman
Copy link
Member Author

comment:6

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.

@fchapoton

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants