[Matplotlib-users] Problem building Matplotlib 1.3.1 on linux (CentOS 5.9 AMD64)

2013-12-10 Thread Guillermo-Nicolas Guénon Díaz
Hello,

I'm having an issue building Matplotlib. In reality the build process
finishes without error, but afterwards I get this error when importing
pyplot:

[kpi@dev-outils lib.linux-x86_64-3.3]$ python3.3
Python 3.3.2 (default, Sep 17 2013, 10:40:41)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux
Type help, copyright, credits or license for more information.
 import matplotlib
 import matplotlib.pyplot as plt
Traceback (most recent call last):
  File stdin, line 1, in module
  File ./matplotlib/pyplot.py, line 24, in module
import matplotlib.colorbar
  File ./matplotlib/colorbar.py, line 27, in module
import matplotlib.artist as martist
  File ./matplotlib/artist.py, line 8, in module
from .transforms import Bbox, IdentityTransform, TransformedBbox, \
  File ./matplotlib/transforms.py, line 35, in module
from matplotlib._path import (affine_transform,
count_bboxes_overlapping_bbox,
*ImportError: ./matplotlib/_path.cpython-33m.so
http://path.cpython-33m.so: undefined symbol:
_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l*


I don't know a thing about building C extensions, but if I understood
correctly some pasts posts in this list and others, this problem might be
caused by a library that is compiled with an incompatible version of GCC.
My first suspect was freetype, so I downloaded and compiled v2.4.12 using
gcc44 (which is the same compiler I used to build python3.3 and matplotlib).
But the problem persists... My question is: *how can I know wich library is
causing the issue, so I could recompile it?*

Or, if I am completely missing the root cause, thank you for steering me in
the correct direction :-)

More detailed info follows. Thank you for your help !

Nicolas


Here is the information asked for in the troubleshooting FAQ:

[kpi@dev-outils matplotlib]$ uname -a
Linux dev-outils.admin.mt.lan 2.6.18-348.16.1.el5 #1 SMP Wed Aug 21
04:00:25 EDT 2013 x86_64 x86_64 x86_64 GNU/Linux

[kpi@dev-outils matplotlib]$ cat /etc/redhat-release
CentOS release 5.9 (Final)

But please, note that I am using a Python version built by myself (not the
version that comes with CenOS 5.9) using gcc 4.4.7 (and not gcc 4.1.2)

[kpi@dev-outils matplotlib]$ gcc44 -v
Using built-in specs.
Target: x86_64-redhat-linux6E
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info
--with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap
--enable-shared --enable-threads=posix --enable-checking=release
--with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions
--disable-gnu-unique-object --with-as=/usr/libexec/binutils220/as
--enable-languages=c,c++,fortran --disable-libgcj
--with-mpfr=/builddir/build/BUILD/gcc-4.4.7-20120601/obj-x86_64-redhat-linux6E/mpfr-install/
--with-ppl=/builddir/build/BUILD/gcc-4.4.7-20120601/obj-x86_64-redhat-linux6E/ppl-install
--with-cloog=/builddir/build/BUILD/gcc-4.4.7-20120601/obj-x86_64-redhat-linux6E/cloog-install
--with-tune=generic --with-arch_32=i586 --build=x86_64-redhat-linux6E
Thread model: posix
gcc version 4.4.7 20120313 (Red Hat 4.4.7-1) (GCC)

[kpi@dev-outils lib.linux-x86_64-3.3]$ python3.3
Python 3.3.2 (default, Sep 17 2013, 10:40:41)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux
 matplotlib.__version__
'1.3.1'

Here is what I modified in setup.cfg last time (but I also tried with an
unmodified version with the same results):

[gui_support]
agg = True
cairo = False
gtk = False
gtk3agg = False
gtk3cairo = False
gtkagg = False
macosx = False
pyside = False
qt4agg = False
tkagg = False
windowing = False
wxagg = False

[rc_options]
backend = Agg

I didn't modify any other config file. Here is the output of the build
process:


[kpi@dev-outils matplotlib-1.3.1]$ python3.3 setup.py build

Edit setup.cfg to change the build options

BUILDING MATPLOTLIB
matplotlib: yes [1.3.1]
python: yes [3.3.2 (default, Sep 17 2013, 10:40:41)  [GCC
4.4.7 20120313 (Red Hat 4.4.7-1)]]
  platform: yes [linux]

REQUIRED DEPENDENCIES AND EXTENSIONS
 numpy: yes [version 1.8.0]
  dateutil: yes [using dateutil version 2.2]
   tornado: yes [using tornado version 3.1.1]
 pyparsing: yes [using pyparsing version 2.0.1]
 pycxx: yes [Official versions of PyCXX are not compatible
with Python 3.x.  Using local copy]
libagg: yes [pkg-config information for 'libagg' could not
be found. Using local copy.]
  freetype: yes [version 16.1.10]
   png: yes [version 1.2.10]

OPTIONAL SUBPACKAGES
   sample_data: yes [installing]
  toolkits: yes [installing]
 tests: yes [using nose version 1.3.0]

OPTIONAL BACKEND EXTENSIONS
macosx: no  [skipping due to configuration]

Re: [Matplotlib-users] problem building matplotlib

2010-09-15 Thread Eric Firing
On 09/14/2010 01:36 PM, Dan Kortschak wrote:
 Hello,

 I just tried to have just tried to build matplotlib, but it fails - and
 is unable to find wxPython (looking under 2.8 rather than 2.6 where is
 lives - installed from source) or libgtk-2 headers (installed from apt
 repo).

 Can anyone suggest how to resolve these issues?

If you want to use wx, you need 2.8.  It looks like you don't have any 
of the gui dependencies.   Since you you are running ubuntu, I suggest 
you use the installation method recently described in this thread:

http://www.mail-archive.com/matplotlib-users@lists.sourceforge.net/msg18464.html

Be careful to read down through the thread; the first try at 
comprehensive instructions has an error.

Eric


--
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] problem building matplotlib

2010-09-15 Thread Dan Kortschak
Thanks Eric,

The gui dependencies are secondary, but I will look into that. Since
they are optional, the absence of them should not be the cause of the
failure, but it looks like it might be. Is that the case?

cheers
Dan

On Tue, 2010-09-14 at 21:42 -1000, Eric Firing wrote:
 On 09/14/2010 01:36 PM, Dan Kortschak wrote:
  Hello,
 
  I just tried to have just tried to build matplotlib, but it fails - and
  is unable to find wxPython (looking under 2.8 rather than 2.6 where is
  lives - installed from source) or libgtk-2 headers (installed from apt
  repo).
 
  Can anyone suggest how to resolve these issues?
 
 If you want to use wx, you need 2.8.  It looks like you don't have any 
 of the gui dependencies.   Since you you are running ubuntu, I suggest 
 you use the installation method recently described in this thread:
 
 http://www.mail-archive.com/matplotlib-users@lists.sourceforge.net/msg18464.html
 
 Be careful to read down through the thread; the first try at 
 comprehensive instructions has an error.
 
 Eric



--
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] problem building matplotlib

2010-09-15 Thread Dan Kortschak
I've just has a look at that and unfortunately it does not fix the
problem

Is there any other suggestion that might be worth a try?

I should point out that I already have numpy 1.4.1 installed and scipy
0.8.0 as dependencies for other packages.

thanks
Dan

On Tue, 2010-09-14 at 21:42 -1000, Eric Firing wrote:
 Since you you are running ubuntu, I suggest 
 you use the installation method recently described in this thread:
 
 http://www.mail-archive.com/matplotlib-users@lists.sourceforge.net/msg18464.html
 
 Be careful to read down through the thread; the first try at 
 comprehensive instructions has an error.



--
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] problem building matplotlib

2010-09-15 Thread Eric Firing
On 09/15/2010 03:50 AM, Benjamin Root wrote:
 On Wed, Sep 15, 2010 at 5:34 AM, Dan Kortschak
 dan.kortsc...@adelaide.edu.au mailto:dan.kortsc...@adelaide.edu.au
 wrote:

 I've just has a look at that and unfortunately it does not fix the
 problem

 Is there any other suggestion that might be worth a try?

 I should point out that I already have numpy 1.4.1 installed and scipy
 0.8.0 as dependencies for other packages.

 thanks
 Dan


 Hmm, that shouldn't be an issue.  Maybe you need to completely clean out
 the matplotlib build (by removing the build directory) and try again?
 Be sure to save the build output so we can see what happens if/when it
 fails.

Looking again at the original build output, and at setup.py and 
setupext.py, it appears that there is a bug in the latter.  If the wrong 
version of wx is found, it should be disabling the attempt to build 
wxagg, and reporting wxPython: no.

We need to fix the bug, but the workaround for now is to use a setup.cfg 
file with

wxagg = False

Eric



 Ben Root



 --
 Start uncovering the many advantages of virtual appliances
 and start using them to simplify application deployment and
 accelerate your shift to cloud computing.
 http://p.sf.net/sfu/novell-sfdev2dev



 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users


--
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] problem building matplotlib

2010-09-15 Thread Dan Kortschak
That fixes the problem.

thanks

On Wed, 2010-09-15 at 07:30 -1000, Eric Firing wrote:

 Looking again at the original build output, and at setup.py and 
 setupext.py, it appears that there is a bug in the latter.  If the wrong 
 version of wx is found, it should be disabling the attempt to build 
 wxagg, and reporting wxPython: no.
 
 We need to fix the bug, but the workaround for now is to use a setup.cfg 
 file with
 
 wxagg = False
 
 Eric



--
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] problem building matplotlib

2010-09-15 Thread Eric Firing
On 09/15/2010 01:17 PM, Dan Kortschak wrote:
 That fixes the problem.

 thanks

 On Wed, 2010-09-15 at 07:30 -1000, Eric Firing wrote:

 Looking again at the original build output, and at setup.py and
 setupext.py, it appears that there is a bug in the latter.  If the wrong
 version of wx is found, it should be disabling the attempt to build
 wxagg, and reporting wxPython: no.

 We need to fix the bug, but the workaround for now is to use a setup.cfg
 file with

 wxagg = False

 Eric

It turns out that the _wxagg extension was specific to version 2.6, and 
for a long time we have required version 2.8, so there was no point in 
trying to build the extension.  In svn 8702 I removed the extension 
along with related 2.6-only code, and the setup.py references to 
building the extension.

Eric

--
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Problem building matplotlib

2006-10-28 Thread José Matos
On 28/10/06, Eric Firing [EMAIL PROTECTED] 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


-- 
José Abílio

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Problem building matplotlib

2006-10-27 Thread Victor Danilchenko
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.


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Problem building matplotlib

2006-10-27 Thread Eric Firing
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

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users