Hi Daniel,

I've seen that and the only way I can make Python pick up the right
compiler/linker is to modify python<version#>/config/Makefile, specifically
the fields for CC and CXX

CC = gcc
CXX = g++

but also on some occasions comment out  pic32

CCSHARED=       #-xcode=pic32

It is possible that the compilation of ctraits.c will fail because it
doesn't compile with g++ and needs gcc in which case you can run the command
manually with gcc and continue building the rest of the package.

These are all the gory details of compiling matplotlib on Solaris.
It's possible but it's a pain, I wish someone has a better solution
for this. (May be Sun/Solaris will disappear before that.)

Nadia


Daniel Fan wrote:
> I think the problem is the building use the same
> command for compiling
> .c file and .cpp/.cxx file. It uses whatever I set to
> $CC to compile the
> file and ignore $CXX.
> I am using the latest ActivePython for solaris.
> I've tried to set $CC=g  , then I got the following
> error message:
> compute:/home/yfan/usr/local/src/matplotlib-0.87.7>
> CC=g   python
> setup.py build
> GTK requires pygtk
> GTKAgg requires pygtk
> running build
> running build_py
> running build_ext
> building 'matplotlib._agg' extension
> g   -DNDEBUG -O -xcode=pic32 -Iagg23/include -Isrc
> -Iswig
> -I/home/yfan/usr/local/share/ASpy25/include/python2.5
> -c src/agg.cxx -o
> build/temp.solaris-2.10-sun4u-2.5/src/agg.o
> g  : language code=pic32 not recognized
> g  : src/agg.cxx: linker input file unused since
> linking not done
> g   -DNDEBUG -O -xcode=pic32 -Iagg23/include -Isrc
> -Iswig
> -I/home/yfan/usr/local/share/ASpy25/include/python2.5
> -c
> agg23/src/agg_trans_affine.cpp -o
> build/temp.solaris-2.10-sun4u-2.5/agg23/src/agg_trans_affine.o
> g  : language code=pic32 not recognized
> g  : agg23/src/agg_trans_affine.cpp: linker input file
> unused since
> linking not done
> g   -DNDEBUG -O -xcode=pic32 -Iagg23/include -Isrc
> -Iswig
> -I/home/yfan/usr/local/share/ASpy25/include/python2.5
> -c
> agg23/src/agg_path_storage.cpp -o
> build/temp.solaris-2.10-sun4u-2.5/agg23/src/agg_path_storage.o
> g  : language code=pic32 not recognized
> g  : agg23/src/agg_path_storage.cpp: linker input file
> unused since
> linking not done
> g   -DNDEBUG -O -xcode=pic32 -Iagg23/include -Isrc
> -Iswig
> -I/home/yfan/usr/local/share/ASpy25/include/python2.5
> -c
> agg23/src/agg_bezier_arc.cpp -o
> build/temp.solaris-2.10-sun4u-2.5/agg23/src/agg_bezier_arc.o
> g  : language code=pic32 not recognized
> g  : agg23/src/agg_bezier_arc.cpp: linker input file
> unused since
> linking not done
> g   -DNDEBUG -O -xcode=pic32 -Iagg23/include -Isrc
> -Iswig
> -I/home/yfan/usr/local/share/ASpy25/include/python2.5
> -c
> agg23/src/agg_vcgen_dash.cpp -o
> build/temp.solaris-2.10-sun4u-2.5/agg23/src/agg_vcgen_dash.o
> g  : language code=pic32 not recognized
> g  : agg23/src/agg_vcgen_dash.cpp: linker input file
> unused since
> linking not done
> g   -DNDEBUG -O -xcode=pic32 -Iagg23/include -Isrc
> -Iswig
> -I/home/yfan/usr/local/share/ASpy25/include/python2.5
> -c
> agg23/src/agg_vcgen_stroke.cpp -o
> build/temp.solaris-2.10-sun4u-2.5/agg23/src/agg_vcgen_stroke.o
> g  : language code=pic32 not recognized
> g  : agg23/src/agg_vcgen_stroke.cpp: linker input file
> unused since
> linking not done
> g   -DNDEBUG -O -xcode=pic32 -Iagg23/include -Isrc
> -Iswig
> -I/home/yfan/usr/local/share/ASpy25/include/python2.5
> -c
> agg23/src/agg_rasterizer_scanline_aa.cpp -o
> build/temp.solaris-2.10-sun4u-2.5/agg23/src/agg_rasterizer_scanline_aa.o
> g  : language code=pic32 not recognized
> g  : agg23/src/agg_rasterizer_scanline_aa.cpp: linker
> input file unused
> since linking not done
> g   -DNDEBUG -O -xcode=pic32 -Iagg23/include -Isrc
> -Iswig
> -I/home/yfan/usr/local/share/ASpy25/include/python2.5
> -c
> agg23/src/agg_curves.cpp -o
> build/temp.solaris-2.10-sun4u-2.5/agg23/src/agg_curves.o
> g  : language code=pic32 not recognized
> g  : agg23/src/agg_curves.cpp: linker input file
> unused since linking
> not done
> CC -G build/temp.solaris-2.10-sun4u-2.5/src/agg.o
> build/temp.solaris-2.10-sun4u-2.5/agg23/src/agg_trans_affine.o
> build/temp.solaris-2.10-sun4u-2.5/agg23/src/agg_path_storage.o
> build/temp.solaris-2.10-sun4u-2.5/agg23/src/agg_bezier_arc.o
> build/temp.solaris-2.10-sun4u-2.5/agg23/src/agg_vcgen_dash.o
> build/temp.solaris-2.10-sun4u-2.5/agg23/src/agg_vcgen_stroke.o
> build/temp.solaris-2.10-sun4u-2.5/agg23/src/agg_rasterizer_scanline_aa.o
> build/temp.solaris-2.10-sun4u-2.5/agg23/src/agg_curves.o
> -lstdc   -lm -o
> build/lib.solaris-2.10-sun4u-2.5/matplotlib/_agg.so
> ld: fatal: file
> build/temp.solaris-2.10-sun4u-2.5/src/agg.o: open
> failed: No such file or directory
> ld: fatal: file
> build/temp.solaris-2.10-sun4u-2.5/agg23/src/agg_trans_affine.o:
> open
> failed: No such file or directory
> ld: fatal: file
> build/temp.solaris-2.10-sun4u-2.5/agg23/src/agg_path_storage.o:
> open
> failed: No such file or directory
> ld: fatal: file
> build/temp.solaris-2.10-sun4u-2.5/agg23/src/agg_bezier_arc.o:
> open
> failed: No such file or directory
> ld: fatal: file
> build/temp.solaris-2.10-sun4u-2.5/agg23/src/agg_vcgen_dash.o:
> open
> failed: No such file or directory
> ld: fatal: file
> build/temp.solaris-2.10-sun4u-2.5/agg23/src/agg_vcgen_stroke.o:
> open
> failed: No such file or directory
> ld: fatal: file
> build/temp.solaris-2.10-sun4u-2.5/agg23/src/agg_rasterizer_scanline_aa.o:
> open failed: No such file or directory
> ld: fatal: file
> build/temp.solaris-2.10-sun4u-2.5/agg23/src/agg_curves.o:
> open failed:
> No such file or directory
> ld: warning: symbol `clog' has differing types:
> (file /usr/local/lib/libstdc  .so type=OBJT; file
> /usr/lib/libm.so
> type=FUNC);
> /usr/local/lib/libstdc  .so definition taken
> ld: fatal: File processing errors. No output written
> to
> build/lib.solaris-2.10-sun4u-2.5/matplotlib/_agg.so
> error: command 'CC' failed with exit status 1
> 
> 
> Nadia Dencheva wrote:
>> Try building it with g  . Generally you should be
> able to set
>> the env variable CC to g   but I think distutils in
> python 2.3
>> does not look at the environment variables and you
> may need to tweak
>> python2.3/config/Makefile to use g   instead of
> Sun's cc.
>> I may be wrong.
>> Later versions of python respect $CC.
>>
>> Nadia Dencheva
>>
>> Daniel Fan wrote:
>>> Hi, I am trying install matplotlib on a solaris
>>> machine. When I run python setup.py build, I get
> the following error:
>>> GTK requires pygtk
>>> GTKAgg requires pygtk
>>> TKAgg requires TkInter
>>> running build
>>> running build_py
>>> running build_ext
>>> building 'matplotlib._agg' extension
>>> cc -DNDEBUG -O -Iagg23/include -Isrc -Iswig
>>> -I/usr/local/lang/python/2.3.2/include/python2.3 -c
>>> src/agg.cxx -o
> build/temp.solaris-2.10-sun4u-2.3/src/agg.o
>>> cc: No input file specified, no output generated
>>> error: command 'cc' failed with exit status 1
>>>
>>> How can there be no input file?
>>>
>>>
>>>
>>>
>>> __________________________________________________
>>> Do You Yahoo!?
>>> Tired of spam? Yahoo! Mail has the best spam
> protection around
>>> http://mail.yahoo.com
>>>
> -------------------------------------------------------------------------
>>> This SF.net email is sponsored by DB2 Express
>>> Download DB2 Express C - the FREE version of DB2
> express and take
>>> control of your XML. No limits. Just data. Click to
> get it now.
>>> http://sourceforge.net/powerbar/db2/
>>> _______________________________________________
>>> Matplotlib-users mailing list
>>> Matplotlib-users@lists.sourceforge.net
>>>
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
> 
> 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to