SourceForge logo
SourceForge logo
Menu

matplotlib-users

From: Victor D. <dan...@cs...> - 2006年10月27日 20:15:37
	Hi all,
	I am trying to build Matplotlib 0.87.7 on an RHEL 4.4-derived system, 
with Python 2.3.4. I am running into a weird problem. When I do "python 
setup.py build", I get the following error:
gcc: src/_gtkagg.cpp
In file included from /usr/include/python2.3/Python.h:8,
 from /usr/include/pygtk-2.0/pygobject.h:5,
 from src/_gtkagg.cpp:11:
/usr/include/python2.3/pyconfig.h:850:1: warning: "_POSIX_C_SOURCE" 
redefined
In file included from /usr/include/string.h:26,
 from 
/usr/lib/gcc/i386-redhat-linux/3.4.6/../../../../include/c++/3.4.6/cstring:51,
 from src/_gtkagg.cpp:2:
/usr/include/features.h:150:1: warning: this is the location of the 
previous definition
In file included from src/_gtkagg.cpp:11:
/usr/include/pygtk-2.0/pygobject.h:140: error: expected `,' or `...' 
before "typename"
/usr/include/pygtk-2.0/pygobject.h:147: error: expected `,' or `...' 
before "typename"
In file included from /usr/include/python2.3/Python.h:8,
 from /usr/include/pygtk-2.0/pygobject.h:5,
 from src/_gtkagg.cpp:11:
/usr/include/python2.3/pyconfig.h:850:1: warning: "_POSIX_C_SOURCE" 
redefined
In file included from /usr/include/string.h:26,
 from 
/usr/lib/gcc/i386-redhat-linux/3.4.6/../../../../include/c++/3.4.6/cstring:51,
 from src/_gtkagg.cpp:2:
/usr/include/features.h:150:1: warning: this is the location of the 
previous definition
In file included from src/_gtkagg.cpp:11:
/usr/include/pygtk-2.0/pygobject.h:140: error: expected `,' or `...' 
before "typename"
/usr/include/pygtk-2.0/pygobject.h:147: error: expected `,' or `...' 
before "typename"
	So I did a google search, and found someone recommending that "#include 
<Python.h>" be prepended to the offending file. I have prepended it to 
src/_gtkagg.cpp, did a clean, and run the build again. The error 
changed, and the "_POSIX_C_SOURCE" problem went away, but the build is 
still failing, at that same file:
gcc: src/_gtkagg.cpp
In file included from src/_gtkagg.cpp:11:
/usr/include/pygtk-2.0/pygobject.h:140: error: expected `,' or `...' 
before "typename"
/usr/include/pygtk-2.0/pygobject.h:147: error: expected `,' or `...' 
before "typename"
In file included from src/_gtkagg.cpp:11:
/usr/include/pygtk-2.0/pygobject.h:140: error: expected `,' or `...' 
before "typename"
/usr/include/pygtk-2.0/pygobject.h:147: error: expected `,' or `...' 
before "typename"
	Does anyone have an idea of what is going wrong here? I could really 
use some help, as I am totally stumped.
	Many thanks in advance.
From: Eric F. <ef...@ha...> - 2006年10月28日 00:42:34
Victor Danilchenko wrote:
> 	Hi all,
> 
> 	I am trying to build Matplotlib 0.87.7 on an RHEL 4.4-derived system, 
> with Python 2.3.4. I am running into a weird problem. When I do "python 
> setup.py build", I get the following error:
> 
> gcc: src/_gtkagg.cpp
> In file included from /usr/include/python2.3/Python.h:8,
> from /usr/include/pygtk-2.0/pygobject.h:5,
> from src/_gtkagg.cpp:11:
> /usr/include/python2.3/pyconfig.h:850:1: warning: "_POSIX_C_SOURCE" 
> redefined
> In file included from /usr/include/string.h:26,
> from 
> /usr/lib/gcc/i386-redhat-linux/3.4.6/../../../../include/c++/3.4.6/cstring:51,
> from src/_gtkagg.cpp:2:
> /usr/include/features.h:150:1: warning: this is the location of the 
> previous definition
> In file included from src/_gtkagg.cpp:11:
> /usr/include/pygtk-2.0/pygobject.h:140: error: expected `,' or `...' 
> before "typename"
> /usr/include/pygtk-2.0/pygobject.h:147: error: expected `,' or `...' 
> before "typename"
[...]
The error is not in matplotlib, it is in a pygtk header file, which is 
presumably coming from a Redhat package. I don't know why it is 
happening or what the best solution is, though. It looks like the 
pygobject.h that I have has "typename_", not "typename", so I am 
thinking maybe this is a pygtk bug, since fixed, in which "typename" is 
in conflict with something. You might try editing your copy of 
pygobject.h, adding the trailing underscore to "typename" on both lines 
where it occurs. It can't hurt; these are just dummy variable names.
Eric
From: <jao...@gm...> - 2006年10月28日 07:54:43
On 28/10/06, Eric Firing <ef...@ha...> wrote:
>
> The error is not in matplotlib, it is in a pygtk header file, which is
> presumably coming from a Redhat package. I don't know why it is
 True.
> happening or what the best solution is, though. It looks like the
> pygobject.h that I have has "typename_", not "typename", so I am
> thinking maybe this is a pygtk bug, since fixed, in which "typename" is
> in conflict with something.
 C++, typename is a reserved word there.
 You might try editing your copy of
> pygobject.h, adding the trailing underscore to "typename" on both lines
> where it occurs. It can't hurt; these are just dummy variable names.
 That is the solution, and you say the same that was adopted by the
project to solve the problem.
> Eric
--=20
Jos=E9 Ab=EDlio
From: John H. <jdh...@ac...> - 2006年10月30日 14:31:20
>>>>> "Eric" == Eric Firing <ef...@ha...> writes:
 >> I am trying to build Matplotlib 0.87.7 on an RHEL 4.4-derived
 >> system, with Python 2.3.4. I am running into a weird
 >> problem. When I do "python setup.py build", I get the following
 >> error:
It looks like this bug
http://matplotlib.sourceforge.net/faq.html#PYGTK24
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /