Matplotlib build/install error

Hey ALL

I've been trying to install matplotlib-0.99.1.1.
Getting build errors :

1/
[user@...2894... ~]$ uname -a
Linux target-datalog 2.6.21.7-2.fc8xen #1 SMP Fri Feb 15 12:34:28 EST 2008 x86_64 x86_64 x86_64 GNU/Linux

2/ Used this link to download matplotlib:
http://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-0.99.1/matplotlib-0.99.1.2.tar.gz/download

3/ Used python 2.6.2

4/ STEPS:
[user@...2894... downloads]$ wget http://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-0.99.1/matplotlib-0.99.1.2.tar.gz/download
[user@...2894... downloads]$ tar -xzvf matplotlib-0.99.1.2.tar.gz
[user@...2894... downloads]$ cd matplotlib-0.99.1.1
[user@...2894... matplotlib-0.99.1.1]$ python setup.py build

Got this error:
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
In file included from src/ft2font.cpp:1:
src/ft2font.h:13:22: error: ft2build.h: No such file or directory
src/ft2font.h:14:10: error: #include expects "FILENAME" or <FILENAME>
src/ft2font.h:15:10: error: #include expects "FILENAME" or <FILENAME>
src/ft2font.h:16:10: error: #include expects "FILENAME" or <FILENAME>
src/ft2font.h:17:10: error: #include expects "FILENAME" or <FILENAME>
src/ft2font.h:18:10: error: #include expects "FILENAME" or <FILENAME>
src/ft2font.h:31: error: 'FT_Bitmap' has not been declared
src/ft2font.h:31: error: 'FT_Int' has not been declared
src/ft2font.h:31: error: 'FT_Int' has not been declared
src/ft2font.h:77: error: expected ',' or '...' before '&' token
src/ft2font.h:77: error: ISO C++ forbids declaration of 'FT_Face' with no type
src/ft2font.h:83: error: expected ',' or '...' before '&' token
src/ft2font.h:83: error: ISO C++ forbids declaration of 'FT_Face' with no type
src/ft2font.h:122: error: 'FT_Face' does not name a type
src/ft2font.h:123: error: 'FT_Matrix' does not name a type
src/ft2font.h:124: error: 'FT_Vector' does not name a type
src/ft2font.h:125: error: 'FT_Error' does not name a type
src/ft2font.h:126: error: 'FT_Glyph' was not declared in this scope
src/ft2font.h:126: error: template argument 1 is invalid
src/ft2font.h:126: error: template argument 2 is invalid
src/ft2font.h:127: error: 'FT_Vector' was not declared in this scope
src/ft2font.h:127: error: template argument 1 is invalid
src/ft2font.h:127: error: template argument 2 is invalid
src/ft2font.h:133: error: 'FT_BBox' does not name a type
src/ft2font.cpp:45: error: 'FT_Library' does not name a type
src/ft2font.cpp:96: error: variable or field 'draw_bitmap' declared void
src/ft2font.cpp:96: error: 'int FT2Image::draw_bitmap' is not a static member of 'class FT2Image'
src/ft2font.cpp:96: error: 'FT_Bitmap' was not declared in this scope
src/ft2font.cpp:96: error: 'bitmap' was not declared in this scope
src/ft2font.cpp:97: error: 'FT_Int' was not declared in this scope
src/ft2font.cpp:98: error: 'FT_Int' was not declared in this scope
src/ft2font.cpp:98: error: initializer expression list treated as compound expression
src/ft2font.cpp:98: error: expected ',' or ';' before '{' token
/home/lbuser/python/lbuser/lib/python2.6/site-packages/numpy/core/include/numpy/__multiarray_api.h:1187: warning: 'int _import_array()' defined but not used
error: command 'gcc' failed with exit status 1
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

Any idea?

Thanks,
Dali

You do not have the freetype2 headers installed. On ubuntu, I think
they are provided by the libfreetype6-dev package.

Darren

···

On Mon, Dec 7, 2009 at 7:26 AM, Dali Laadhar <dali.laadhar@...2893...> wrote:

Hey ALL

I've been trying to install matplotlib-0.99.1.1.
Getting build errors :

1/
[user@...2894... ~]$ uname -a
Linux target-datalog 2.6.21.7-2.fc8xen #1 SMP Fri Feb 15 12:34:28 EST 2008 x86_64 x86_64 x86_64 GNU/Linux

2/ Used this link to download matplotlib:
Download matplotlib-0.99.1.2.tar.gz (matplotlib)

3/ Used python 2.6.2

4/ STEPS:
[user@...2894... downloads] wget http://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-0.99.1/matplotlib-0.99.1.2.tar.gz/download \[user@\.\.\.2894\.\.\. downloads\] tar -xzvf matplotlib-0.99.1.2.tar.gz
[user@...2894... downloads] cd matplotlib\-0\.99\.1\.1 \[user@\.\.\.2894\.\.\. matplotlib\-0\.99\.1\.1\] python setup.py build

Got this error:
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
In file included from src/ft2font.cpp:1:
src/ft2font.h:13:22: error: ft2build.h: No such file or directory

Thanks a lot.
Effectively, that was the missing headers

···

------
yum install libpng-devel.x86_64
yum install freetype-devel.x86_64
------

Thanks,
Dali

----- Original Message -----
From: "Darren Dale" <dsdale24@...287...>
To: "Dali Laadhar" <dali.laadhar@...2893...>
Cc: matplotlib-users@lists.sourceforge.net
Sent: Monday, December 7, 2009 2:05:27 PM
Subject: Re: [Matplotlib-users] Matplotlib build/install error

On Mon, Dec 7, 2009 at 7:26 AM, Dali Laadhar <dali.laadhar@...2893...> wrote:

Hey ALL

I've been trying to install matplotlib-0.99.1.1.
Getting build errors :

1/
[user@...2894... ~]$ uname -a
Linux target-datalog 2.6.21.7-2.fc8xen #1 SMP Fri Feb 15 12:34:28 EST 2008 x86_64 x86_64 x86_64 GNU/Linux

2/ Used this link to download matplotlib:
Download matplotlib-0.99.1.2.tar.gz (matplotlib)

3/ Used python 2.6.2

4/ STEPS:
[user@...2894... downloads] wget http://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-0.99.1/matplotlib-0.99.1.2.tar.gz/download \[user@\.\.\.2894\.\.\. downloads\] tar -xzvf matplotlib-0.99.1.2.tar.gz
[user@...2894... downloads] cd matplotlib\-0\.99\.1\.1 \[user@\.\.\.2894\.\.\. matplotlib\-0\.99\.1\.1\] python setup.py build

Got this error:
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
In file included from src/ft2font.cpp:1:
src/ft2font.h:13:22: error: ft2build.h: No such file or directory

You do not have the freetype2 headers installed. On ubuntu, I think
they are provided by the libfreetype6-dev package.

Darren