From nobody@FreeBSD.org  Fri Mar 15 14:39:15 2013
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115])
	by hub.freebsd.org (Postfix) with ESMTP id 4F812D53
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 15 Mar 2013 14:39:15 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 3F50464D
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 15 Mar 2013 14:39:15 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.5/8.14.5) with ESMTP id r2FEdEbU099892
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 15 Mar 2013 14:39:14 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.5/8.14.5/Submit) id r2FEdEtE099891;
	Fri, 15 Mar 2013 14:39:14 GMT
	(envelope-from nobody)
Message-Id: <201303151439.r2FEdEtE099891@red.freebsd.org>
Date: Fri, 15 Mar 2013 14:39:14 GMT
From: Vladimir Chukharev <Vladimir.Chukharev@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: math/py-matplotlib/work does not see installed numpy
X-Send-Pr-Version: www-3.1
X-GNATS-Notify: mainland@apeiron.net

>Number:         176993
>Category:       ports
>Synopsis:       math/py-matplotlib/work does not see installed numpy
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-python
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Mar 15 14:40:00 UTC 2013
>Closed-Date:    Fri Mar 22 17:24:23 UTC 2013
>Last-Modified:  Fri Mar 22 17:24:23 UTC 2013
>Originator:     Vladimir Chukharev
>Release:        8.3-STABLE
>Organization:
>Environment:
FreeBSD vovavaio 8.3-STABLE FreeBSD 8.3-STABLE #62 r247016: Wed Feb 20 11:35:37 EET 2013     root@vovavaio:/usr/obj/usr/src/sys/VOVA  i386
>Description:
I try and fail to update py-matplotlib .

The ports system correctly detects that a numpy port is installed by looking at the file numeric.py, then during port build a configure program complains that there is no numpy. See attached logs of the update.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

 $ sudo DISABLE_VULNERABILITIES=y nice portmaster  -H  -D -G --no-confirm py27-matplotlib
===>>> Currently installed version: py27-matplotlib-1.2.0
===>>> Port directory: /usr/ports/math/py-matplotlib

===>>> Launching 'make checksum' for math/py-matplotlib in background
===>>> Gathering dependency list for math/py-matplotlib from ports
===>>> Initial dependency check complete for math/py-matplotlib


===>>> Starting build for math/py-matplotlib <<<===

===>>> All dependencies are up to date

===>  Cleaning for py27-matplotlib-1.2.0_1
===>>> Logging build to /tmp/port_log-20903-py-matplotlib.TgfFYEd3

===>>> make failed for math/py-matplotlib
===>>> Aborting update


===>>> Build/Install logs available:
	/tmp/port_log-20903-py-matplotlib.TgfFYEd3

Terminated

===>>> You can restart from the point of failure with this command line:
       portmaster <flags> math/py-matplotlib 

 $ sudo cat /tmp/port_log-20903-py-matplotlib.TgfFYEd3
===>  Found saved configuration for py27-matplotlib-1.2.0_1
===>  Extracting for py27-matplotlib-1.2.0_1
=> SHA256 Checksum OK for matplotlib-1.2.0.tar.gz.
/bin/chmod -R ga+r /usr/ports/math/py-matplotlib/work
===>  Patching for py27-matplotlib-1.2.0_1
===>  Applying FreeBSD patches for py27-matplotlib-1.2.0_1
/usr/bin/sed -i.bak -e 's|/usr/local|/usr/local|g'  -e 's|%%TCL_INCLUDEDIR%%|/usr/local/include/tcl8.5|g'  -e 's|%%TK_INCLUDEDIR%%|/usr/local/include/tk8.5|g'  -e 's|%%TCL_LIBDIR%%|/usr/local/lib/tcl8.5|g'  -e 's|%%TK_LIBDIR%%|/usr/local/lib/tk8.5|g'  -e 's|%%TCL_VER%%|85|g'  -e 's|%%TK_VER%%|85|g'  /usr/ports/math/py-matplotlib/work/matplotlib-1.2.0/setupext.py
/usr/bin/sed -i.bak -e 's|%%GTK_BACKEND%%|True|g'  -e 's|%%GTKAGG_BACKEND%%|True|g'  -e 's|%%TKAGG_BACKEND%%|True|g'  -e 's|%%WXAGG_BACKEND%%|False|g'  /usr/ports/math/py-matplotlib/work/matplotlib-1.2.0/setup.cfg
===>   py27-matplotlib-1.2.0_1 depends on file: /usr/local/lib/python2.7/site-packages/numpy/core/numeric.py - found
===>   py27-matplotlib-1.2.0_1 depends on package: py27-dateutil>=1.4 - found
===>   py27-matplotlib-1.2.0_1 depends on package: py27-pytz>=0 - found
===>   py27-matplotlib-1.2.0_1 depends on package: py27-tkinter>0 - found
===>   py27-matplotlib-1.2.0_1 depends on file: /usr/local/bin/python2.7 - found
===>   py27-matplotlib-1.2.0_1 depends on executable: pkgconf - found
===>   py27-matplotlib-1.2.0_1 depends on file: /usr/local/bin/intltool-extract - found
===>   py27-matplotlib-1.2.0_1 depends on executable: pygobject-codegen-2.0 - found
===>   py27-matplotlib-1.2.0_1 depends on file: /usr/local/libdata/pkgconfig/pygtk-2.0.pc - found
===>   py27-matplotlib-1.2.0_1 depends on shared library: freetype - found
===>   py27-matplotlib-1.2.0_1 depends on shared library: png15 - found
===>   py27-matplotlib-1.2.0_1 depends on shared library: glib-2.0 - found
===>   py27-matplotlib-1.2.0_1 depends on shared library: pcre - found
===>   py27-matplotlib-1.2.0_1 depends on shared library: atk-1.0.0 - found
===>   py27-matplotlib-1.2.0_1 depends on shared library: gtk-x11-2.0.0 - found
===>   py27-matplotlib-1.2.0_1 depends on shared library: glade-2.0.0 - found
===>   py27-matplotlib-1.2.0_1 depends on shared library: xml2.5 - found
===>   py27-matplotlib-1.2.0_1 depends on shared library: pango-1.0.0 - found
===>  Configuring for py27-matplotlib-1.2.0_1
basedirlist is: ['/usr/local', '/usr']
============================================================================
BUILDING MATPLOTLIB
            matplotlib: 1.2.0
                python: 2.7.3 (default, Mar 14 2013, 11:27:23)  [GCC 4.2.1
                        20070831 patched [FreeBSD]]
              platform: freebsd8

REQUIRED DEPENDENCIES
                 numpy: no
                        * You must install numpy 1.4 or later to build
                        * matplotlib.
*** Error code 1

Stop in /usr/ports/math/py-matplotlib.

 $ pkg_info -W /usr/local/lib/python2.7/site-packages/numpy/core/numeric.py
/usr/local/lib/python2.7/site-packages/numpy/core/numeric.py was installed by package py27-numpy-1.6.2_1,1


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->freebsd-python 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Fri Mar 15 14:40:08 UTC 2013 
Responsible-Changed-Why:  
freebsd-python@ wants this port PRs (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=176993 
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Fri Mar 15 14:40:10 UTC 2013 
State-Changed-Why:  
Awaiting maintainers feedback (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=176993 

From: Edwin Groothuis <edwin@FreeBSD.org>
To: mainland@apeiron.net
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/176993: math/py-matplotlib/work does not see installed numpy
Date: Fri, 15 Mar 2013 14:40:09 UT

 Maintainer of math/py-matplotlib,
 
 Please note that PR ports/176993 has just been submitted.
 
 If it contains a patch for an upgrade, an enhancement or a bug fix
 you agree on, reply to this email stating that you approve the patch
 and a committer will take care of it.
 
 The full text of the PR can be found at:
     http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/176993
 
 -- 
 Edwin Groothuis via the GNATS Auto Assign Tool
 edwin@FreeBSD.org

From: Geoffrey Mainland <mainland@apeiron.net>
To: bug-followup@freebsd.org
Cc:  
Subject: Re: ports/176993: math/py-matplotlib/work does not see installed numpy
Date: Sat, 16 Mar 2013 13:06:33 +0000

 On Fri, Mar 15, 2013 at 2:40 PM, Edwin Groothuis <edwin@freebsd.org> wrote:
 > Maintainer of math/py-matplotlib,
 >
 > Please note that PR ports/176993 has just been submitted.
 >
 > If it contains a patch for an upgrade, an enhancement or a bug fix
 > you agree on, reply to this email stating that you approve the patch
 > and a committer will take care of it.
 >
 > The full text of the PR can be found at:
 >     http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/176993
 >
 > --
 > Edwin Groothuis via the GNATS Auto Assign Tool
 > edwin@FreeBSD.org
 
 I don't see a patch attached.

From: Geoffrey Mainland <mainland@apeiron.net>
To: bug-followup@FreeBSD.org, Vladimir.Chukharev@gmail.com
Cc:  
Subject: Re: ports/176993: math/py-matplotlib/work does not see installed
 numpy
Date: Sat, 16 Mar 2013 13:19:10 +0000

 Hi Vladimir,
 
 If you start the python interpreter and type "import numpy", what
 happens?
 
 I have seen many broken numpy installations. The matplotlib will "see"
 that numpy is installed, but when the configuration runs, numpy can't be
 imported so configuration fails.
 
 Geoff
 

From: "Vladimir Chukharev" <chukharev@mail.ru>
To: bug-followup@freebsd.org, Vladimir.Chukharev@gmail.com, "Geoffrey
 Mainland" <mainland@apeiron.net>
Cc:  
Subject: Re: ports/176993: math/py-matplotlib/work does not see installed
 numpy
Date: Sat, 16 Mar 2013 16:04:43 +0200

 On Sat, 16 Mar 2013 15:19:10 +0200, Geoffrey Mainland <mainland@apeiron.net> wrote:
 
 > Hi Vladimir,
 >
 > If you start the python interpreter and type "import numpy", what
 > happens?
 
 Yeah, that is it. The last line is
 ImportError: /usr/local/lib/libalapack.so.2: Undefined symbol "cblas_zswap"
 
   $ pkg_info -W /usr/local/lib/libalapack.so.2
 /usr/local/lib/libalapack.so.2 was installed by package atlas-3.8.4_2,1
 
 So, I will reinstall atlas with the default options now (that's not fast
 IIRC...), then matplotlib again, and let you know the results.
 
 BTW, can the message be more clear in your port?
 
 > I have seen many broken numpy installations. The matplotlib will "see"
 > that numpy is installed, but when the configuration runs, numpy can't be
 > imported so configuration fails.
 >
 > Geoff
 >
 >
 >
 
 
 -- 
 Vladimir Chukharev

From: Geoffrey Mainland <mainland@gmail.com>
To: Vladimir Chukharev <chukharev@mail.ru>
Cc: bug-followup@freebsd.org, Vladimir.Chukharev@gmail.com, 
 Geoffrey Mainland <mainland@apeiron.net>
Subject: Re: ports/176993: math/py-matplotlib/work does not see installed
 numpy
Date: Sat, 16 Mar 2013 16:21:35 +0000

 On 03/16/2013 02:04 PM, Vladimir Chukharev wrote:
 > On Sat, 16 Mar 2013 15:19:10 +0200, Geoffrey Mainland <mainland@apeiron.net> wrote:
 >
 >> Hi Vladimir,
 >>
 >> If you start the python interpreter and type "import numpy", what
 >> happens?
 >
 > Yeah, that is it. The last line is
 > ImportError: /usr/local/lib/libalapack.so.2: Undefined symbol
 "cblas_zswap"
 >
 > $ pkg_info -W /usr/local/lib/libalapack.so.2
 > /usr/local/lib/libalapack.so.2 was installed by package atlas-3.8.4_2,1
 >
 > So, I will reinstall atlas with the default options now (that's not fast
 > IIRC...), then matplotlib again, and let you know the results.
 
 Hope that works for you.
 
 > BTW, can the message be more clear in your port?
 
 The message you saw is generated by matplotlib's configuration
 script. You would do best to contact the matplotlib developers if you
 think it should be changed as it is something that would need to be
 modified upstream. I do not think a FreeBSD-only patch is justified.
 
 >> I have seen many broken numpy installations. The matplotlib will "see"
 >> that numpy is installed, but when the configuration runs, numpy can't be
 >> imported so configuration fails.
 >>
 >> Geoff
 

From: "Vladimir Chukharev" <chukharev@mail.ru>
To: "Geoffrey Mainland" <mainland@gmail.com>
Cc: bug-followup@freebsd.org, Vladimir.Chukharev@gmail.com, "Geoffrey
 Mainland" <mainland@apeiron.net>
Subject: Re: ports/176993: math/py-matplotlib/work does not see installed
 numpy
Date: Sat, 16 Mar 2013 20:01:09 +0200

 On Sat, 16 Mar 2013 18:21:35 +0200, Geoffrey Mainland <mainland@gmail.com> wrote:
 
 > On 03/16/2013 02:04 PM, Vladimir Chukharev wrote:
 >> So, I will reinstall atlas with the default options now (that's not fast
 >> IIRC...), then matplotlib again, and let you know the results.
 >
 > Hope that works for you.
 
 It does not, unfortunately.
 
 I think, this PS can be closed, since the problem is numpy, atlas, or
 their dependents.
 
 >> BTW, can the message be more clear in your port?
 >
 > The message you saw is generated by matplotlib's configuration
 > script. You would do best to contact the matplotlib developers if you
 > think it should be changed as it is something that would need to be
 > modified upstream. I do not think a FreeBSD-only patch is justified.
 
 Well... For me it's not anymore a problem, I will remember the actual
 reason. Just more similar PRs might come up.
 
 >>> I have seen many broken numpy installations. The matplotlib will "see"
 >>> that numpy is installed, but when the configuration runs, numpy can't be
 >>> imported so configuration fails.
 >>>
 >>> Geoff
 >
 >
 >
 -- 
 Vladimir Chukharev

From: "Vladimir Chukharev" <chukharev@mail.ru>
To: bug-followup@freebsd.org, Vladimir.Chukharev@gmail.com
Cc:  
Subject: Re: ports/176993: math/py-matplotlib/work does not see installed
 numpy
Date: Fri, 22 Mar 2013 09:38:30 +0200

 This PR can be closed.
 
 For the record. The problem was in math/atlas, which was installed
 when I used an optional dependence on it in some port (probably
 math/py-numpy). Later, I removed that option and deinstalled atlas,
 but many ports have some automatically set optional dependence on
 atlas if that is installed, therefore deleting math/atlas is not
 a trivial task... It might get installed again and again, and this
 is a POLA violation IMO.
 
 I recorded the list of all ports depending on atlas, then used
 pkg_delete -f atlas-\* , and then reinstalled all ports in the list
 removing the corresponding options file in /var/ports/ , this way
 atlas is cleaned away from my computer...
 
 -- 
 Vladimir Chukharev
State-Changed-From-To: feedback->closed 
State-Changed-By: linimon 
State-Changed-When: Fri Mar 22 17:24:11 UTC 2013 
State-Changed-Why:  
Closed at submitter's request. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=176993 
>Unformatted:
