I'm trying to get the latest matplotlib to build on Solaris 8 (gcc 3.3.2,
Python 2.3.4) and am having some trouble. We have stuff installed in
unusual places, so I've had to tweak the build environment a bit:
export LD_LIBRARY_PATH=/opt/lang/lib:/opt/app/lib:/opt/app/gnome-2.4/lib
export PKG_CONFIG_PATH=/opt/app/gnome-2.4/lib/pkgconfig
python setup.py build
Starting from scratch everything seems to build fine until it tries to
compile gtkagg. After a build attempt from scratch (which fails, but emits
lots of distutils copying messages and other successful gcc commands), a
second try yields:
running build
running build_py
running build_ext
building 'matplotlib.backends._gtkagg' extension
gcc -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/local/include -Isrc -Iswig -Iagg23/include -I. -I/usr/local/include -I/usr/local/include/freetype2 -Isrc/freetype2 -Iswig/freetype2 -Iagg23/include/freetype2 -I./freetype2 -I/usr/local/include/freetype2 -I/usr/local/include -I/opt/app/gnome-2.4//include/pygtk-2.0 -I/opt/app/gnome-2.4//include/glib-2.0 -I/opt/app/gnome-2.4//lib/glib-2.0/include -I/opt/app/gnome-2.4//include/gtk-2.0 -I/opt/app/gnome-2.4//lib/gtk-2.0/include -I/opt/app/gnome-2.4//include -I/usr/openwin/include -I/opt/app/gnome-2.4//include/atk-1.0 -I/opt/app/gnome-2.4//include/pango-1.0 -I/opt/app/freetype-2.1.5/include/freetype2 -I/opt/app/freetype-2.1.5/include -I/opt/app/fontconfig-2.2.0/include -I/opt/app/gnome-2.4//include/glib-2.0 -I/opt/app/gnome-2.4//lib/glib-2.0/include -I/opt/lang/python/include/python2.3 -c src/_gtkagg.cpp -o build/temp.solaris-2.8-i86pc-2.3/src/_gtkagg.o
In file included from /opt/lang/python/include/python2.3/Python.h:8,
from /opt/app/gnome-2.4/include/pygtk-2.0/pygobject.h:5,
from src/_gtkagg.cpp:10:
/opt/lang/python/include/python2.3/pyconfig.h:828:1: warning: "_FILE_OFFSET_BITS" redefined
In file included from /usr/include/iso/string_iso.h:31,
from /usr/include/string.h:18,
from /opt/lang/gcc-3.3.2/include/c++/3.3.2/cstring:51,
from src/_gtkagg.cpp:1:
/usr/include/sys/feature_tests.h:96:1: warning: this is the location of the previous definition
In file included from /opt/lang/python/include/python2.3/Python.h:8,
from /opt/app/gnome-2.4/include/pygtk-2.0/pygobject.h:5,
from src/_gtkagg.cpp:10:
/opt/lang/python/include/python2.3/pyconfig.h:850:1: warning: "_POSIX_C_SOURCE" redefined
In file included from /usr/include/iso/string_iso.h:31,
from /usr/include/string.h:18,
from /opt/lang/gcc-3.3.2/include/c++/3.3.2/cstring:51,
from src/_gtkagg.cpp:1:
/usr/include/sys/feature_tests.h:142:1: warning: this is the location of the previous definition
In file included from src/_gtkagg.cpp:10:
/opt/app/gnome-2.4/include/pygtk-2.0/pygobject.h:140: error: parse error before
`typename'
/opt/app/gnome-2.4/include/pygtk-2.0/pygobject.h:147: error: parse error before
`typename'
error: command 'gcc' failed with exit status 1
Looking at the referenced pygobject.h file I see:
139: PyObject *(*enum_add)(PyObject *module,
140: const char *typename,
141: const char *strip_prefix,
142: GType gtype);
143: PyObject* (*enum_from_gtype)(GType gtype, int value);
144:
145: PyTypeObject *flags_type;
146: PyObject *(*flags_add)(PyObject *module,
147: const char *typename,
148: const char *strip_prefix,
149: GType gtype);
150: PyObject* (*flags_from_gtype)(GType gtype, int value);
It's not at all obvious to me what the problem is.
Has anyone else encountered this problem? If so, do you have a workaround?
Thx,
···
--
Skip Montanaro
skip@...789...