spack: py-matplotlib build fails on Fedora

On my Fedora 27 system, spack install py-matplotlib from a clean Spack clone fails. Spack installs all the Matplotlib dependencies, but then py-matplotlib itself fails during its build phase.

It looks like Matplotlib is failing to find FreeType, even though this package was installed.

Expected Result

py-matplotlib is installed.

Actual Result

Build log:

==> Executing phase: 'build'
==> '/home/francois/spack/opt/spack/linux-fedora27-x86_64/gcc-7.3.1/python-2.7.14-belgizkwgkpujlt5kj2ukdfemba65kpf/bin/python2.7' '-s' 'setup.py' '--no-user-cfg' 'build'
============================================================================
Edit setup.cfg to change the build options

BUILDING MATPLOTLIB
            matplotlib: yes [2.2.2]
                python: yes [2.7.14 (default, Apr 20 2018, 18:36:46)  [GCC
                        7.3.1 20180303 (Red Hat 7.3.1-5)]]
              platform: yes [linux2]

REQUIRED DEPENDENCIES AND EXTENSIONS
                 numpy: yes [version 1.13.3]
      install_requires: yes [handled by setuptools]
                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.34]
                 qhull: yes [pkg-config information for 'libqhull' could not
                        be found. Using local copy.]

OPTIONAL SUBPACKAGES
           sample_data: yes [installing]
              toolkits: yes [installing]
                 tests: no  [skipping due to configuration]
        toolkits_tests: no  [skipping due to configuration]

OPTIONAL BACKEND EXTENSIONS
                macosx: no  [Mac OS-X only]
                qt5agg: no  [PySide2 not found; PyQt5 not found]
                qt4agg: no  [PySide not found; PyQt4 not found]
               gtk3agg: no  [Requires pygobject to be installed.]
             gtk3cairo: no  [Requires cairocffi or pycairo to be installed.]
                gtkagg: no  [Requires pygtk]
                 tkagg: yes [installing; run-time loading from Python Tcl /
                        Tk]
                 wxagg: no  [requires wxPython]
                   gtk: no  [Requires pygtk]
                   agg: yes [installing]
                 cairo: no  [cairocffi or pycairo not found]
             windowing: no  [Microsoft Windows only]

OPTIONAL LATEX DEPENDENCIES
                dvipng: yes [version 1.15]
           ghostscript: yes [version 9.22]
                 latex: yes [version 3.14159265]
               pdftops: yes [version 0.57.0]

OPTIONAL PACKAGE DATA
                  dlls: no  [skipping due to configuration]

============================================================================
                        * The following required packages can not be built:
                        * freetype
                        * Try installing freetype with `dnf install
                        * freetype-devel` and pkg-config with `dnf install
                        * pkg-config`

Steps to reproduce the issue

$ git clone https://github.com/llnl/spack.git
$ spack/bin/spack install py-matplotlib

This is using today’s develop, i.e. c8e3c94c6

Information on your system

  1. $ spack arch reports linux-fedora27-x86_64
  2. packages.yaml sets the default compiler to gcc, BLAS/LAPACK to openblas, OpenSSL to system
  3. The system’s package manager provides freetype-devel.

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 26 (21 by maintainers)

Commits related to this issue

Most upvoted comments

Hi @s-sajid-ali, I’d say that https://github.com/spack/spack/pull/8136 is no longer WIP but it is pending a review before merging.

One more thing I wanted to ask regarding matplotlib was regarding the qhull dependency. For some reason matplotlib tries to build qhull even though qhull is already installed.

@s-sajid-ali thanks for the error message. This may be a separate problem. I’ll have a chance to look at it by Friday (6/15)

My packages.yaml has the following (snipping out comments and sections that should be (?) irrelevant):

packages:
  all:
    compiler: [gcc]
    providers:
      blas: [openblas]
      lapack: [openblas]
      mpi: [mpich]
  openssl:
    # snip
  hdf5:
    # snip

The PKG_CONFIG_PATH as listed the matplotlib staging directory’s spack-build.env file has value:

/home/francois/spack/opt/spack/linux-fedora27-x86_64/gcc-7.3.1/libxcb-1.13-iqekgfrzkx62mzsgn4cxw5u7emhcw2ls/lib/pkgconfig:/home/francois/spack/opt/spack/linux-fedora27-x86_64/gcc-7.3.1/libpthread-stubs-0.4-xqcgs6542x43dyfeb23yh72nifpdccg5/lib/pkgconfig:/home/francois/spack/opt/spack/linux-fedora27-x86_64/gcc-7.3.1/python-2.7.14-belgizkwgkpujlt5kj2ukdfemba65kpf/lib/pkgconfig:/home/francois/spack/opt/spack/linux-fedora27-x86_64/gcc-7.3.1/tcl-8.6.8-tzm3mv33jghcscgodkfvp66ump44zvjv/lib/pkgconfig:/home/francois/spack/opt/spack/linux-fedora27-x86_64/gcc-7.3.1/pkgconf-1.4.0-y7htlzbrinrly6rckw7facn5unpgt2va/lib/pkgconfig:/home/francois/spack/opt/spack/linux-fedora27-x86_64/gcc-7.3.1/tk-8.6.8-ejbnysmaubvfx5kdft6apllg3v2eecuc/lib/pkgconfig:/home/francois/spack/opt/spack/linux-fedora27-x86_64/gcc-7.3.1/libxau-1.0.8-kcpuyfbymgkpanr3xwi3wiokifjdguwf/lib/pkgconfig:/home/francois/spack/opt/spack/linux-fedora27-x86_64/gcc-7.3.1/libxdmcp-1.1.2-jd3zri4v4ua77ygvq5xnqyspurvictyl/lib/pkgconfig:/home/francois/spack/opt/spack/linux-fedora27-x86_64/gcc-7.3.1/zlib-1.2.11-y5oiya3aolzfqr475pqosgwe4eeqpqta/lib/pkgconfig:/home/francois/spack/opt/spack/linux-fedora27-x86_64/gcc-7.3.1/freetype-2.7.1-7fvthrfrhhzlfiotzb2yuimarnuku63b/lib/pkgconfig:/home/francois/spack/opt/spack/linux-fedora27-x86_64/gcc-7.3.1/xproto-7.0.31-gcmvkycjlukxits2u5i2sjyca7td5sc6/lib/pkgconfig:/home/francois/spack/opt/spack/linux-fedora27-x86_64/gcc-7.3.1/xextproto-7.3.0-b5xvu77tm3zc5ha53u5b2ucztgvnoaoy/lib/pkgconfig:/home/francois/spack/opt/spack/linux-fedora27-x86_64/gcc-7.3.1/sqlite-3.22.0-su5rw6jtml2wef2pw72daixr5f7gbrcn/lib/pkgconfig:/home/francois/spack/opt/spack/linux-fedora27-x86_64/gcc-7.3.1/libx11-1.6.5-zhz54tmxc7bbg74jjjd4bbvekvraqzjg/lib/pkgconfig:/home/francois/spack/opt/spack/linux-fedora27-x86_64/gcc-7.3.1/ncurses-6.0-2n7s6ueyh6ftthpyizeum654ezasc65l/lib/pkgconfig:/home/francois/spack/opt/spack/linux-fedora27-x86_64/gcc-7.3.1/kbproto-1.0.7-2yqsfo2aqkdqpzcbnpqomoxykt33q2bq/lib/pkgconfig:/home/francois/spack/opt/spack/linux-fedora27-x86_64/gcc-7.3.1/libpng-1.6.34-pg2y2p2rweggf5gkdkqlnf5lwqlavlql/lib/pkgconfig

Reorganizing this string to remove the shared prefix and make the contents more apparent:

libxcb-1.13-iqekgfrzkx62mzsgn4cxw5u7emhcw2ls/lib/pkgconfig
libpthread-stubs-0.4-xqcgs6542x43dyfeb23yh72nifpdccg5/lib/pkgconfig
python-2.7.14-belgizkwgkpujlt5kj2ukdfemba65kpf/lib/pkgconfig
tcl-8.6.8-tzm3mv33jghcscgodkfvp66ump44zvjv/lib/pkgconfig
pkgconf-1.4.0-y7htlzbrinrly6rckw7facn5unpgt2va/lib/pkgconfig
tk-8.6.8-ejbnysmaubvfx5kdft6apllg3v2eecuc/lib/pkgconfig
libxau-1.0.8-kcpuyfbymgkpanr3xwi3wiokifjdguwf/lib/pkgconfig
libxdmcp-1.1.2-jd3zri4v4ua77ygvq5xnqyspurvictyl/lib/pkgconfig
zlib-1.2.11-y5oiya3aolzfqr475pqosgwe4eeqpqta/lib/pkgconfig
freetype-2.7.1-7fvthrfrhhzlfiotzb2yuimarnuku63b/lib/pkgconfig
xproto-7.0.31-gcmvkycjlukxits2u5i2sjyca7td5sc6/lib/pkgconfig
xextproto-7.3.0-b5xvu77tm3zc5ha53u5b2ucztgvnoaoy/lib/pkgconfig
sqlite-3.22.0-su5rw6jtml2wef2pw72daixr5f7gbrcn/lib/pkgconfig
libx11-1.6.5-zhz54tmxc7bbg74jjjd4bbvekvraqzjg/lib/pkgconfig
ncurses-6.0-2n7s6ueyh6ftthpyizeum654ezasc65l/lib/pkgconfig
kbproto-1.0.7-2yqsfo2aqkdqpzcbnpqomoxykt33q2bq/lib/pkgconfig
libpng-1.6.34-pg2y2p2rweggf5gkdkqlnf5lwqlavlql/lib/pkgconfig