#9221: update matplotlib to 1.0.0 and clean out the patches
---------------------------+------------------------------------------------
Reporter: jason | Owner: jason, was
Type: enhancement | Status: needs_work
Priority: major | Milestone: sage-4.5.3
Component: graphics | Keywords:
Author: Jason Grout | Upstream: Reported upstream. Developers
acknowledge bug.
Reviewer: | Merged:
Work_issues: |
---------------------------+------------------------------------------------
Comment(by drkirkby):
Replying to [comment:18 jason]:
> Replying to [comment:16 drkirkby]:
> > BTW, it perfectly possible on Solaris to have both {{{stdlib.h}}} and
{{{unistd.h}}} included in the one source file - here's a "hello world"
that does just that.
> >
> > {{{
> > drkir...@hawk:~$ cat test.c
> > #include <stdio.h>
> > #include <unistd.h>
> > #include <stdlib.h>
> >
> > int main() {
> > printf("Hello world\n");
> > exit(0);
> > }
> >
> > drkir...@hawk:~$ gcc -Wall test.c
> > drkir...@hawk:~$ ./a.out
> > Hello world
> > }}}
>
>
> Interesting. In this case, it seems like they want to include Python.h.
I've no idea.
> By default, which of _XPG4 or _XPG3 is defined in your compiler?
Neither of them.
One can see what gets defined with any combination of C and header files
by pre-processing a file, and using the -dM options. To get the defaults,
just use an empty file or /dev/null. This is a very useful trick some
times.
{{{
drkir...@laptop:~$ gcc -dM -E - </dev/null
#define __DBL_MIN_EXP__ (-1021)
#define __FLT_MIN__ 1.17549435e-38F
#define __CHAR_BIT__ 8
#define __WCHAR_MAX__ 2147483647
#define __DBL_DENORM_MIN__ 4.9406564584124654e-324
#define __FLT_EVAL_METHOD__ 2
etc etc
}}}
For the case of a test file where both unistd.h and stdlib.h are defined,
we see both {{{_XOPEN_XPG3}}} and {{{_XOPEN_XPG4}}} get defined, but not
{{{_XPG3}}} or {{{_XPG4}}}.
{{{
drkir...@laptop:~$ gcc -dM -E test.c | grep XPG
#define _XOPEN_XPG3
#define _XOPEN_XPG4
}}}
> From the code in stdlib.h, it looks like setting _XPG4, but undefining
_XPG3, should work.
I don't think one should go defining {{{_XPG3}}} and {{{_XPG4}}}
directly, but if one does do that, then one can induce the error depending
on what you define and what header files you include. I leave it for you
to prove that to yourself. (Try it on 't2.math')
I can suggest a few resources that might shed some light on it.
* http://www.opengroup.org/forums/
* gcc-help mailing list. (The mainly Linux crowd are bound to blame Sun,
but worth asking anyway.)
* comp.unix.solaris newsgroup
http://groups.google.com/group/comp.unix.solaris
* comp.lang.c newsgroup http://groups.google.co.uk/group/comp.lang.c
There's probably a few more. Sorry I don't know the answer, but I doubt it
needs on to go around defining {{{_XPG4}}} or similar.
Dave
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9221#comment:19>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.