C++ on Solaris in the matplotlib spkg

5 views
Skip to first unread message

Jason Grout

unread,
Aug 10, 2009, 10:28:09 AM8/10/09
to sage-...@googlegroups.com
I just submitted most of our patches to matplotlib upstream and most
were incorporated into the main matplotlib trunk. One patch remains,
which is applied only when `uname`="SunOS" and applies to a C++ file.
In response to this patch (below), the main developer of matplotlib sent
the following. I know there are people on this list that are very
fluent in Solaris things; if we can get this patch into matplotlib, then
there will be fewer patches we have to maintain and everyone benefits.
Can someone here comment on John Hunter's message below? I can forward
the replies to the matplotlib-devel list.

Also, William, can we offer John Hunter an account on some of the Sage
servers to test on? Maybe the Solaris servers too?

The patch:

ttconv/pprdrv_tt2.cpp: This patch is *only* applied when `uname` =
"SunOS". The comment is: Copy patched version of pprdrv_tt2.cpp for
Solaris 10 that builds with gcc 4.3.2.


--- src/ttconv/pprdrv_tt2.cpp 2009-08-01 12:15:15.000000000 -0700
+++ patches/pprdrv_tt2.cpp 2009-08-08 23:33:24.000000000 -0700
@@ -104,7 +104,8 @@
{ /* have a log of points. */
if(stack_depth == 0)
{
- stream.put_char('{');
+ // Note the below is a hack to make it compile on Solaris
10 with gcc 4.3.2
+ stream.puts("{");
stack_depth=1;
}


The reply from John Hunter on the matplotlib-devel list:

see the thread at
http://sourceforge.net/mailarchive/forum.php?thread_name=4A7E7428.6090003%40creativetrax.com&forum_name=matplotlib-devel

I can try and take a look at this tomorrow. I do have a solaris box
at work to test on, but we are on an older version of gcc. Ideally,
we could find a c preprocessor macro to indicate the platform rather
than do an uname conditioned patch. If anyone knows of a platform
macro for solaris to check for, let me know.

Thanks,

Jason

William Stein

unread,
Aug 10, 2009, 10:34:34 AM8/10/09
to sage-...@googlegroups.com, John Hunter
On Mon, Aug 10, 2009 at 7:28 AM, Jason Grout <jason...@creativetrax.com> wrote:

I just submitted most of our patches to matplotlib upstream and most
were incorporated into the main matplotlib trunk.  One patch remains,
which is applied only when `uname`="SunOS" and applies to a C++ file.
In response to this patch (below), the main developer of matplotlib sent
the following.  I know there are people on this list that are very
fluent in Solaris things; if we can get this patch into matplotlib, then
there will be fewer patches we have to maintain and everyone benefits.
Can someone here comment on John Hunter's message below?  I can forward
the replies to the matplotlib-devel list.

Also, William, can we offer John Hunter an account on some of the Sage
servers to test on?  Maybe the Solaris servers too?

Yes, definitely.   He actually already used bsd.math.washington.edu as his main OS X build machine, but I don't think he has accounts on the other Sage hardware resources. 

William
 


The patch:

ttconv/pprdrv_tt2.cpp: This patch is *only* applied when `uname` =
"SunOS". The comment is: Copy patched version of pprdrv_tt2.cpp for
Solaris 10 that builds with gcc 4.3.2.


--- src/ttconv/pprdrv_tt2.cpp 2009-08-01 12:15:15.000000000 -0700
+++ patches/pprdrv_tt2.cpp 2009-08-08 23:33:24.000000000 -0700
@@ -104,7 +104,8 @@
{ /* have a log of points. */
if(stack_depth == 0)
{
- stream.put_char('{');
+ // Note the below is a hack to make it compile on Solaris
10 with gcc 4.3.2
+ stream.puts("{");
stack_depth=1;
}




The reply from John Hunter on the matplotlib-devel list:

see the thread at
http://sourceforge.net/mailarchive/forum.php?thread_name=4A7E7428.6090003%40creativetrax.com&forum_name=matplotlib-devel

I can try and take a look at this tomorrow. I do have a solaris box
at work to test on, but we are on an older version of gcc. Ideally,
we could find a c preprocessor macro to indicate the platform rather
than do an uname conditioned patch. If anyone knows of a platform
macro for solaris to check for, let me know.



Thanks,

Jason






--
William Stein
Associate Professor of Mathematics
University of Washington
http://wstein.org
Reply all
Reply to author
Forward
0 new messages