Ticket #7028 (new defect)
matplotlib 0.99.0 tries to use C compiler for C++ code.
| Reported by: | drkirkby | Owned by: | tbd |
|---|---|---|---|
| Priority: | major | Milestone: | sage-5.10 |
| Component: | build | Keywords: | |
| Cc: | Work issues: | ||
| Report Upstream: | Reported upstream. Developers acknowledge bug. | Reviewers: | |
| Authors: | Merged in: | ||
| Dependencies: | Stopgaps: |
Description
Using
- Solaris 10 update 7 on SPARC
- sage-4.1.2.alpha2
- Sun Studio 12.1
- An updated configure script to allow the Sun compiler to be used, I found that matplotlib-0.99.0 will not build.
CC was set to the Sun C compler, and CXX to the Sun C++ compiler, What appears to be happening is that matplotlib-0.99.0 is taking the CC variable but using that to try to build C++ code. Note the extension on the file the C compiler is trying to compile is '.cc', suggesting to me that it is really C++ code.
/opt/xxxsunstudio12.1/bin/cc -DNDEBUG -O -xcode=pic32 -DPY_ARRAYAUNIQUE_SYMBOL=MPL_ARRAY_API -I/export/home/drkirkby/sage/gcc32/sage-4.1.2.alpha2/local/lib/python2.6/site-packages/numpy/core/include -I/usr/sfw/include -I/usr/sfw/include/freetype2 -I/usr/local/include -I. -I/export/home/drkirkby/sage/gcc32/sage-4.1.2.alpha2/local/include/ -I/export/home/drkirkby/sage/gcc32/sage-4.1.2.alpha2/local/include/python2.6 -c src/ft2font.cpp -o build/temp.solaris-2.10-sun4u-2.6/src/ft2font.o cc: No valid input files specified, no output generated error: command '/opt/xxxsunstudio12.1/bin/cc' failed with exit status 1 Error building matplotlib package. real 0m3.752s user 0m1.227s sys 0m1.034s
Change History
Note: See
TracTickets for help on using
tickets.

This has been reported upstream to matplotlib-users@…. The developers acknowledge this is a bug, but to quote from Michael Droettboom.
This is a years-old known bug in distutils (which it looks like you've already commented on...). I've looked at it many times over those years, and it's really very difficult to fix from outside without terrible monkey-patching hacks that are certain to break on as many systems as they fix.
One suggested workaround is to defined CC to be a C++ compiler, then all code gets built with a C++ compiler. I have poined out that there will be a performance impact with this.