Hi, I was trying to install the latest matplotlib from
> source on an ancient RH9 system but I get the following
> compilation error:
> building 'matplotlib._na_cntr' extension gcc -DNDEBUG -O2
> -g -pipe -march=i386 -mcpu=i686 -D_GNU_SOURCE -fPIC -
> fPIC -I/usr/local/include -I/usr/include
> -I/usr/include/python2.2 -c src/_na_cntr.c -o
> build/temp.linux-i686-2.2/_na_cntr.o -DNUMARRAY=1
> src/_na_cntr.c:1698: parse error before "init_na_cntr"
> error: command 'gcc' failed with exit status 1
> Any advice would be greatly appreciated - I can't even
> find the file _na_cntr.c that triggers the error....
> The gcc version is 3.2.2 if that matters.
What is your python version? It looks like the macro PyMODINIT_FUNC
is not being found. This is defined in pyport.h in python2.4, but you
probably have a much older python installed. The reason you cannot
find _na_cntr.c is that it is autogenerated to support Numeric or
numarray at compile time. The src dile is src/cntr.c. In that file,
extern "C" void
and let me know if this helps