This is an archival dump of old wiki content --- see for current material.
Please see

how to install sunstudio and build matplotlib on solaris 10 might give some hints.

JDH said:

> Hi Erik -- if you succeed, then we'll have convincing proof that
> compiling mpl on solaris is easier than giving up the sauce.

Well, it has turned out to be easier than giving up the sauce (at least for me), but only by a whisker. In the end, the fix is incredibly simple (if you consider recompiling python and manually adjusting the auto-produced pyconfig.h incredibly simple, anyway). After two solid days of commenting this and that out, recompiling everything and its mother 76 different ways from Sunday, poring over a legion of Solaris sys includes, slaughtering a few spotlessly white lambs and one pure black sheep, wrapping the bones and tendons and viscera in a double layer of fat and burning the offering to Delphic Apollo, I found the answer:

The problem was with Solaris's support for the X/Open standards. To make a long story short, you can use Open Group Technical Standard, Issue 6 (XPG6/UNIX 03/SUSv3) (_XOPEN_SOURCE == 600) if and only if you are using an ISO C99 compiler. If you use X/Open CAE Specification, Issue 5 (XPG5/UNIX 98/SUSv2) (_XOPEN_SOURCE == 500), you don't have to use an ISO C99 compiler. For full details, see the Solaris header file /usr/include/sys/feature_tests.h.

This is why muhpubuh (AKA matplotlib---long story) compiles on Solaris 10 if you have the big bucks and can afford Sun's OpenStudio 10 compiler. gcc does not have full C99 support yet. In particular, its lack of support for the wide character library makes the build go bust. (See, e.g.,

More helpful links on the wchar problem with Python.h and Solaris :


SciPy: Cookbook/Matplotlib/CompilingMatPlotLibOnSolaris10 (last edited 2015-10-24 17:48:23 by anonymous)