Can't build matplotlib pygtk related?

Hi,

This is my first post to the list so hi everyone!

I am trying to build matplotlib on a freshly
installed CentOS 4 workstation.

I have read the FAQ about build problems with pygtk
2.4 is the problem fixed in my version?

[root@…1090… matplotlib-0.87.2]# rpm -qa | grep
pygtk

pygtk2-2.4.0-1

When I try python setup.py build it ends with:

error: Command "gcc -pthread
-fno-strict-aliasing -DNDEBUG -O2 -g -pipe

-m32 -march=i386 -mtune=pentium4 -D_GNU_SOURCE -fPIC
-fPIC

-I/usr/share/tcl8.4/…/…/include
-I/usr/share/tk8.4/…/…/include

-I/usr/local/include -I/usr/include -I. -Isrc -Iswig -Iagg23/include -I.

-I/usr/local/include -I/usr/include -I.

-I/usr/share/tcl8.4/…/…/include/freetype2

-I/usr/share/tk8.4/…/…/include/freetype2

-I/usr/local/include/freetype2
-I/usr/include/freetype2 -I./freetype2

-Isrc/freetype2 -Iswig/freetype2
-Iagg23/include/freetype2 -I./freetype2

-I/usr/local/include/freetype2
-I/usr/include/freetype2 -I./freetype2

-I/usr/include/python2.3 -c src/_tkagg.cpp -o

build/temp.linux-i686-2.3/src/_tkagg.o" failed
with exit status 1

I also have an error at the beginning that says I
miss tk.h, my system is in french so I will not paste this part.

Thanks for your help and time,

Etienne

Have you installed the "devel" version of the package (contains
headers required for compilation)?

Johann

···

On Wednesday, 19 April 2006 17:02, Etienne Ringuet wrote:

[root@...1090... matplotlib-0.87.2]# rpm -qa | grep pygtk
pygtk2-2.4.0-1

Hi Etienne

I am trying to build matplotlib on a freshly installed CentOS 4 workstation.

error: Command "gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe
-m32 -march=i386 -mtune=pentium4 -D_GNU_SOURCE -fPIC -fPIC
-I/usr/share/tcl8.4/../../include -I/usr/share/tk8.4/../../include
-I/usr/local/include -I/usr/include -I. -Isrc -Iswig -Iagg23/include -I.
-I/usr/local/include -I/usr/include -I.
-I/usr/share/tcl8.4/../../include/freetype2
-I/usr/share/tk8.4/../../include/freetype2
-I/usr/local/include/freetype2 -I/usr/include/freetype2 -I./freetype2
-Isrc/freetype2 -Iswig/freetype2 -Iagg23/include/freetype2 -I./freetype2
-I/usr/local/include/freetype2 -I/usr/include/freetype2 -I./freetype2
-I/usr/include/python2.3 -c src/_tkagg.cpp -o
build/temp.linux-i686-2.3/src/_tkagg.o" failed with exit status 1

I also have an error at the beginning that says I miss tk.h, my system is in
french so I will not paste this part.

I just ran into this problem again myself, on an Ubuntu machine. It
has been present for a while.

A quick fix is to edit 'setup.py' and change the line

BUILD_TKAGG = 'auto'

to

BUILD_TKAGG = 0

Another solution is to install the Tk development headers. Under
Ubuntu it is in the package tk8.4-dev.

This is probably something that should be caught by setup.py
before building though!

Regards
Stéfan

···

On Wed, Apr 19, 2006 at 11:02:41AM -0400, Etienne Ringuet wrote:

Here is a one-line patch to make setup complain if tk.h isn't found.

Stéfan

setupext.diff (549 Bytes)