Cannot build matplotlib-0.63.4

pygtk was built from source (I use gentoo and the ebuild

    > does nothing out of the ordinary).

    > I just re-emerged pygtk-2.3.97 and got the same result. I
    > have attached the full output from python setup.py build in
    > both cases - if you want to sent it to the pygtk people
    > that would be great.

One thing that puzzles me. If you installed pygtk-2.3.97 from src,
normally it would go to /usr/local rather than /usr, unless you
specified a --prefix (did you?).

The error message suggests that matplotlib is using /usr rather than
/usr/local for pygtk
    > file included from src/_gtkagg.cpp:8:
    > /usr/include/pygtk-2.0/pygobject.h:140: error: expected `, 'or `...' before "typename"

Do you have a /usr/local/include/pygtk-2.0 directory? If so, it may
be that your PKG_CONFIG_PATH may need to be updated to see the new
install. See man pkg-config for help on this environment variable.
You want to make sure that matplotlib sees the right pygtk; matplotlib
uses 'pkg-config --cflags-only-I pygtk-2.0', so you can debug your
setup by making sure this command is returning the right path to pygtk-2.0.

JDH

Hi John,

I let gentoo/portage decide where all the applications are built to and it
overrides the default configure settings to put things into /usr rather
than /usr/local - i think the rational is that if I am letting portage/gentoo
handle the management of a package then it should be ok in /usr. That way
anything that I build that there is not an ebuild for goes into /usr/local.

Anyway - I checked that the output of 'pkg-config --cflags-only-I pygtk-2.0'
it is - '-I/usr/include/pygtk-2.0 -I/usr/include/glib-2.0
-I/usr/lib/glib-2.0/include'

And pygtk-2.2.0 is/was installed into /usr and there were no problems so I
don't think that that is the cause of the problem.

I actually don't even have a /usr/local/include directory - I have never
manually installed a programme which keeps its headers available!

Cheers
Chris

···

On Friday 01 October 2004 14:51, you wrote:

    > pygtk was built from source (I use gentoo and the ebuild
    > does nothing out of the ordinary).

    > I just re-emerged pygtk-2.3.97 and got the same result. I
    > have attached the full output from python setup.py build in
    > both cases - if you want to sent it to the pygtk people
    > that would be great.

One thing that puzzles me. If you installed pygtk-2.3.97 from src,
normally it would go to /usr/local rather than /usr, unless you
specified a --prefix (did you?).

The error message suggests that matplotlib is using /usr rather than
/usr/local for pygtk
    > file included from src/_gtkagg.cpp:8:
    > /usr/include/pygtk-2.0/pygobject.h:140: error: expected `, 'or
`...' before "typename"

Do you have a /usr/local/include/pygtk-2.0 directory? If so, it may
be that your PKG_CONFIG_PATH may need to be updated to see the new
install. See man pkg-config for help on this environment variable.
You want to make sure that matplotlib sees the right pygtk; matplotlib
uses 'pkg-config --cflags-only-I pygtk-2.0', so you can debug your
setup by making sure this command is returning the right path to pygtk-2.0.

JDH

Hi,

like other people in these list, I can't compile matplotlib anymore with pygtk 2.4. I have the same error than the others. I don't know C so I understand nothing in these message. Someone was arriving to correct this problem please?

Thanks,

     Nicolas

building 'matplotlib.backends._gtkagg' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/local/include -I/usr/include -Isrc -Iagg22/include -I. -I/usr/local/include -I/usr/include -I/usr/local/include/freetype2 -I/usr/include/freetype2 -Isrc/freetype2 -Iagg22/include/freetype2 -I./freetype2 -I/usr/local/include/freetype2 -I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I/usr/include/pygtk-2.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/X11R6/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/python2.3 -c src/_gtkagg.cpp -o build/temp.linux-i686-2.3/src/_gtkagg.o
In file included from /usr/include/python2.3/Python.h:8,
                 from /usr/include/pygtk-2.0/pygobject.h:5,
                 from src/_gtkagg.cpp:8:
/usr/include/python2.3/pyconfig.h:856:1: warning: "_POSIX_C_SOURCE" redefined
In file included from /usr/include/string.h:26,
                 from /usr/include/c++/3.3/cstring:51,
                 from src/_gtkagg.cpp:1:
/usr/include/features.h:131:1: warning: this is the location of the previous definition
In file included from src/_gtkagg.cpp:8:
/usr/include/pygtk-2.0/pygobject.h:140: error: parse error before `typename'
/usr/include/pygtk-2.0/pygobject.h:147: error: parse error before `typename'
error: command 'gcc' failed with exit status 1