i am having trouble installing matplotlib from source and thought i 
would post my issue here.
i download matplotlib version 0.91.0

i am using a version of scientific linux, so i can't use rpm packages 
for some packages
# uname -a
Linux labcalx 2.6.23.8 #1 Fri Nov 23 10:54:41 EST 2007 i686 i686 i386 
GNU/Linux

i verified that i had the following packages installed via rpm:
matplotlib core: zlib, zlib-devel, libpng, libpng-devel, freetype, 
freetype-devel, freetype-utils
• gtk backend: gtk2-devel, gtk+-devel, pygtk2, glib-devel, pygtk2-devel, 
gnome-libs-devel, pygtk2-libglade
• tk backend: tcl, tk, tkinter (and tk-devel)

the wxpython package is not available on rpm for me (at least not that i 
can find) so i downloaded the source. that also seemed to compile and 
install fine. the libraries are in /usr/local/lib and that path is 
referenced in file
/etc/ld.so.conf.d/wx.conf
the ldconfig command seemed to find this okay and that looks like it 
should work.

as per the user install guide, i downloaded setuptools-0.6c7-py2.3.egg 
without any trouble

here is my output from the build command:
# python setup.py build
============================================================================
BUILDING MATPLOTLIB
matplotlib: 0.91.0
python: 2.3.4 (#1, Oct 9 2006, 18:22:22) [GCC 3.4.5
20051201 (Red Hat 3.4.5-2)]
platform: linux2

REQUIRED DEPENDENCIES
numpy: 0.9.8
freetype2: 9.7.3

OPTIONAL BACKEND DEPENDENCIES
libpng: 1.2.7
Tkinter: Tkinter: 1.177, Tk: 8.4, Tcl: 8.4
wxPython: no
* wxPython not found
Gtk+: gtk+: 2.4.13, glib: 2.4.7, pygtk: 2.4.0, pygobject:
[pre-pygobject]
Qt: no
Qt4: no
Cairo: no

OPTIONAL DATE/TIMEZONE DEPENDENCIES
datetime: present, version unknown
dateutil: matplotlib will provide
pytz: matplotlib will provide

OPTIONAL USETEX DEPENDENCIES
dvipng: no
ghostscript: 7.07
latex: 3.14159
pdftops: 3.00

EXPERIMENTAL CONFIG PACKAGE DEPENDENCIES
configobj: matplotlib will provide
enthought.traits: matplotlib will provide

[Edit setup.cfg to suppress the above messages]
============================================================================
running build
running build_py
copying lib/matplotlib/mpl-data/matplotlibrc -> 
build/lib.linux-i686-2.3/matplotlib/mpl-data
copying lib/matplotlib/mpl-data/matplotlib.conf -> 
build/lib.linux-i686-2.3/matplotlib/mpl-data
running build_ext
building 'matplotlib.backends._backend_agg' extension
g++4 options: '-fno-strict-aliasing -DNDEBUG -O2 -g -pipe -m32 
-march=i386 -mtune=pentium4 -D_GNU_SOURCE -fPIC -fPIC'
creating build/temp.linux-i686-2.3
creating build/temp.linux-i686-2.3/agg23
creating build/temp.linux-i686-2.3/agg23/src
creating build/temp.linux-i686-2.3/src
creating build/temp.linux-i686-2.3/CXX
compile options: '-I/usr/lib/python2.3/site-packages/numpy/core/include 
-I/usr/include/libpng12 -I/usr/local/include -I/usr/include -I. -Isrc 
-Iswig -Iagg23/include -I. -I/usr/include/freetype2 -I/usr/local/include 
-I/usr/include -I. -I/usr/include/python2.3 -c'
g++4: src/_image.cpp
In file included from /usr/include/python2.3/Python.h:8,
from src/_image.cpp:7:
/usr/include/python2.3/pyconfig.h:850:1: warning: "_POSIX_C_SOURCE" 
redefined
In file included from 
/usr/include/c++/3.4.3/i386-redhat-linux/bits/os_defines.h:39,
from /usr/include/c++/3.4.3/i386-redhat-linux/bits/c++config.h:35,
from /usr/include/c++/3.4.3/iostream:44,
from src/_image.cpp:1:
/usr/include/features.h:150:1: warning: this is the location of the 
previous definition
g++4: agg23/src/agg_rasterizer_scanline_aa.cpp
g++4: CXX/IndirectPythonInterface.cxx
In file included from /usr/include/python2.3/Python.h:8,
from ./CXX/WrapPython.h:47,
from ./CXX/IndirectPythonInterface.hxx:41,
from CXX/IndirectPythonInterface.cxx:38:
/usr/include/python2.3/pyconfig.h:850:1: warning: "_POSIX_C_SOURCE" 
redefined
In file included from /usr/include/sys/time.h:22,
from ./CXX/WrapPython.h:43,
from ./CXX/IndirectPythonInterface.hxx:41,
from CXX/IndirectPythonInterface.cxx:38:
/usr/include/features.h:150:1: warning: this is the location of the 
previous definition
g++4: src/backend_agg.cpp
In file included from /usr/include/python2.3/Python.h:8,
from ./CXX/WrapPython.h:47,
from ./CXX/Extensions.hxx:48,
from src/ft2font.h:18,
from src/backend_agg.cpp:24:
/usr/include/python2.3/pyconfig.h:850:1: warning: "_POSIX_C_SOURCE" 
redefined
In file included from 
/usr/include/c++/3.4.3/i386-redhat-linux/bits/os_defines.h:39,
from /usr/include/c++/3.4.3/i386-redhat-linux/bits/c++config.h:35,
from /usr/include/c++/3.4.3/iostream:44,
from src/backend_agg.cpp:4:
/usr/include/features.h:150:1: warning: this is the location of the 
previous definition
/usr/lib/python2.3/site-packages/numpy/core/include/numpy/ufuncobject.h:9: 
error: 'intp' has not been declared
/usr/lib/python2.3/site-packages/numpy/core/include/numpy/ufuncobject.h:9: 
error: 'intp' has not been declared
In file included from /usr/include/python2.3/Python.h:8,
from ./CXX/WrapPython.h:47,
from ./CXX/Extensions.hxx:48,
from src/ft2font.h:18,
from src/backend_agg.cpp:24:
/usr/include/python2.3/pyconfig.h:850:1: warning: "_POSIX_C_SOURCE" 
redefined
In file included from 
/usr/include/c++/3.4.3/i386-redhat-linux/bits/os_defines.h:39,
from /usr/include/c++/3.4.3/i386-redhat-linux/bits/c++config.h:35,
from /usr/include/c++/3.4.3/iostream:44,
from src/backend_agg.cpp:4:
/usr/include/features.h:150:1: warning: this is the location of the 
previous definition
/usr/lib/python2.3/site-packages/numpy/core/include/numpy/ufuncobject.h:9: 
error: 'intp' has not been declared
/usr/lib/python2.3/site-packages/numpy/core/include/numpy/ufuncobject.h:9: 
error: 'intp' has not been declared
error: Command "g++4 -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -m32 
-march=i386 -mtune=pentium4 -D_GNU_SOURCE -fPIC -fPIC 
-I/usr/lib/python2.3/site-packages/numpy/core/include 
-I/usr/include/libpng12 -I/usr/local/include -I/usr/include -I. -Isrc 
-Iswig -Iagg23/include -I. -I/usr/include/freetype2 -I/usr/local/include 
-I/usr/include -I. -I/usr/include/python2.3 -c src/backend_agg.cpp -o 
build/temp.linux-i686-2.3/src/backend_agg.o" failed with exit status 1

i tried different compilers (3.4.6 and 4.1.0), all of which failed with 
the same 'intp' has not been declared issue.

i thought it was a problem with wx, so i edited setup.cfg to auto
Gtk = True
Gtkagg = True
Tkagg = True
Wxagg = False

that cleared up the wx problem, but it _still_ won't compile.

edited setup.cfg to a few different backends (gtk, gtkagg, tkagg) and 
they all fail.
even setting the backend=Svg in the setup.cfg fails.

any suggestions???? thanks!

-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to