Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 481684 - dev-python/matplotlib-1.3.0 fails to build [The C/C++ header for freetype2 (ft2build.h) could not be found]
Summary: dev-python/matplotlib-1.3.0 fails to build [The C/C++ header for freetype2 (f...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-19 20:21 UTC by Steven Trogdon
Modified: 2013-09-22 01:51 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build log (build.log,13.95 KB, text/plain)
2013-08-19 20:21 UTC, Steven Trogdon
Details
matplotlib-1.3.0.patch (file_481684.txt,654 bytes, patch)
2013-09-21 14:36 UTC, Benda Xu
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Steven Trogdon 2013-08-19 20:21:28 UTC
Created attachment 356438 [details]
build log

The subject ebuild fails to build in prefix (I have ~amd64-linux and ~x86-linux here).

REQUIRED DEPENDENCIES AND EXTENSIONS
                 numpy: yes [version 1.7.0]
              dateutil: yes [using dateutil version 2.1]
               tornado: yes [tornado was not found. It is required for the
                        WebAgg backend. pip/easy_install may attempt to
                        install it after matplotlib.]
             pyparsing: yes [using pyparsing version 2.0.1]
                 pycxx: yes [pkg-config information for 'PyCXX' could not be
                        found. Using local copy.]
                libagg: yes [pkg-config information for 'libagg' could not
                        be found. Using local copy.]
              freetype: no  [The C/C++ header for freetype2 (ft2build.h)
                        could not be found.  You may need to install the
                        development package.]
                   png: yes [version 1.6.3]

media-libs/freetype-2.4.12 is installed in prefix but the headers do not exist on the host OS(s). I suspect the prefix include directory is not being searched for the ft2build.h header since it exists.
Comment 1 Steven Trogdon 2013-08-19 21:32:47 UTC
The following changes to the 1.3.0 ebuild do allow the freetype2 headers to be located in prefix and matplotlib does appear to build correctly:

@@ -7,7 +7,7 @@
 PYTHON_COMPAT=( python{2_6,2_7,3_2,3_3} )
 PYTHON_REQ_USE='tk?'
 
-inherit distutils-r1 eutils flag-o-matic
+inherit distutils-r1 eutils flag-o-matic prefix
 
 DESCRIPTION="Pure python plotting library with matlab like syntax"
 HOMEPAGE="http://matplotlib.org/"
@@ -115,6 +115,8 @@
 
        # common switches.
        cat > "${BUILD_DIR}"/setup.cfg <<-EOF
+               [directories]
+               basedirlist = @GENTOO_PORTAGE_EPREFIX@/usr, /usr
                [provide_packages]
                pytz = False
                dateutil = False
@@ -142,6 +144,8 @@
                        $(use_setup wxwidgets wx)
                EOF
        fi
+
+       eprefixify "${BUILD_DIR}"/setup.cfg
 }
 
 wrap_setup() {

but perhaps something else can be done without using the prefix eclass. Also the /usr may not be needed in basedirlist.
Comment 2 Fabian Groffen gentoo-dev 2013-08-20 07:14:46 UTC
If you create the file from the ebuild, you as well can just use ${EPREFIX}, so you don't need to inherit prefix and call eprefixify afterwards.  We typically use that on stuff that's on file already.

Thanks!
Comment 3 Benda Xu gentoo-dev 2013-09-21 14:36:59 UTC
Created attachment 359176 [details, diff]
matplotlib-1.3.0.patch

Taking suggestion from Fabian. Python herd, would you please review the patch for prefix? It is straightforward: I'll commit it if there is no objection within one week.
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-09-21 14:39:34 UTC
(In reply to Benda Xu from comment #3)
> Created attachment 359176 [details, diff] [details, diff]
> matplotlib-1.3.0.patch
> 
> Taking suggestion from Fabian. Python herd, would you please review the
> patch for prefix? It is straightforward: I'll commit it if there is no
> objection within one week.

If it helps ya, go for it.
Comment 5 Benda Xu gentoo-dev 2013-09-22 01:51:32 UTC
Thanks, in tree.

  22 Sep 2013; Benda Xu <heroxbd@gentoo.org> matplotlib-1.3.0.ebuild:
  set basedir into Prefix for headers and libraries, bug 481684. Credits to
  Steven.