pypa / setuptools

Official project repository for the Setuptools build system
https://pypi.org/project/setuptools/
MIT License
2.45k stars 1.18k forks source link

[BUG] Maplotlib fails to install from source #3650

Open nithinivi opened 1 year ago

nithinivi commented 1 year ago

setuptools version

65.5.0

Python version

python 3.10.6

OS

Ubuntu 9.4.0-1ubuntu1~20.04.1

Additional environment information

conda 4.12.0 gcc version 9.4.0

Description

Attempt to build an editable install of project Matplotlib encounters an internal compiler error referencing PEP 660.

While using the suggested workaround with environment variable SETUPTOOLS_ENABLE_FEATURES="legacy-editable" subprocess-exited-with-error is encountered.

References to similar issues:

https://github.com/pypa/setuptools/issues/3644 SQLAlchemy editable install failure references setuptools PEP 660 https://github.com/pypa/setuptools/issues/3606 [Question] Editable install fails after introducing pyproject.toml https://github.com/pypa/setuptools/issues/3607 [BUG] If you are seeing this error, please report to https://github.com/pypa/setuptools/discussions/3597 Struggling with fairseq installation

Expected behavior

The expectation is no error and a successfully built editable install.

How to Reproduce

git clone https://github.com/matplotlib/matplotlib.git cd matplotlib conda env create -f environment.yml conda activate mpl-dev python -m pip install -ve .

Output

>> python -m pip install -ve .

Using pip 22.3 from /home/nithin/.local/lib/python3.9/site-packages/pip (python 3.9)
Obtaining file:///home/nithin/learn/matplotlib
  Running command pip subprocess to install build dependencies
  Collecting certifi>=2020.06.20
    Using cached certifi-2022.9.24-py3-none-any.whl (161 kB)
  Collecting numpy>=1.19
    Using cached numpy-1.23.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.1 MB)
  Collecting setuptools_scm>=7
    Using cached setuptools_scm-7.0.5-py3-none-any.whl (42 kB)
  Collecting setuptools
    Using cached setuptools-65.5.0-py3-none-any.whl (1.2 MB)
  Collecting tomli>=1.0.0
    Using cached tomli-2.0.1-py3-none-any.whl (12 kB)
  Collecting packaging>=20.0
    Using cached packaging-21.3-py3-none-any.whl (40 kB)
  Collecting typing-extensions
    Using cached typing_extensions-4.4.0-py3-none-any.whl (26 kB)
  Collecting pyparsing!=3.0.5,>=2.0.2
    Using cached pyparsing-3.0.9-py3-none-any.whl (98 kB)
  Installing collected packages: typing-extensions, tomli, setuptools, pyparsing, numpy, certifi, packaging, setuptools_scm
  ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
  prov 2.0.0 requires lxml>=3.3.5, which is not installed.
  paddleocr 2.5.0.3 requires lxml, which is not installed.
  nipype 1.8.4 requires simplejson>=3.8.0, which is not installed.
  nbconvert 6.5.0 requires beautifulsoup4, which is not installed.
  nbconvert 6.5.0 requires entrypoints>=0.2.2, which is not installed.
  ipython 8.4.0 requires pexpect>4.3; sys_platform != "win32", which is not installed.
  fitz 0.0.1.dev2 requires httplib2, which is not installed.
  easyocr 1.5.0 requires PyYAML, which is not installed.
  dephell 0.8.3 requires attrs>=19.2.0, which is not installed.
  dephell-pythons 0.1.15 requires attrs, which is not installed.
  dephell-markers 1.0.3 requires attrs, which is not installed.
  dephell 0.8.3 requires pip<=19.3.1,>=18.0, but you have pip 22.3 which is incompatible.
  requests 2.27.1 requires charset-normalizer~=2.0.0; python_version >= "3", but you have charset-normalizer 2.1.0 which is incompatible.
  Successfully installed certifi-2022.9.24 numpy-1.23.4 packaging-21.3 pyparsing-3.0.9 setuptools-65.5.0 setuptools_scm-7.0.5 tomli-2.0.1 typing-extensions-4.4.0
  Installing build dependencies ... done
  Running command Checking if build backend supports build_editable
  Checking if build backend supports build_editable ... done
  Running command Getting requirements to build editable
  /tmp/pip-build-env-8yrgjhpf/overlay/lib/python3.9/site-packages/setuptools/dist.py:286: SetuptoolsDeprecationWarning: The namespace_packages parameter is deprecated, consider using implicit namespaces instead (PEP 420).
    warnings.warn(msg, SetuptoolsDeprecationWarning)

  Edit mplsetup.cfg to change the build options; suppress output with --quiet.

  BUILDING MATPLOTLIB
        python: yes [3.9.12 (main, Apr  5 2022, 06:56:58)  [GCC 7.5.0]]
      platform: yes [linux]
         tests: no  [skipping due to configuration]
        macosx: no  [Mac OS-X only]

  running egg_info
  writing lib/matplotlib.egg-info/PKG-INFO
  writing dependency_links to lib/matplotlib.egg-info/dependency_links.txt
  writing namespace_packages to lib/matplotlib.egg-info/namespace_packages.txt
  writing requirements to lib/matplotlib.egg-info/requires.txt
  writing top-level names to lib/matplotlib.egg-info/top_level.txt
  adding license file 'LICENSE/LICENSE'
  adding license file 'LICENSE/LICENSE_AMSFONTS'
  adding license file 'LICENSE/LICENSE_BAKOMA'
  adding license file 'LICENSE/LICENSE_CARLOGO'
  adding license file 'LICENSE/LICENSE_COLORBREWER'
  adding license file 'LICENSE/LICENSE_COURIERTEN'
  adding license file 'LICENSE/LICENSE_JSXTOOLS_RESIZE_OBSERVER'
  adding license file 'LICENSE/LICENSE_QHULL'
  adding license file 'LICENSE/LICENSE_QT4_EDITOR'
  adding license file 'LICENSE/LICENSE_SOLARIZED'
  adding license file 'LICENSE/LICENSE_STIX'
  adding license file 'LICENSE/LICENSE_YORICK'
  writing manifest file 'lib/matplotlib.egg-info/SOURCES.txt'
  Getting requirements to build editable ... done
  Running command pip subprocess to install backend dependencies
  Collecting wheel
    Using cached wheel-0.37.1-py2.py3-none-any.whl (35 kB)
  Installing collected packages: wheel
  Successfully installed wheel-0.37.1
  Installing backend dependencies ... done
  Running command Preparing editable metadata (pyproject.toml)
  /tmp/pip-build-env-8yrgjhpf/overlay/lib/python3.9/site-packages/setuptools/dist.py:286: SetuptoolsDeprecationWarning: The namespace_packages parameter is deprecated, consider using implicit namespaces instead (PEP 420).
    warnings.warn(msg, SetuptoolsDeprecationWarning)

  Edit mplsetup.cfg to change the build options; suppress output with --quiet.

  BUILDING MATPLOTLIB
        python: yes [3.9.12 (main, Apr  5 2022, 06:56:58)  [GCC 7.5.0]]
      platform: yes [linux]
         tests: no  [skipping due to configuration]
        macosx: no  [Mac OS-X only]

  running dist_info
  creating /tmp/pip-modern-metadata-vtrggydw/matplotlib.egg-info
  writing /tmp/pip-modern-metadata-vtrggydw/matplotlib.egg-info/PKG-INFO
  writing dependency_links to /tmp/pip-modern-metadata-vtrggydw/matplotlib.egg-info/dependency_links.txt
  writing namespace_packages to /tmp/pip-modern-metadata-vtrggydw/matplotlib.egg-info/namespace_packages.txt
  writing requirements to /tmp/pip-modern-metadata-vtrggydw/matplotlib.egg-info/requires.txt
  writing top-level names to /tmp/pip-modern-metadata-vtrggydw/matplotlib.egg-info/top_level.txt
  writing manifest file '/tmp/pip-modern-metadata-vtrggydw/matplotlib.egg-info/SOURCES.txt'
  adding license file 'LICENSE/LICENSE'
  adding license file 'LICENSE/LICENSE_AMSFONTS'
  adding license file 'LICENSE/LICENSE_BAKOMA'
  adding license file 'LICENSE/LICENSE_CARLOGO'
  adding license file 'LICENSE/LICENSE_COLORBREWER'
  adding license file 'LICENSE/LICENSE_COURIERTEN'
  adding license file 'LICENSE/LICENSE_JSXTOOLS_RESIZE_OBSERVER'
  adding license file 'LICENSE/LICENSE_QHULL'
  adding license file 'LICENSE/LICENSE_QT4_EDITOR'
  adding license file 'LICENSE/LICENSE_SOLARIZED'
  adding license file 'LICENSE/LICENSE_STIX'
  adding license file 'LICENSE/LICENSE_YORICK'
  writing manifest file '/tmp/pip-modern-metadata-vtrggydw/matplotlib.egg-info/SOURCES.txt'
  creating '/tmp/pip-modern-metadata-vtrggydw/matplotlib-0.1.0.dev44733+gf15aeee.dist-info'
  adding license file "LICENSE/LICENSE_YORICK" (matched pattern "LICENSE/*")
  adding license file "LICENSE/LICENSE_AMSFONTS" (matched pattern "LICENSE/*")
  adding license file "LICENSE/LICENSE_JSXTOOLS_RESIZE_OBSERVER" (matched pattern "LICENSE/*")
  adding license file "LICENSE/LICENSE_BAKOMA" (matched pattern "LICENSE/*")
  adding license file "LICENSE/LICENSE_QT4_EDITOR" (matched pattern "LICENSE/*")
  adding license file "LICENSE/LICENSE_CARLOGO" (matched pattern "LICENSE/*")
  adding license file "LICENSE/LICENSE_STIX" (matched pattern "LICENSE/*")
  adding license file "LICENSE/LICENSE_QHULL" (matched pattern "LICENSE/*")
  adding license file "LICENSE/LICENSE" (matched pattern "LICENSE/*")
  adding license file "LICENSE/LICENSE_COURIERTEN" (matched pattern "LICENSE/*")
  adding license file "LICENSE/LICENSE_COLORBREWER" (matched pattern "LICENSE/*")
  adding license file "LICENSE/LICENSE_SOLARIZED" (matched pattern "LICENSE/*")
  Preparing editable metadata (pyproject.toml) ... done
Requirement already satisfied: cycler>=0.10 in /home/nithin/.local/lib/python3.9/site-packages (from matplotlib==0.1.0.dev44733+gf15aeee) (0.11.0)
Requirement already satisfied: numpy>=1.19 in /home/nithin/.local/lib/python3.9/site-packages (from matplotlib==0.1.0.dev44733+gf15aeee) (1.23.1)
Requirement already satisfied: fonttools>=4.22.0 in /home/nithin/.local/lib/python3.9/site-packages (from matplotlib==0.1.0.dev44733+gf15aeee) (4.34.4)
Requirement already satisfied: pillow>=6.2.0 in /home/nithin/.local/lib/python3.9/site-packages (from matplotlib==0.1.0.dev44733+gf15aeee) (9.2.0)
Collecting pyparsing>=2.3.1
  Using cached pyparsing-3.0.9-py3-none-any.whl (98 kB)
Requirement already satisfied: python-dateutil>=2.7 in /home/nithin/.local/lib/python3.9/site-packages (from matplotlib==0.1.0.dev44733+gf15aeee) (2.8.2)
Collecting packaging>=20.0
  Using cached packaging-21.3-py3-none-any.whl (40 kB)
Collecting setuptools-scm>=7
  Using cached setuptools_scm-7.0.5-py3-none-any.whl (42 kB)
Requirement already satisfied: kiwisolver>=1.0.1 in /home/nithin/.local/lib/python3.9/site-packages (from matplotlib==0.1.0.dev44733+gf15aeee) (1.4.4)
Collecting contourpy>=1.0.1
  Using cached contourpy-1.0.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (296 kB)
Requirement already satisfied: six>=1.5 in /home/nithin/.local/lib/python3.9/site-packages (from python-dateutil>=2.7->matplotlib==0.1.0.dev44733+gf15aeee) (1.15.0)
Collecting tomli>=1.0.0
  Using cached tomli-2.0.1-py3-none-any.whl (12 kB)
Requirement already satisfied: setuptools in /home/nithin/miniconda3/lib/python3.9/site-packages (from setuptools-scm>=7->matplotlib==0.1.0.dev44733+gf15aeee) (61.2.0)
Requirement already satisfied: typing-extensions in /home/nithin/.local/lib/python3.9/site-packages (from setuptools-scm>=7->matplotlib==0.1.0.dev44733+gf15aeee) (4.3.0)
Building wheels for collected packages: matplotlib
  Running command Building editable for matplotlib (pyproject.toml)
  /tmp/pip-build-env-8yrgjhpf/overlay/lib/python3.9/site-packages/setuptools/dist.py:286: SetuptoolsDeprecationWarning: The namespace_packages parameter is deprecated, consider using implicit namespaces instead (PEP 420).
    warnings.warn(msg, SetuptoolsDeprecationWarning)

  Edit mplsetup.cfg to change the build options; suppress output with --quiet.

  BUILDING MATPLOTLIB
        python: yes [3.9.12 (main, Apr  5 2022, 06:56:58)  [GCC 7.5.0]]
      platform: yes [linux]
         tests: no  [skipping due to configuration]
        macosx: no  [Mac OS-X only]

  running editable_wheel
  creating /tmp/pip-wheel-3_ne_sk5/tmp8wdw1cf4/matplotlib.egg-info
  writing /tmp/pip-wheel-3_ne_sk5/tmp8wdw1cf4/matplotlib.egg-info/PKG-INFO
  writing dependency_links to /tmp/pip-wheel-3_ne_sk5/tmp8wdw1cf4/matplotlib.egg-info/dependency_links.txt
  writing namespace_packages to /tmp/pip-wheel-3_ne_sk5/tmp8wdw1cf4/matplotlib.egg-info/namespace_packages.txt
  writing requirements to /tmp/pip-wheel-3_ne_sk5/tmp8wdw1cf4/matplotlib.egg-info/requires.txt
  writing top-level names to /tmp/pip-wheel-3_ne_sk5/tmp8wdw1cf4/matplotlib.egg-info/top_level.txt
  writing manifest file '/tmp/pip-wheel-3_ne_sk5/tmp8wdw1cf4/matplotlib.egg-info/SOURCES.txt'
  adding license file 'LICENSE/LICENSE'
  adding license file 'LICENSE/LICENSE_AMSFONTS'
  adding license file 'LICENSE/LICENSE_BAKOMA'
  adding license file 'LICENSE/LICENSE_CARLOGO'
  adding license file 'LICENSE/LICENSE_COLORBREWER'
  adding license file 'LICENSE/LICENSE_COURIERTEN'
  adding license file 'LICENSE/LICENSE_JSXTOOLS_RESIZE_OBSERVER'
  adding license file 'LICENSE/LICENSE_QHULL'
  adding license file 'LICENSE/LICENSE_QT4_EDITOR'
  adding license file 'LICENSE/LICENSE_SOLARIZED'
  adding license file 'LICENSE/LICENSE_STIX'
  adding license file 'LICENSE/LICENSE_YORICK'
  writing manifest file '/tmp/pip-wheel-3_ne_sk5/tmp8wdw1cf4/matplotlib.egg-info/SOURCES.txt'
  creating '/tmp/pip-wheel-3_ne_sk5/tmp8wdw1cf4/matplotlib-0.1.0.dev44733+gf15aeee.dist-info'
  adding license file "LICENSE/LICENSE_YORICK" (matched pattern "LICENSE/*")
  adding license file "LICENSE/LICENSE_AMSFONTS" (matched pattern "LICENSE/*")
  adding license file "LICENSE/LICENSE_JSXTOOLS_RESIZE_OBSERVER" (matched pattern "LICENSE/*")
  adding license file "LICENSE/LICENSE_BAKOMA" (matched pattern "LICENSE/*")
  adding license file "LICENSE/LICENSE_QT4_EDITOR" (matched pattern "LICENSE/*")
  adding license file "LICENSE/LICENSE_CARLOGO" (matched pattern "LICENSE/*")
  adding license file "LICENSE/LICENSE_STIX" (matched pattern "LICENSE/*")
  adding license file "LICENSE/LICENSE_QHULL" (matched pattern "LICENSE/*")
  adding license file "LICENSE/LICENSE" (matched pattern "LICENSE/*")
  adding license file "LICENSE/LICENSE_COURIERTEN" (matched pattern "LICENSE/*")
  adding license file "LICENSE/LICENSE_COLORBREWER" (matched pattern "LICENSE/*")
  adding license file "LICENSE/LICENSE_SOLARIZED" (matched pattern "LICENSE/*")
  creating /tmp/pip-wheel-3_ne_sk5/tmp8wdw1cf4/matplotlib-0.1.0.dev44733+gf15aeee.dist-info/WHEEL
  Installing /tmp/tmpzpg3k47gmatplotlib-0.1.0.dev44733+gf15aeee-0.editable-cp39-cp39-linux_x86_64.whl/matplotlib-0.1.0-nspkg.pth
  running build_py
  running build_ext
  gcc -pthread -B /home/nithin/miniconda3/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/nithin/miniconda3/include -I/home/nithin/miniconda3/include -fPIC -O2 -isystem /home/nithin/miniconda3/include -fPIC -I/home/nithin/miniconda3/include/python3.9 -c /tmp/tmpfm8zikst.cpp -o tmp/tmpfm8zikst.o -fvisibility=hidden
  gcc -pthread -B /home/nithin/miniconda3/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/nithin/miniconda3/include -I/home/nithin/miniconda3/include -fPIC -O2 -isystem /home/nithin/miniconda3/include -fPIC -I/home/nithin/miniconda3/include/python3.9 -c /tmp/tmpbztwvt_m.cpp -o tmp/tmpbztwvt_m.o -fvisibility-inlines-hidden
  gcc -pthread -B /home/nithin/miniconda3/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/nithin/miniconda3/include -I/home/nithin/miniconda3/include -fPIC -O2 -isystem /home/nithin/miniconda3/include -fPIC -I/home/nithin/miniconda3/include/python3.9 -c /tmp/tmp73m6daf2.cpp -o tmp/tmp73m6daf2.o -flto
  building 'matplotlib.backends._backend_agg' extension
  creating /tmp/tmp18afasvn.build-temp/matplotlib.backends._backend_agg
  creating /tmp/tmp18afasvn.build-temp/matplotlib.backends._backend_agg/extern
  creating /tmp/tmp18afasvn.build-temp/matplotlib.backends._backend_agg/extern/agg24-svn
  creating /tmp/tmp18afasvn.build-temp/matplotlib.backends._backend_agg/extern/agg24-svn/src
  creating /tmp/tmp18afasvn.build-temp/matplotlib.backends._backend_agg/src
  gcc -pthread -B /home/nithin/miniconda3/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/nithin/miniconda3/include -I/home/nithin/miniconda3/include -fPIC -O2 -isystem /home/nithin/miniconda3/include -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_matplotlib_backends__backend_agg_ARRAY_API -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -D__STDC_FORMAT_MACROS=1 -DFREETYPE_BUILD_TYPE=local -Ibuild/freetype-2.6.1/include -Iextern/agg24-svn/include -I/tmp/pip-build-env-8yrgjhpf/overlay/lib/python3.9/site-packages/numpy/core/include -I/home/nithin/miniconda3/include/python3.9 -c extern/agg24-svn/src/agg_bezier_arc.cpp -o /tmp/tmp18afasvn.build-temp/matplotlib.backends._backend_agg/extern/agg24-svn/src/agg_bezier_arc.o -fvisibility=hidden -flto
  gcc -pthread -B /home/nithin/miniconda3/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/nithin/miniconda3/include -I/home/nithin/miniconda3/include -fPIC -O2 -isystem /home/nithin/miniconda3/include -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_matplotlib_backends__backend_agg_ARRAY_API -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -D__STDC_FORMAT_MACROS=1 -DFREETYPE_BUILD_TYPE=local -Ibuild/freetype-2.6.1/include -Iextern/agg24-svn/include -I/tmp/pip-build-env-8yrgjhpf/overlay/lib/python3.9/site-packages/numpy/core/include -I/home/nithin/miniconda3/include/python3.9 -c extern/agg24-svn/src/agg_curves.cpp -o /tmp/tmp18afasvn.build-temp/matplotlib.backends._backend_agg/extern/agg24-svn/src/agg_curves.o -fvisibility=hidden -flto
  gcc -pthread -B /home/nithin/miniconda3/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/nithin/miniconda3/include -I/home/nithin/miniconda3/include -fPIC -O2 -isystem /home/nithin/miniconda3/include -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_matplotlib_backends__backend_agg_ARRAY_API -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -D__STDC_FORMAT_MACROS=1 -DFREETYPE_BUILD_TYPE=local -Ibuild/freetype-2.6.1/include -Iextern/agg24-svn/include -I/tmp/pip-build-env-8yrgjhpf/overlay/lib/python3.9/site-packages/numpy/core/include -I/home/nithin/miniconda3/include/python3.9 -c extern/agg24-svn/src/agg_image_filters.cpp -o /tmp/tmp18afasvn.build-temp/matplotlib.backends._backend_agg/extern/agg24-svn/src/agg_image_filters.o -fvisibility=hidden -flto
  gcc -pthread -B /home/nithin/miniconda3/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/nithin/miniconda3/include -I/home/nithin/miniconda3/include -fPIC -O2 -isystem /home/nithin/miniconda3/include -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_matplotlib_backends__backend_agg_ARRAY_API -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -D__STDC_FORMAT_MACROS=1 -DFREETYPE_BUILD_TYPE=local -Ibuild/freetype-2.6.1/include -Iextern/agg24-svn/include -I/tmp/pip-build-env-8yrgjhpf/overlay/lib/python3.9/site-packages/numpy/core/include -I/home/nithin/miniconda3/include/python3.9 -c extern/agg24-svn/src/agg_trans_affine.cpp -o /tmp/tmp18afasvn.build-temp/matplotlib.backends._backend_agg/extern/agg24-svn/src/agg_trans_affine.o -fvisibility=hidden -flto
  gcc -pthread -B /home/nithin/miniconda3/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/nithin/miniconda3/include -I/home/nithin/miniconda3/include -fPIC -O2 -isystem /home/nithin/miniconda3/include -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_matplotlib_backends__backend_agg_ARRAY_API -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -D__STDC_FORMAT_MACROS=1 -DFREETYPE_BUILD_TYPE=local -Ibuild/freetype-2.6.1/include -Iextern/agg24-svn/include -I/tmp/pip-build-env-8yrgjhpf/overlay/lib/python3.9/site-packages/numpy/core/include -I/home/nithin/miniconda3/include/python3.9 -c extern/agg24-svn/src/agg_vcgen_contour.cpp -o /tmp/tmp18afasvn.build-temp/matplotlib.backends._backend_agg/extern/agg24-svn/src/agg_vcgen_contour.o -fvisibility=hidden -flto
  gcc -pthread -B /home/nithin/miniconda3/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/nithin/miniconda3/include -I/home/nithin/miniconda3/include -fPIC -O2 -isystem /home/nithin/miniconda3/include -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_matplotlib_backends__backend_agg_ARRAY_API -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -D__STDC_FORMAT_MACROS=1 -DFREETYPE_BUILD_TYPE=local -Ibuild/freetype-2.6.1/include -Iextern/agg24-svn/include -I/tmp/pip-build-env-8yrgjhpf/overlay/lib/python3.9/site-packages/numpy/core/include -I/home/nithin/miniconda3/include/python3.9 -c extern/agg24-svn/src/agg_vcgen_dash.cpp -o /tmp/tmp18afasvn.build-temp/matplotlib.backends._backend_agg/extern/agg24-svn/src/agg_vcgen_dash.o -fvisibility=hidden -flto
  gcc -pthread -B /home/nithin/miniconda3/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/nithin/miniconda3/include -I/home/nithin/miniconda3/include -fPIC -O2 -isystem /home/nithin/miniconda3/include -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_matplotlib_backends__backend_agg_ARRAY_API -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -D__STDC_FORMAT_MACROS=1 -DFREETYPE_BUILD_TYPE=local -Ibuild/freetype-2.6.1/include -Iextern/agg24-svn/include -I/tmp/pip-build-env-8yrgjhpf/overlay/lib/python3.9/site-packages/numpy/core/include -I/home/nithin/miniconda3/include/python3.9 -c extern/agg24-svn/src/agg_vcgen_stroke.cpp -o /tmp/tmp18afasvn.build-temp/matplotlib.backends._backend_agg/extern/agg24-svn/src/agg_vcgen_stroke.o -fvisibility=hidden -flto
  gcc -pthread -B /home/nithin/miniconda3/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/nithin/miniconda3/include -I/home/nithin/miniconda3/include -fPIC -O2 -isystem /home/nithin/miniconda3/include -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_matplotlib_backends__backend_agg_ARRAY_API -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -D__STDC_FORMAT_MACROS=1 -DFREETYPE_BUILD_TYPE=local -Ibuild/freetype-2.6.1/include -Iextern/agg24-svn/include -I/tmp/pip-build-env-8yrgjhpf/overlay/lib/python3.9/site-packages/numpy/core/include -I/home/nithin/miniconda3/include/python3.9 -c extern/agg24-svn/src/agg_vpgen_segmentator.cpp -o /tmp/tmp18afasvn.build-temp/matplotlib.backends._backend_agg/extern/agg24-svn/src/agg_vpgen_segmentator.o -fvisibility=hidden -flto
  gcc -pthread -B /home/nithin/miniconda3/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/nithin/miniconda3/include -I/home/nithin/miniconda3/include -fPIC -O2 -isystem /home/nithin/miniconda3/include -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_matplotlib_backends__backend_agg_ARRAY_API -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -D__STDC_FORMAT_MACROS=1 -DFREETYPE_BUILD_TYPE=local -Ibuild/freetype-2.6.1/include -Iextern/agg24-svn/include -I/tmp/pip-build-env-8yrgjhpf/overlay/lib/python3.9/site-packages/numpy/core/include -I/home/nithin/miniconda3/include/python3.9 -c src/_backend_agg.cpp -o /tmp/tmp18afasvn.build-temp/matplotlib.backends._backend_agg/src/_backend_agg.o -fvisibility=hidden -flto
  gcc -pthread -B /home/nithin/miniconda3/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/nithin/miniconda3/include -I/home/nithin/miniconda3/include -fPIC -O2 -isystem /home/nithin/miniconda3/include -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_matplotlib_backends__backend_agg_ARRAY_API -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -D__STDC_FORMAT_MACROS=1 -DFREETYPE_BUILD_TYPE=local -Ibuild/freetype-2.6.1/include -Iextern/agg24-svn/include -I/tmp/pip-build-env-8yrgjhpf/overlay/lib/python3.9/site-packages/numpy/core/include -I/home/nithin/miniconda3/include/python3.9 -c src/_backend_agg_wrapper.cpp -o /tmp/tmp18afasvn.build-temp/matplotlib.backends._backend_agg/src/_backend_agg_wrapper.o -fvisibility=hidden -flto
  gcc -pthread -B /home/nithin/miniconda3/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/nithin/miniconda3/include -I/home/nithin/miniconda3/include -fPIC -O2 -isystem /home/nithin/miniconda3/include -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_matplotlib_backends__backend_agg_ARRAY_API -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -D__STDC_FORMAT_MACROS=1 -DFREETYPE_BUILD_TYPE=local -Ibuild/freetype-2.6.1/include -Iextern/agg24-svn/include -I/tmp/pip-build-env-8yrgjhpf/overlay/lib/python3.9/site-packages/numpy/core/include -I/home/nithin/miniconda3/include/python3.9 -c src/checkdep_freetype2.c -o /tmp/tmp18afasvn.build-temp/matplotlib.backends._backend_agg/src/checkdep_freetype2.o -fvisibility=hidden -flto
  src/checkdep_freetype2.c:14:9: note: ‘#pragma message: Compiling with FreeType version 2.6.1.’
     14 | #pragma message("Compiling with FreeType version " \
        |         ^~~~~~~
  gcc -pthread -B /home/nithin/miniconda3/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/nithin/miniconda3/include -I/home/nithin/miniconda3/include -fPIC -O2 -isystem /home/nithin/miniconda3/include -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_matplotlib_backends__backend_agg_ARRAY_API -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -D__STDC_FORMAT_MACROS=1 -DFREETYPE_BUILD_TYPE=local -Ibuild/freetype-2.6.1/include -Iextern/agg24-svn/include -I/tmp/pip-build-env-8yrgjhpf/overlay/lib/python3.9/site-packages/numpy/core/include -I/home/nithin/miniconda3/include/python3.9 -c src/py_converters.cpp -o /tmp/tmp18afasvn.build-temp/matplotlib.backends._backend_agg/src/py_converters.o -fvisibility=hidden -flto
  creating /tmp/tmpxho_aj2f.build-lib/matplotlib
  creating /tmp/tmpxho_aj2f.build-lib/matplotlib/backends
  g++ -pthread -B /home/nithin/miniconda3/compiler_compat -shared -Wl,-rpath,/home/nithin/miniconda3/lib -Wl,-rpath-link,/home/nithin/miniconda3/lib -L/home/nithin/miniconda3/lib -L/home/nithin/miniconda3/lib -Wl,-rpath,/home/nithin/miniconda3/lib -Wl,-rpath-link,/home/nithin/miniconda3/lib -L/home/nithin/miniconda3/lib /tmp/tmp18afasvn.build-temp/matplotlib.backends._backend_agg/extern/agg24-svn/src/agg_bezier_arc.o /tmp/tmp18afasvn.build-temp/matplotlib.backends._backend_agg/extern/agg24-svn/src/agg_curves.o /tmp/tmp18afasvn.build-temp/matplotlib.backends._backend_agg/extern/agg24-svn/src/agg_image_filters.o /tmp/tmp18afasvn.build-temp/matplotlib.backends._backend_agg/extern/agg24-svn/src/agg_trans_affine.o /tmp/tmp18afasvn.build-temp/matplotlib.backends._backend_agg/extern/agg24-svn/src/agg_vcgen_contour.o /tmp/tmp18afasvn.build-temp/matplotlib.backends._backend_agg/extern/agg24-svn/src/agg_vcgen_dash.o /tmp/tmp18afasvn.build-temp/matplotlib.backends._backend_agg/extern/agg24-svn/src/agg_vcgen_stroke.o /tmp/tmp18afasvn.build-temp/matplotlib.backends._backend_agg/extern/agg24-svn/src/agg_vpgen_segmentator.o /tmp/tmp18afasvn.build-temp/matplotlib.backends._backend_agg/src/_backend_agg.o /tmp/tmp18afasvn.build-temp/matplotlib.backends._backend_agg/src/_backend_agg_wrapper.o /tmp/tmp18afasvn.build-temp/matplotlib.backends._backend_agg/src/checkdep_freetype2.o /tmp/tmp18afasvn.build-temp/matplotlib.backends._backend_agg/src/py_converters.o build/freetype-2.6.1/objs/.libs/libfreetype.a -o /tmp/tmpxho_aj2f.build-lib/matplotlib/backends/_backend_agg.cpython-39-x86_64-linux-gnu.so
  lto1: internal compiler error: compressed stream: data error
  0x7fcd427bf082 __libc_start_main
        ../csu/libc-start.c:308
  Please submit a full bug report,
  with preprocessed source if appropriate.
  Please include the complete backtrace with any bug report.
  See <file:///usr/share/doc/gcc-9/README.Bugs> for instructions.
  lto-wrapper: fatal error: /usr/bin/g++ returned 1 exit status
  compilation terminated.
  /home/nithin/miniconda3/compiler_compat/ld: error: lto-wrapper failed
  collect2: error: ld returned 1 exit status
  Traceback (most recent call last):
    File "/tmp/pip-build-env-8yrgjhpf/overlay/lib/python3.9/site-packages/setuptools/_distutils/unixccompiler.py", line 267, in link
      self.spawn(linker + ld_args)
    File "/tmp/pip-build-env-8yrgjhpf/overlay/lib/python3.9/site-packages/setuptools/_distutils/ccompiler.py", line 1007, in spawn
      spawn(cmd, dry_run=self.dry_run, **kwargs)
    File "/tmp/pip-build-env-8yrgjhpf/overlay/lib/python3.9/site-packages/setuptools/_distutils/spawn.py", line 70, in spawn
      raise DistutilsExecError(
  distutils.errors.DistutilsExecError: command '/usr/bin/g++' failed with exit code 1

  During handling of the above exception, another exception occurred:

  Traceback (most recent call last):
    File "/tmp/pip-build-env-8yrgjhpf/overlay/lib/python3.9/site-packages/setuptools/command/editable_wheel.py", line 140, in run
      self._create_wheel_file(bdist_wheel)
    File "/tmp/pip-build-env-8yrgjhpf/overlay/lib/python3.9/site-packages/setuptools/command/editable_wheel.py", line 330, in _create_wheel_file
      files, mapping = self._run_build_commands(dist_name, unpacked, lib, tmp)
    File "/tmp/pip-build-env-8yrgjhpf/overlay/lib/python3.9/site-packages/setuptools/command/editable_wheel.py", line 261, in _run_build_commands
      self._run_build_subcommands()
    File "/tmp/pip-build-env-8yrgjhpf/overlay/lib/python3.9/site-packages/setuptools/command/editable_wheel.py", line 288, in _run_build_subcommands
      self.run_command(name)
    File "/tmp/pip-build-env-8yrgjhpf/overlay/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 319, in run_command
      self.distribution.run_command(command)
    File "/tmp/pip-build-env-8yrgjhpf/overlay/lib/python3.9/site-packages/setuptools/dist.py", line 1217, in run_command
      super().run_command(command)
    File "/tmp/pip-build-env-8yrgjhpf/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
      cmd_obj.run()
    File "/tmp/pip-build-env-8yrgjhpf/overlay/lib/python3.9/site-packages/setuptools/command/build_ext.py", line 84, in run
      _build_ext.run(self)
    File "/tmp/pip-build-env-8yrgjhpf/overlay/lib/python3.9/site-packages/setuptools/_distutils/command/build_ext.py", line 346, in run
      self.build_extensions()
    File "<string>", line 184, in build_extensions
    File "/tmp/pip-build-env-8yrgjhpf/overlay/lib/python3.9/site-packages/setuptools/_distutils/command/build_ext.py", line 466, in build_extensions
      self._build_extensions_serial()
    File "/tmp/pip-build-env-8yrgjhpf/overlay/lib/python3.9/site-packages/setuptools/_distutils/command/build_ext.py", line 492, in _build_extensions_serial
      self.build_extension(ext)
    File "<string>", line 196, in build_extension
    File "/tmp/pip-build-env-8yrgjhpf/overlay/lib/python3.9/site-packages/setuptools/command/build_ext.py", line 246, in build_extension
      _build_ext.build_extension(self, ext)
    File "/tmp/pip-build-env-8yrgjhpf/overlay/lib/python3.9/site-packages/setuptools/_distutils/command/build_ext.py", line 571, in build_extension
      self.compiler.link_shared_object(
    File "/tmp/pip-build-env-8yrgjhpf/overlay/lib/python3.9/site-packages/setuptools/_distutils/ccompiler.py", line 751, in link_shared_object
      self.link(
    File "/tmp/pip-build-env-8yrgjhpf/overlay/lib/python3.9/site-packages/setuptools/_distutils/unixccompiler.py", line 269, in link
      raise LinkError(msg)
  distutils.errors.LinkError: command '/usr/bin/g++' failed with exit code 1
  error: Support for editable installs via PEP 660 was recently introduced
  in `setuptools`. If you are seeing this error, please report to:

  https://github.com/pypa/setuptools/issues

  Meanwhile you can try the legacy behavior by setting an
  environment variable and trying to install again:

  SETUPTOOLS_ENABLE_FEATURES="legacy-editable"
  error: subprocess-exited-with-error

  × Building editable for matplotlib (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> See above for output.

  note: This error originates from a subprocess, and is likely not a problem with pip.
  full command: /home/nithin/miniconda3/bin/python /home/nithin/.local/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py build_editable /tmp/tmpxp4jf_01
  cwd: /home/nithin/learn/matplotlib
  Building editable for matplotlib (pyproject.toml) ... error
  ERROR: Failed building editable for matplotlib
Failed to build matplotlib
ERROR: Could not build wheels for matplotlib, which is required to install pyproject.toml-based projects

when using the suggested workaround with environment variable SETUPTOOLS_ENABLE_FEATURES="legacy-editable".

❯ export SETUPTOOLS_ENABLE_FEATURES="legacy-editable"

❯ python -m pip install -ve .

Using pip 22.3 from /home/nithin/.local/lib/python3.9/site-packages/pip (python 3.9)
Obtaining file:///home/nithin/learn/matplotlib
  Running command pip subprocess to install build dependencies
  Collecting certifi>=2020.06.20
    Using cached certifi-2022.9.24-py3-none-any.whl (161 kB)
  Collecting numpy>=1.19
    Using cached numpy-1.23.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.1 MB)
  Collecting setuptools_scm>=7
    Using cached setuptools_scm-7.0.5-py3-none-any.whl (42 kB)
  Collecting setuptools
    Using cached setuptools-65.5.0-py3-none-any.whl (1.2 MB)
  Collecting typing-extensions
    Using cached typing_extensions-4.4.0-py3-none-any.whl (26 kB)
  Collecting packaging>=20.0
    Using cached packaging-21.3-py3-none-any.whl (40 kB)
  Collecting tomli>=1.0.0
    Using cached tomli-2.0.1-py3-none-any.whl (12 kB)
  Collecting pyparsing!=3.0.5,>=2.0.2
    Using cached pyparsing-3.0.9-py3-none-any.whl (98 kB)
  Installing collected packages: typing-extensions, tomli, setuptools, pyparsing, numpy, certifi, packaging, setuptools_scm
  ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
  prov 2.0.0 requires lxml>=3.3.5, which is not installed.
  paddleocr 2.5.0.3 requires lxml, which is not installed.
  nipype 1.8.4 requires simplejson>=3.8.0, which is not installed.
  nbconvert 6.5.0 requires beautifulsoup4, which is not installed.
  nbconvert 6.5.0 requires entrypoints>=0.2.2, which is not installed.
  ipython 8.4.0 requires pexpect>4.3; sys_platform != "win32", which is not installed.
  fitz 0.0.1.dev2 requires httplib2, which is not installed.
  easyocr 1.5.0 requires PyYAML, which is not installed.
  dephell 0.8.3 requires attrs>=19.2.0, which is not installed.
  dephell-pythons 0.1.15 requires attrs, which is not installed.
  dephell-markers 1.0.3 requires attrs, which is not installed.
  dephell 0.8.3 requires pip<=19.3.1,>=18.0, but you have pip 22.3 which is incompatible.
  requests 2.27.1 requires charset-normalizer~=2.0.0; python_version >= "3", but you have charset-normalizer 2.1.0 which is incompatible.
  Successfully installed certifi-2022.9.24 numpy-1.23.4 packaging-21.3 pyparsing-3.0.9 setuptools-65.5.0 setuptools_scm-7.0.5 tomli-2.0.1 typing-extensions-4.4.0
  Installing build dependencies ... done
  Running command Checking if build backend supports build_editable
^A  Checking if build backend supports build_editable ... done
  Running command Getting requirements to build wheel
  /tmp/pip-build-env-1om_apel/overlay/lib/python3.9/site-packages/setuptools/dist.py:286: SetuptoolsDeprecationWarning: The namespace_packages parameter is deprecated, consider using implicit namespaces instead (PEP 420).
    warnings.warn(msg, SetuptoolsDeprecationWarning)

  Edit mplsetup.cfg to change the build options; suppress output with --quiet.

  BUILDING MATPLOTLIB
        python: yes [3.9.12 (main, Apr  5 2022, 06:56:58)  [GCC 7.5.0]]
      platform: yes [linux]
         tests: no  [skipping due to configuration]
        macosx: no  [Mac OS-X only]

  running egg_info
  writing lib/matplotlib.egg-info/PKG-INFO
  writing dependency_links to lib/matplotlib.egg-info/dependency_links.txt
  writing namespace_packages to lib/matplotlib.egg-info/namespace_packages.txt
  writing requirements to lib/matplotlib.egg-info/requires.txt
  writing top-level names to lib/matplotlib.egg-info/top_level.txt
  adding license file 'LICENSE/LICENSE'
  adding license file 'LICENSE/LICENSE_AMSFONTS'
  adding license file 'LICENSE/LICENSE_BAKOMA'
  adding license file 'LICENSE/LICENSE_CARLOGO'
  adding license file 'LICENSE/LICENSE_COLORBREWER'
  adding license file 'LICENSE/LICENSE_COURIERTEN'
  adding license file 'LICENSE/LICENSE_JSXTOOLS_RESIZE_OBSERVER'
  adding license file 'LICENSE/LICENSE_QHULL'
  adding license file 'LICENSE/LICENSE_QT4_EDITOR'
  adding license file 'LICENSE/LICENSE_SOLARIZED'
  adding license file 'LICENSE/LICENSE_STIX'
  adding license file 'LICENSE/LICENSE_YORICK'
  writing manifest file 'lib/matplotlib.egg-info/SOURCES.txt'
  Getting requirements to build wheel ... done
  Running command pip subprocess to install backend dependencies
  Collecting wheel
    Using cached wheel-0.37.1-py2.py3-none-any.whl (35 kB)
  Installing collected packages: wheel
  Successfully installed wheel-0.37.1
  Installing backend dependencies ... done
  Running command Preparing metadata (pyproject.toml)
  /tmp/pip-build-env-1om_apel/overlay/lib/python3.9/site-packages/setuptools/dist.py:286: SetuptoolsDeprecationWarning: The namespace_packages parameter is deprecated, consider using implicit namespaces instead (PEP 420).
    warnings.warn(msg, SetuptoolsDeprecationWarning)

  Edit mplsetup.cfg to change the build options; suppress output with --quiet.

  BUILDING MATPLOTLIB
        python: yes [3.9.12 (main, Apr  5 2022, 06:56:58)  [GCC 7.5.0]]
      platform: yes [linux]
         tests: no  [skipping due to configuration]
        macosx: no  [Mac OS-X only]

  running dist_info
  creating /tmp/pip-modern-metadata-ah3e6zjq/matplotlib.egg-info
  writing /tmp/pip-modern-metadata-ah3e6zjq/matplotlib.egg-info/PKG-INFO
  writing dependency_links to /tmp/pip-modern-metadata-ah3e6zjq/matplotlib.egg-info/dependency_links.txt
  writing namespace_packages to /tmp/pip-modern-metadata-ah3e6zjq/matplotlib.egg-info/namespace_packages.txt
  writing requirements to /tmp/pip-modern-metadata-ah3e6zjq/matplotlib.egg-info/requires.txt
  writing top-level names to /tmp/pip-modern-metadata-ah3e6zjq/matplotlib.egg-info/top_level.txt
  writing manifest file '/tmp/pip-modern-metadata-ah3e6zjq/matplotlib.egg-info/SOURCES.txt'
  adding license file 'LICENSE/LICENSE'
  adding license file 'LICENSE/LICENSE_AMSFONTS'
  adding license file 'LICENSE/LICENSE_BAKOMA'
  adding license file 'LICENSE/LICENSE_CARLOGO'
  adding license file 'LICENSE/LICENSE_COLORBREWER'
  adding license file 'LICENSE/LICENSE_COURIERTEN'
  adding license file 'LICENSE/LICENSE_JSXTOOLS_RESIZE_OBSERVER'
  adding license file 'LICENSE/LICENSE_QHULL'
  adding license file 'LICENSE/LICENSE_QT4_EDITOR'
  adding license file 'LICENSE/LICENSE_SOLARIZED'
  adding license file 'LICENSE/LICENSE_STIX'
  adding license file 'LICENSE/LICENSE_YORICK'
  writing manifest file '/tmp/pip-modern-metadata-ah3e6zjq/matplotlib.egg-info/SOURCES.txt'
  creating '/tmp/pip-modern-metadata-ah3e6zjq/matplotlib-0.1.0.dev44733+gf15aeee.dist-info'
  adding license file "LICENSE/LICENSE_YORICK" (matched pattern "LICENSE/*")
  adding license file "LICENSE/LICENSE_AMSFONTS" (matched pattern "LICENSE/*")
  adding license file "LICENSE/LICENSE_JSXTOOLS_RESIZE_OBSERVER" (matched pattern "LICENSE/*")
  adding license file "LICENSE/LICENSE_BAKOMA" (matched pattern "LICENSE/*")
  adding license file "LICENSE/LICENSE_QT4_EDITOR" (matched pattern "LICENSE/*")
  adding license file "LICENSE/LICENSE_CARLOGO" (matched pattern "LICENSE/*")
  adding license file "LICENSE/LICENSE_STIX" (matched pattern "LICENSE/*")
  adding license file "LICENSE/LICENSE_QHULL" (matched pattern "LICENSE/*")
  adding license file "LICENSE/LICENSE" (matched pattern "LICENSE/*")
  adding license file "LICENSE/LICENSE_COURIERTEN" (matched pattern "LICENSE/*")
  adding license file "LICENSE/LICENSE_COLORBREWER" (matched pattern "LICENSE/*")
  adding license file "LICENSE/LICENSE_SOLARIZED" (matched pattern "LICENSE/*")
  Preparing metadata (pyproject.toml) ... done
Collecting setuptools-scm>=7
  Using cached setuptools_scm-7.0.5-py3-none-any.whl (42 kB)
Requirement already satisfied: pillow>=6.2.0 in /home/nithin/.local/lib/python3.9/site-packages (from matplotlib==0.1.0.dev44733+gf15aeee) (9.2.0)
Requirement already satisfied: cycler>=0.10 in /home/nithin/.local/lib/python3.9/site-packages (from matplotlib==0.1.0.dev44733+gf15aeee) (0.11.0)
Collecting packaging>=20.0
  Using cached packaging-21.3-py3-none-any.whl (40 kB)
Requirement already satisfied: fonttools>=4.22.0 in /home/nithin/.local/lib/python3.9/site-packages (from matplotlib==0.1.0.dev44733+gf15aeee) (4.34.4)
Collecting contourpy>=1.0.1
  Using cached contourpy-1.0.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (296 kB)
Requirement already satisfied: python-dateutil>=2.7 in /home/nithin/.local/lib/python3.9/site-packages (from matplotlib==0.1.0.dev44733+gf15aeee) (2.8.2)
Requirement already satisfied: kiwisolver>=1.0.1 in /home/nithin/.local/lib/python3.9/site-packages (from matplotlib==0.1.0.dev44733+gf15aeee) (1.4.4)
Requirement already satisfied: numpy>=1.19 in /home/nithin/.local/lib/python3.9/site-packages (from matplotlib==0.1.0.dev44733+gf15aeee) (1.23.1)
Collecting pyparsing>=2.3.1
  Using cached pyparsing-3.0.9-py3-none-any.whl (98 kB)
Requirement already satisfied: six>=1.5 in /home/nithin/.local/lib/python3.9/site-packages (from python-dateutil>=2.7->matplotlib==0.1.0.dev44733+gf15aeee) (1.15.0)
Requirement already satisfied: typing-extensions in /home/nithin/.local/lib/python3.9/site-packages (from setuptools-scm>=7->matplotlib==0.1.0.dev44733+gf15aeee) (4.3.0)
Collecting tomli>=1.0.0
  Using cached tomli-2.0.1-py3-none-any.whl (12 kB)
Requirement already satisfied: setuptools in /home/nithin/miniconda3/lib/python3.9/site-packages (from setuptools-scm>=7->matplotlib==0.1.0.dev44733+gf15aeee) (61.2.0)
Installing collected packages: tomli, pyparsing, contourpy, packaging, setuptools-scm, matplotlib
  Attempting uninstall: matplotlib
    Found existing installation: matplotlib 3.5.2
    Uninstalling matplotlib-3.5.2:
      Removing file or directory /home/nithin/.local/lib/python3.9/site-packages/__pycache__/pylab.cpython-39.pyc
      Removing file or directory /home/nithin/.local/lib/python3.9/site-packages/matplotlib-3.5.2-py3.9-nspkg.pth
      Removing file or directory /home/nithin/.local/lib/python3.9/site-packages/matplotlib-3.5.2.dist-info/
      Removing file or directory /home/nithin/.local/lib/python3.9/site-packages/matplotlib/
      Removing file or directory /home/nithin/.local/lib/python3.9/site-packages/mpl_toolkits/axes_grid/
      Removing file or directory /home/nithin/.local/lib/python3.9/site-packages/mpl_toolkits/axes_grid1/
      Removing file or directory /home/nithin/.local/lib/python3.9/site-packages/mpl_toolkits/axisartist/
      Removing file or directory /home/nithin/.local/lib/python3.9/site-packages/mpl_toolkits/mplot3d/
      Removing file or directory /home/nithin/.local/lib/python3.9/site-packages/mpl_toolkits/tests/
      Removing file or directory /home/nithin/.local/lib/python3.9/site-packages/pylab.py
      Successfully uninstalled matplotlib-3.5.2
  Running setup.py develop for matplotlib
    Running command python setup.py develop
    /tmp/pip-build-env-1om_apel/overlay/lib/python3.9/site-packages/setuptools/dist.py:286: SetuptoolsDeprecationWarning: The namespace_packages parameter is deprecated, consider using implicit namespaces instead (PEP 420).
      warnings.warn(msg, SetuptoolsDeprecationWarning)

    Edit mplsetup.cfg to change the build options; suppress output with --quiet.

    BUILDING MATPLOTLIB
          python: yes [3.9.12 (main, Apr  5 2022, 06:56:58)  [GCC 7.5.0]]
        platform: yes [linux]
           tests: no  [skipping due to configuration]
          macosx: no  [Mac OS-X only]

    running develop
    /tmp/pip-build-env-1om_apel/overlay/lib/python3.9/site-packages/setuptools/command/easy_install.py:144: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
      warnings.warn(
    /tmp/pip-build-env-1om_apel/overlay/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
      warnings.warn(
    running egg_info
    writing lib/matplotlib.egg-info/PKG-INFO
    writing dependency_links to lib/matplotlib.egg-info/dependency_links.txt
    writing namespace_packages to lib/matplotlib.egg-info/namespace_packages.txt
    writing requirements to lib/matplotlib.egg-info/requires.txt
    writing top-level names to lib/matplotlib.egg-info/top_level.txt
    adding license file 'LICENSE/LICENSE'
    adding license file 'LICENSE/LICENSE_AMSFONTS'
    adding license file 'LICENSE/LICENSE_BAKOMA'
    adding license file 'LICENSE/LICENSE_CARLOGO'
    adding license file 'LICENSE/LICENSE_COLORBREWER'
    adding license file 'LICENSE/LICENSE_COURIERTEN'
    adding license file 'LICENSE/LICENSE_JSXTOOLS_RESIZE_OBSERVER'
    adding license file 'LICENSE/LICENSE_QHULL'
    adding license file 'LICENSE/LICENSE_QT4_EDITOR'
    adding license file 'LICENSE/LICENSE_SOLARIZED'
    adding license file 'LICENSE/LICENSE_STIX'
    adding license file 'LICENSE/LICENSE_YORICK'
    writing manifest file 'lib/matplotlib.egg-info/SOURCES.txt'
    running build_ext
    gcc -pthread -B /home/nithin/miniconda3/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/nithin/miniconda3/include -I/home/nithin/miniconda3/include -fPIC -O2 -isystem /home/nithin/miniconda3/include -fPIC -I/home/nithin/miniconda3/include/python3.9 -c /tmp/tmp_6q8t2_t.cpp -o tmp/tmp_6q8t2_t.o -fvisibility=hidden
    gcc -pthread -B /home/nithin/miniconda3/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/nithin/miniconda3/include -I/home/nithin/miniconda3/include -fPIC -O2 -isystem /home/nithin/miniconda3/include -fPIC -I/home/nithin/miniconda3/include/python3.9 -c /tmp/tmp09ss4aj8.cpp -o tmp/tmp09ss4aj8.o -fvisibility-inlines-hidden
    gcc -pthread -B /home/nithin/miniconda3/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/nithin/miniconda3/include -I/home/nithin/miniconda3/include -fPIC -O2 -isystem /home/nithin/miniconda3/include -fPIC -I/home/nithin/miniconda3/include/python3.9 -c /tmp/tmpgkuhp22j.cpp -o tmp/tmpgkuhp22j.o -flto
    building 'matplotlib.backends._backend_agg' extension
    creating build/temp.linux-x86_64-cpython-39
    creating build/temp.linux-x86_64-cpython-39/matplotlib.backends._backend_agg
    creating build/temp.linux-x86_64-cpython-39/matplotlib.backends._backend_agg/extern
    creating build/temp.linux-x86_64-cpython-39/matplotlib.backends._backend_agg/extern/agg24-svn
    creating build/temp.linux-x86_64-cpython-39/matplotlib.backends._backend_agg/extern/agg24-svn/src
    creating build/temp.linux-x86_64-cpython-39/matplotlib.backends._backend_agg/src
    gcc -pthread -B /home/nithin/miniconda3/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/nithin/miniconda3/include -I/home/nithin/miniconda3/include -fPIC -O2 -isystem /home/nithin/miniconda3/include -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_matplotlib_backends__backend_agg_ARRAY_API -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -D__STDC_FORMAT_MACROS=1 -DFREETYPE_BUILD_TYPE=local -Ibuild/freetype-2.6.1/include -Iextern/agg24-svn/include -I/tmp/pip-build-env-1om_apel/overlay/lib/python3.9/site-packages/numpy/core/include -I/home/nithin/miniconda3/include/python3.9 -c extern/agg24-svn/src/agg_bezier_arc.cpp -o build/temp.linux-x86_64-cpython-39/matplotlib.backends._backend_agg/extern/agg24-svn/src/agg_bezier_arc.o -fvisibility=hidden -flto
    gcc -pthread -B /home/nithin/miniconda3/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/nithin/miniconda3/include -I/home/nithin/miniconda3/include -fPIC -O2 -isystem /home/nithin/miniconda3/include -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_matplotlib_backends__backend_agg_ARRAY_API -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -D__STDC_FORMAT_MACROS=1 -DFREETYPE_BUILD_TYPE=local -Ibuild/freetype-2.6.1/include -Iextern/agg24-svn/include -I/tmp/pip-build-env-1om_apel/overlay/lib/python3.9/site-packages/numpy/core/include -I/home/nithin/miniconda3/include/python3.9 -c extern/agg24-svn/src/agg_curves.cpp -o build/temp.linux-x86_64-cpython-39/matplotlib.backends._backend_agg/extern/agg24-svn/src/agg_curves.o -fvisibility=hidden -flto
    gcc -pthread -B /home/nithin/miniconda3/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/nithin/miniconda3/include -I/home/nithin/miniconda3/include -fPIC -O2 -isystem /home/nithin/miniconda3/include -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_matplotlib_backends__backend_agg_ARRAY_API -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -D__STDC_FORMAT_MACROS=1 -DFREETYPE_BUILD_TYPE=local -Ibuild/freetype-2.6.1/include -Iextern/agg24-svn/include -I/tmp/pip-build-env-1om_apel/overlay/lib/python3.9/site-packages/numpy/core/include -I/home/nithin/miniconda3/include/python3.9 -c extern/agg24-svn/src/agg_image_filters.cpp -o build/temp.linux-x86_64-cpython-39/matplotlib.backends._backend_agg/extern/agg24-svn/src/agg_image_filters.o -fvisibility=hidden -flto
    gcc -pthread -B /home/nithin/miniconda3/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/nithin/miniconda3/include -I/home/nithin/miniconda3/include -fPIC -O2 -isystem /home/nithin/miniconda3/include -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_matplotlib_backends__backend_agg_ARRAY_API -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -D__STDC_FORMAT_MACROS=1 -DFREETYPE_BUILD_TYPE=local -Ibuild/freetype-2.6.1/include -Iextern/agg24-svn/include -I/tmp/pip-build-env-1om_apel/overlay/lib/python3.9/site-packages/numpy/core/include -I/home/nithin/miniconda3/include/python3.9 -c extern/agg24-svn/src/agg_trans_affine.cpp -o build/temp.linux-x86_64-cpython-39/matplotlib.backends._backend_agg/extern/agg24-svn/src/agg_trans_affine.o -fvisibility=hidden -flto
    gcc -pthread -B /home/nithin/miniconda3/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/nithin/miniconda3/include -I/home/nithin/miniconda3/include -fPIC -O2 -isystem /home/nithin/miniconda3/include -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_matplotlib_backends__backend_agg_ARRAY_API -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -D__STDC_FORMAT_MACROS=1 -DFREETYPE_BUILD_TYPE=local -Ibuild/freetype-2.6.1/include -Iextern/agg24-svn/include -I/tmp/pip-build-env-1om_apel/overlay/lib/python3.9/site-packages/numpy/core/include -I/home/nithin/miniconda3/include/python3.9 -c extern/agg24-svn/src/agg_vcgen_contour.cpp -o build/temp.linux-x86_64-cpython-39/matplotlib.backends._backend_agg/extern/agg24-svn/src/agg_vcgen_contour.o -fvisibility=hidden -flto
    gcc -pthread -B /home/nithin/miniconda3/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/nithin/miniconda3/include -I/home/nithin/miniconda3/include -fPIC -O2 -isystem /home/nithin/miniconda3/include -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_matplotlib_backends__backend_agg_ARRAY_API -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -D__STDC_FORMAT_MACROS=1 -DFREETYPE_BUILD_TYPE=local -Ibuild/freetype-2.6.1/include -Iextern/agg24-svn/include -I/tmp/pip-build-env-1om_apel/overlay/lib/python3.9/site-packages/numpy/core/include -I/home/nithin/miniconda3/include/python3.9 -c extern/agg24-svn/src/agg_vcgen_dash.cpp -o build/temp.linux-x86_64-cpython-39/matplotlib.backends._backend_agg/extern/agg24-svn/src/agg_vcgen_dash.o -fvisibility=hidden -flto
    gcc -pthread -B /home/nithin/miniconda3/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/nithin/miniconda3/include -I/home/nithin/miniconda3/include -fPIC -O2 -isystem /home/nithin/miniconda3/include -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_matplotlib_backends__backend_agg_ARRAY_API -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -D__STDC_FORMAT_MACROS=1 -DFREETYPE_BUILD_TYPE=local -Ibuild/freetype-2.6.1/include -Iextern/agg24-svn/include -I/tmp/pip-build-env-1om_apel/overlay/lib/python3.9/site-packages/numpy/core/include -I/home/nithin/miniconda3/include/python3.9 -c extern/agg24-svn/src/agg_vcgen_stroke.cpp -o build/temp.linux-x86_64-cpython-39/matplotlib.backends._backend_agg/extern/agg24-svn/src/agg_vcgen_stroke.o -fvisibility=hidden -flto
    gcc -pthread -B /home/nithin/miniconda3/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/nithin/miniconda3/include -I/home/nithin/miniconda3/include -fPIC -O2 -isystem /home/nithin/miniconda3/include -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_matplotlib_backends__backend_agg_ARRAY_API -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -D__STDC_FORMAT_MACROS=1 -DFREETYPE_BUILD_TYPE=local -Ibuild/freetype-2.6.1/include -Iextern/agg24-svn/include -I/tmp/pip-build-env-1om_apel/overlay/lib/python3.9/site-packages/numpy/core/include -I/home/nithin/miniconda3/include/python3.9 -c extern/agg24-svn/src/agg_vpgen_segmentator.cpp -o build/temp.linux-x86_64-cpython-39/matplotlib.backends._backend_agg/extern/agg24-svn/src/agg_vpgen_segmentator.o -fvisibility=hidden -flto
    gcc -pthread -B /home/nithin/miniconda3/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/nithin/miniconda3/include -I/home/nithin/miniconda3/include -fPIC -O2 -isystem /home/nithin/miniconda3/include -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_matplotlib_backends__backend_agg_ARRAY_API -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -D__STDC_FORMAT_MACROS=1 -DFREETYPE_BUILD_TYPE=local -Ibuild/freetype-2.6.1/include -Iextern/agg24-svn/include -I/tmp/pip-build-env-1om_apel/overlay/lib/python3.9/site-packages/numpy/core/include -I/home/nithin/miniconda3/include/python3.9 -c src/_backend_agg.cpp -o build/temp.linux-x86_64-cpython-39/matplotlib.backends._backend_agg/src/_backend_agg.o -fvisibility=hidden -flto
    gcc -pthread -B /home/nithin/miniconda3/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/nithin/miniconda3/include -I/home/nithin/miniconda3/include -fPIC -O2 -isystem /home/nithin/miniconda3/include -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_matplotlib_backends__backend_agg_ARRAY_API -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -D__STDC_FORMAT_MACROS=1 -DFREETYPE_BUILD_TYPE=local -Ibuild/freetype-2.6.1/include -Iextern/agg24-svn/include -I/tmp/pip-build-env-1om_apel/overlay/lib/python3.9/site-packages/numpy/core/include -I/home/nithin/miniconda3/include/python3.9 -c src/_backend_agg_wrapper.cpp -o build/temp.linux-x86_64-cpython-39/matplotlib.backends._backend_agg/src/_backend_agg_wrapper.o -fvisibility=hidden -flto
    gcc -pthread -B /home/nithin/miniconda3/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/nithin/miniconda3/include -I/home/nithin/miniconda3/include -fPIC -O2 -isystem /home/nithin/miniconda3/include -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_matplotlib_backends__backend_agg_ARRAY_API -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -D__STDC_FORMAT_MACROS=1 -DFREETYPE_BUILD_TYPE=local -Ibuild/freetype-2.6.1/include -Iextern/agg24-svn/include -I/tmp/pip-build-env-1om_apel/overlay/lib/python3.9/site-packages/numpy/core/include -I/home/nithin/miniconda3/include/python3.9 -c src/checkdep_freetype2.c -o build/temp.linux-x86_64-cpython-39/matplotlib.backends._backend_agg/src/checkdep_freetype2.o -fvisibility=hidden -flto
    src/checkdep_freetype2.c:14:9: note: ‘#pragma message: Compiling with FreeType version 2.6.1.’
       14 | #pragma message("Compiling with FreeType version " \
          |         ^~~~~~~
    gcc -pthread -B /home/nithin/miniconda3/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/nithin/miniconda3/include -I/home/nithin/miniconda3/include -fPIC -O2 -isystem /home/nithin/miniconda3/include -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_matplotlib_backends__backend_agg_ARRAY_API -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -D__STDC_FORMAT_MACROS=1 -DFREETYPE_BUILD_TYPE=local -Ibuild/freetype-2.6.1/include -Iextern/agg24-svn/include -I/tmp/pip-build-env-1om_apel/overlay/lib/python3.9/site-packages/numpy/core/include -I/home/nithin/miniconda3/include/python3.9 -c src/py_converters.cpp -o build/temp.linux-x86_64-cpython-39/matplotlib.backends._backend_agg/src/py_converters.o -fvisibility=hidden -flto
    creating build/lib.linux-x86_64-cpython-39
    creating build/lib.linux-x86_64-cpython-39/matplotlib
    creating build/lib.linux-x86_64-cpython-39/matplotlib/backends
    g++ -pthread -B /home/nithin/miniconda3/compiler_compat -shared -Wl,-rpath,/home/nithin/miniconda3/lib -Wl,-rpath-link,/home/nithin/miniconda3/lib -L/home/nithin/miniconda3/lib -L/home/nithin/miniconda3/lib -Wl,-rpath,/home/nithin/miniconda3/lib -Wl,-rpath-link,/home/nithin/miniconda3/lib -L/home/nithin/miniconda3/lib build/temp.linux-x86_64-cpython-39/matplotlib.backends._backend_agg/extern/agg24-svn/src/agg_bezier_arc.o build/temp.linux-x86_64-cpython-39/matplotlib.backends._backend_agg/extern/agg24-svn/src/agg_curves.o build/temp.linux-x86_64-cpython-39/matplotlib.backends._backend_agg/extern/agg24-svn/src/agg_image_filters.o build/temp.linux-x86_64-cpython-39/matplotlib.backends._backend_agg/extern/agg24-svn/src/agg_trans_affine.o build/temp.linux-x86_64-cpython-39/matplotlib.backends._backend_agg/extern/agg24-svn/src/agg_vcgen_contour.o build/temp.linux-x86_64-cpython-39/matplotlib.backends._backend_agg/extern/agg24-svn/src/agg_vcgen_dash.o build/temp.linux-x86_64-cpython-39/matplotlib.backends._backend_agg/extern/agg24-svn/src/agg_vcgen_stroke.o build/temp.linux-x86_64-cpython-39/matplotlib.backends._backend_agg/extern/agg24-svn/src/agg_vpgen_segmentator.o build/temp.linux-x86_64-cpython-39/matplotlib.backends._backend_agg/src/_backend_agg.o build/temp.linux-x86_64-cpython-39/matplotlib.backends._backend_agg/src/_backend_agg_wrapper.o build/temp.linux-x86_64-cpython-39/matplotlib.backends._backend_agg/src/checkdep_freetype2.o build/temp.linux-x86_64-cpython-39/matplotlib.backends._backend_agg/src/py_converters.o build/freetype-2.6.1/objs/.libs/libfreetype.a -o build/lib.linux-x86_64-cpython-39/matplotlib/backends/_backend_agg.cpython-39-x86_64-linux-gnu.so
    lto1: internal compiler error: compressed stream: data error
    0x7f4a537b8082 __libc_start_main
        ../csu/libc-start.c:308
    Please submit a full bug report,
    with preprocessed source if appropriate.
    Please include the complete backtrace with any bug report.
    See <file:///usr/share/doc/gcc-9/README.Bugs> for instructions.
    lto-wrapper: fatal error: /usr/bin/g++ returned 1 exit status
    compilation terminated.
    /home/nithin/miniconda3/compiler_compat/ld: error: lto-wrapper failed
    collect2: error: ld returned 1 exit status
    error: command '/usr/bin/g++' failed with exit code 1
    error: subprocess-exited-with-error

    × python setup.py develop did not run successfully.
    │ exit code: 1
    ╰─> See above for output.

    note: This error originates from a subprocess, and is likely not a problem with pip.
    full command: /home/nithin/miniconda3/bin/python -c '
    exec(compile('"'"''"'"''"'"'
    # This is <pip-setuptools-caller> -- a caller that pip uses to run setup.py
    #
    # - It imports setuptools before invoking setup.py, to enable projects that directly
    #   import from `distutils.core` to work with newer packaging standards.
    # - It provides a clear error message when setuptools is not installed.
    # - It sets `sys.argv[0]` to the underlying `setup.py`, when invoking `setup.py` so
    #   setuptools doesn'"'"'t think the script is `-c`. This avoids the following warning:
    #     manifest_maker: standard file '"'"'-c'"'"' not found".
    # - It generates a shim setup.py, for handling setup.cfg-only projects.
    import os, sys, tokenize

    try:
        import setuptools
    except ImportError as error:
        print(
            "ERROR: Can not execute `setup.py` since setuptools is not available in "
            "the build environment.",
            file=sys.stderr,
        )
        sys.exit(1)

    __file__ = %r
    sys.argv[0] = __file__

    if os.path.exists(__file__):
        filename = __file__
        with tokenize.open(__file__) as f:
            setup_py_code = f.read()
    else:
        filename = "<auto-generated setuptools caller>"
        setup_py_code = "from setuptools import setup; setup()"

    exec(compile(setup_py_code, filename, "exec"))
    '"'"''"'"''"'"' % ('"'"'/home/nithin/learn/matplotlib/setup.py'"'"',), "<pip-setuptools-caller>", "exec"))' develop --no-deps
    cwd: /home/nithin/learn/matplotlib/
  Rolling back uninstall of matplotlib
  Moving to /home/nithin/.local/lib/python3.9/site-packages/__pycache__/pylab.cpython-39.pyc
   from /tmp/pip-uninstall-s5d192sm/pylab.cpython-39.pyc
  Moving to /home/nithin/.local/lib/python3.9/site-packages/matplotlib-3.5.2-py3.9-nspkg.pth
   from /tmp/pip-uninstall-z3511myp/matplotlib-3.5.2-py3.9-nspkg.pth
  Moving to /home/nithin/.local/lib/python3.9/site-packages/matplotlib-3.5.2.dist-info/
   from /home/nithin/.local/lib/python3.9/site-packages/~atplotlib-3.5.2.dist-info
  Moving to /home/nithin/.local/lib/python3.9/site-packages/matplotlib/
   from /home/nithin/.local/lib/python3.9/site-packages/~atplotlib
  Moving to /home/nithin/.local/lib/python3.9/site-packages/mpl_toolkits/axes_grid/
   from /home/nithin/.local/lib/python3.9/site-packages/mpl_toolkits/~xes_grid
  Moving to /home/nithin/.local/lib/python3.9/site-packages/mpl_toolkits/axes_grid1/
   from /home/nithin/.local/lib/python3.9/site-packages/mpl_toolkits/~xes_grid1
  Moving to /home/nithin/.local/lib/python3.9/site-packages/mpl_toolkits/axisartist/
   from /home/nithin/.local/lib/python3.9/site-packages/mpl_toolkits/~xisartist
  Moving to /home/nithin/.local/lib/python3.9/site-packages/mpl_toolkits/mplot3d/
   from /home/nithin/.local/lib/python3.9/site-packages/mpl_toolkits/~plot3d
  Moving to /home/nithin/.local/lib/python3.9/site-packages/mpl_toolkits/tests/
   from /home/nithin/.local/lib/python3.9/site-packages/mpl_toolkits/~ests
  Moving to /home/nithin/.local/lib/python3.9/site-packages/pylab.py
   from /tmp/pip-uninstall-z3511myp/pylab.py
error: subprocess-exited-with-error

× python setup.py develop did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
abravalheri commented 1 year ago

Hi @nithinivi thank you very much for reporting this.

Could you please confirm that a "non-editable" installation works without any problem? (i.e. following the same steps you described in the "How to reproduce" section from scratch but replacing the installation command with python -m pip -v install . (no -e flag).

nithinivi commented 1 year ago

@abravalheri Hi thanks for the response. On trying "non-editable" I'm getting the same I am getting the following error

lto1: internal compiler error: compressed stream: data error
  0x7ffa51786082 __libc_start_main
        ../csu/libc-start.c:308
  Please submit a full bug report,
  with preprocessed source if appropriate.
  Please include the complete backtrace with any bug report.
  See <file:///usr/share/doc/gcc-9/README.Bugs> for instructions.
  lto-wrapper: fatal error: /usr/bin/g++ returned 1 exit status
  compilation terminated.
  /home/nithin/miniconda3/envs/mpl-dev/compiler_compat/ld: error: lto-wrapper failed
  collect2: error: ld returned 1 exit status
  error: command '/usr/bin/g++' failed with exit code 1
  error: subprocess-exited-with-error

  × Building wheel for matplotlib (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> See above for output.

  note: This error originates from a subprocess, and is likely not a problem with pip.
  full command: /home/nithin/miniconda3/envs/mpl-dev/bin/python /home/nithin/miniconda3/envs/mpl-dev/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /tmp/tmp53oeeng0
  cwd: /home/nithin/learn/matplotlib
  Building wheel for matplotlib (pyproject.toml) ... error
  ERROR: Failed building wheel for matplotlib
Failed to build matplotlib
ERROR: Could not build wheels for matplotlib, which is required to install pyproject.toml-based projects
abravalheri commented 1 year ago

Thank you very much @nithinivi.

Since the non-editable install and the legacy install all fail to build with the same problem, I think we can rule out the hypothesis that this is caused by the PEP 660 implementation in setuptools.


I tried to reproduce the error with the following procedure:

git clone https://github.com/matplotlib/matplotlib.git
cd matplotlib
conda env create -f environment.yml
conda activate mpl-dev
python -m pip -v install .

In my dev machine with Ubuntu 20.04.5 LTS and Python 3.10.6 (created by conda), I can install the project from the source code without experiencing the error you describe:

Successfully installed matplotlib-3.7.0.dev508+g5c58816e41

I can also install it using the editable mode:

python -m pip -v install -e .

and everything still works fine:

Successfully installed matplotlib-3.7.0.dev508+g5c58816e41

Next, I tried to run the procedure in a container:

> docker run --rm -it condaforge/mambaforge /bin/bash
# mambaforge image should be based on Ubuntu Focal Fossa

apt update
apt install -y autotools-dev autoconf make build-essential
cd /tmp
git clone https://github.com/matplotlib/matplotlib.git
cd matplotlib
conda env create -f environment.yml
conda activate mpl-dev
python -m pip -v install .
# ...
Successfully installed matplotlib-3.7.0.dev508+g5c58816e41

I was also able to do an editable install inside the same container:

python -m pip -v install -e .
Successfully installed matplotlib-3.7.0.dev508+g5c58816e41

Is there any chance you can share with us a reproduceable isolated environment that results in the error you are seeing (ideally in a container)?

I am starting to suspect that this problem might be dependent on the dev environment...

abravalheri commented 1 year ago

I am renaming the issue to reflect the latest findings.

drammock commented 1 year ago

@abravalheri I just followed your procedure exactly, and I'm failing to build matplotlib:

git clone https://github.com/matplotlib/matplotlib.git
cd matplotlib
conda env create -f environment.yml
conda activate mpl-dev
python -m pip -v install .

(actually I already had an up-to-date clone so I skipped the git clone line, but the rest I did exactly as you).

Here is the tail end of my failure with non-editable install (as above):

``` g++ -pthread -B /opt/miniforge3/envs/mpl-dev/compiler_compat -shared -Wl,--allow-shlib-undefined -Wl,-rpath,/opt/miniforge3/envs/mpl-dev/lib -Wl,-rpath-link,/opt/miniforge3/envs/mpl-dev/lib -L/opt/miniforge3/envs/mpl-dev/lib -Wl,--allow-shlib-undefined -Wl,-rpath,/opt/miniforge3/envs/mpl-dev/lib -Wl,-rpath-link,/opt/miniforge3/envs/mpl-dev/lib -L/opt/miniforge3/envs/mpl-dev/lib build/temp.linux-x86_64-cpython-311/matplotlib.ft2font/src/checkdep_freetype2.o build/temp.linux-x86_64-cpython-311/matplotlib.ft2font/src/ft2font.o build/temp.linux-x86_64-cpython-311/matplotlib.ft2font/src/ft2font_wrapper.o build/temp.linux-x86_64-cpython-311/matplotlib.ft2font/src/py_converters.o build/freetype-2.6.1/objs/.libs/libfreetype.a -o build/lib.linux-x86_64-cpython-311/matplotlib/ft2font.cpython-311-x86_64-linux-gnu.so lto1: fatal error: bytecode stream in file ‘build/freetype-2.6.1/objs/.libs/libfreetype.a’ generated with GCC compiler older than 10.0 compilation terminated. lto-wrapper: fatal error: /usr/bin/g++ returned 1 exit status compilation terminated. /opt/miniforge3/envs/mpl-dev/compiler_compat/ld: error: lto-wrapper failed collect2: error: ld returned 1 exit status error: command '/usr/bin/g++' failed with exit code 1 error: subprocess-exited-with-error × Building wheel for matplotlib (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> See above for output. note: This error originates from a subprocess, and is likely not a problem with pip. full command: /opt/miniforge3/envs/mpl-dev/bin/python /opt/miniforge3/envs/mpl-dev/lib/python3.11/site-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /tmp/tmp1p1fr1z2 cwd: /opt/matplotlib Building wheel for matplotlib (pyproject.toml) ... error ERROR: Failed building wheel for matplotlib Failed to build matplotlib ERROR: Could not build wheels for matplotlib, which is required to install pyproject.toml-based projects ```

Here is the failure with editable install python -m pip -v install -e .:

``` g++ -pthread -B /opt/miniforge3/envs/mpl-dev/compiler_compat -shared -Wl,--allow-shlib-undefined -Wl,-rpath,/opt/miniforge3/envs/mpl-dev/lib -Wl,-rpath-link,/opt/miniforge3/envs/mpl-dev/lib -L/opt/miniforge3/envs/mpl-dev/lib -Wl,--allow-shlib-undefined -Wl,-rpath,/opt/miniforge3/envs/mpl-dev/lib -Wl,-rpath-link,/opt/miniforge3/envs/mpl-dev/lib -L/opt/miniforge3/envs/mpl-dev/lib /tmp/tmp4folt2xl.build-temp/matplotlib.ft2font/src/checkdep_freetype2.o /tmp/tmp4folt2xl.build-temp/matplotlib.ft2font/src/ft2font.o /tmp/tmp4folt2xl.build-temp/matplotlib.ft2font/src/ft2font_wrapper.o /tmp/tmp4folt2xl.build-temp/matplotlib.ft2font/src/py_converters.o build/freetype-2.6.1/objs/.libs/libfreetype.a -o /tmp/tmpw51vnp9x.build-lib/matplotlib/ft2font.cpython-311-x86_64-linux-gnu.so lto1: fatal error: bytecode stream in file ‘build/freetype-2.6.1/objs/.libs/libfreetype.a’ generated with GCC compiler older than 10.0 compilation terminated. lto-wrapper: fatal error: /usr/bin/g++ returned 1 exit status compilation terminated. /opt/miniforge3/envs/mpl-dev/compiler_compat/ld: error: lto-wrapper failed collect2: error: ld returned 1 exit status Traceback (most recent call last): File "/tmp/pip-build-env-0ablmp_2/overlay/lib/python3.11/site-packages/setuptools/_distutils/unixccompiler.py", line 267, in link self.spawn(linker + ld_args) File "/tmp/pip-build-env-0ablmp_2/overlay/lib/python3.11/site-packages/setuptools/_distutils/ccompiler.py", line 1007, in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) File "/tmp/pip-build-env-0ablmp_2/overlay/lib/python3.11/site-packages/setuptools/_distutils/spawn.py", line 70, in spawn raise DistutilsExecError( distutils.errors.DistutilsExecError: command '/usr/bin/g++' failed with exit code 1 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/tmp/pip-build-env-0ablmp_2/overlay/lib/python3.11/site-packages/setuptools/command/editable_wheel.py", line 140, in run self._create_wheel_file(bdist_wheel) File "/tmp/pip-build-env-0ablmp_2/overlay/lib/python3.11/site-packages/setuptools/command/editable_wheel.py", line 330, in _create_wheel_file files, mapping = self._run_build_commands(dist_name, unpacked, lib, tmp) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/pip-build-env-0ablmp_2/overlay/lib/python3.11/site-packages/setuptools/command/editable_wheel.py", line 261, in _run_build_commands self._run_build_subcommands() File "/tmp/pip-build-env-0ablmp_2/overlay/lib/python3.11/site-packages/setuptools/command/editable_wheel.py", line 288, in _run_build_subcommands self.run_command(name) File "/tmp/pip-build-env-0ablmp_2/overlay/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command self.distribution.run_command(command) File "/tmp/pip-build-env-0ablmp_2/overlay/lib/python3.11/site-packages/setuptools/dist.py", line 1208, in run_command super().run_command(command) File "/tmp/pip-build-env-0ablmp_2/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command cmd_obj.run() File "/tmp/pip-build-env-0ablmp_2/overlay/lib/python3.11/site-packages/setuptools/command/build_ext.py", line 84, in run _build_ext.run(self) File "/tmp/pip-build-env-0ablmp_2/overlay/lib/python3.11/site-packages/setuptools/_distutils/command/build_ext.py", line 346, in run self.build_extensions() File "", line 184, in build_extensions File "/tmp/pip-build-env-0ablmp_2/overlay/lib/python3.11/site-packages/setuptools/_distutils/command/build_ext.py", line 468, in build_extensions self._build_extensions_serial() File "/tmp/pip-build-env-0ablmp_2/overlay/lib/python3.11/site-packages/setuptools/_distutils/command/build_ext.py", line 494, in _build_extensions_serial self.build_extension(ext) File "", line 196, in build_extension File "/tmp/pip-build-env-0ablmp_2/overlay/lib/python3.11/site-packages/setuptools/command/build_ext.py", line 246, in build_extension _build_ext.build_extension(self, ext) File "/tmp/pip-build-env-0ablmp_2/overlay/lib/python3.11/site-packages/setuptools/_distutils/command/build_ext.py", line 573, in build_extension self.compiler.link_shared_object( File "/tmp/pip-build-env-0ablmp_2/overlay/lib/python3.11/site-packages/setuptools/_distutils/ccompiler.py", line 751, in link_shared_object self.link( File "/tmp/pip-build-env-0ablmp_2/overlay/lib/python3.11/site-packages/setuptools/_distutils/unixccompiler.py", line 269, in link raise LinkError(msg) distutils.errors.LinkError: command '/usr/bin/g++' failed with exit code 1 error: Support for editable installs via PEP 660 was recently introduced in `setuptools`. If you are seeing this error, please report to: https://github.com/pypa/setuptools/issues Meanwhile you can try the legacy behavior by setting an environment variable and trying to install again: SETUPTOOLS_ENABLE_FEATURES="legacy-editable" error: subprocess-exited-with-error × Building editable for matplotlib (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> See above for output. note: This error originates from a subprocess, and is likely not a problem with pip. full command: /opt/miniforge3/envs/mpl-dev/bin/python /opt/miniforge3/envs/mpl-dev/lib/python3.11/site-packages/pip/_vendor/pep517/in_process/_in_process.py build_editable /tmp/tmp4jxiy22d cwd: /opt/matplotlib Building editable for matplotlib (pyproject.toml) ... error ERROR: Failed building editable for matplotlib Failed to build matplotlib ERROR: Could not build wheels for matplotlib, which is required to install pyproject.toml-based projects ```

Here is the tail end of the output/error if I use SETUPTOOLS_ENABLE_FEATURES="legacy-editable" python -m pip -v install -e .:

``` g++ -pthread -B /opt/miniforge3/envs/mpl-dev/compiler_compat -shared -Wl,--allow-shlib-undefined -Wl,-rpath,/opt/miniforge3/envs/mpl-dev/lib -Wl,-rpath-link,/opt/miniforge3/envs/mpl-dev/lib -L/opt/miniforge3/envs/mpl-dev/lib -Wl,--allow-shlib-undefined -Wl,-rpath,/opt/miniforge3/envs/mpl-dev/lib -Wl,-rpath-link,/opt/miniforge3/envs/mpl-dev/lib -L/opt/miniforge3/envs/mpl-dev/lib build/temp.linux-x86_64-cpython-311/matplotlib.ft2font/src/checkdep_freetype2.o build/temp.linux-x86_64-cpython-311/matplotlib.ft2font/src/ft2font.o build/temp.linux-x86_64-cpython-311/matplotlib.ft2font/src/ft2font_wrapper.o build/temp.linux-x86_64-cpython-311/matplotlib.ft2font/src/py_converters.o build/freetype-2.6.1/objs/.libs/libfreetype.a -o build/lib.linux-x86_64-cpython-311/matplotlib/ft2font.cpython-311-x86_64-linux-gnu.so lto1: fatal error: bytecode stream in file ‘build/freetype-2.6.1/objs/.libs/libfreetype.a’ generated with GCC compiler older than 10.0 compilation terminated. lto-wrapper: fatal error: /usr/bin/g++ returned 1 exit status compilation terminated. /opt/miniforge3/envs/mpl-dev/compiler_compat/ld: error: lto-wrapper failed collect2: error: ld returned 1 exit status error: command '/usr/bin/g++' failed with exit code 1 error: subprocess-exited-with-error × python setup.py develop did not run successfully. │ exit code: 1 ╰─> See above for output. note: This error originates from a subprocess, and is likely not a problem with pip. full command: /opt/miniforge3/envs/mpl-dev/bin/python -c ' exec(compile('"'"''"'"''"'"' # This is -- a caller that pip uses to run setup.py # # - It imports setuptools before invoking setup.py, to enable projects that directly # import from `distutils.core` to work with newer packaging standards. # - It provides a clear error message when setuptools is not installed. # - It sets `sys.argv[0]` to the underlying `setup.py`, when invoking `setup.py` so # setuptools doesn'"'"'t think the script is `-c`. This avoids the following warning: # manifest_maker: standard file '"'"'-c'"'"' not found". # - It generates a shim setup.py, for handling setup.cfg-only projects. import os, sys, tokenize try: import setuptools except ImportError as error: print( "ERROR: Can not execute `setup.py` since setuptools is not available in " "the build environment.", file=sys.stderr, ) sys.exit(1) __file__ = %r sys.argv[0] = __file__ if os.path.exists(__file__): filename = __file__ with tokenize.open(__file__) as f: setup_py_code = f.read() else: filename = "" setup_py_code = "from setuptools import setup; setup()" exec(compile(setup_py_code, filename, "exec")) '"'"''"'"''"'"' % ('"'"'/opt/matplotlib/setup.py'"'"',), "", "exec"))' develop --no-deps cwd: /opt/matplotlib/ Rolling back uninstall of matplotlib Moving to /opt/miniforge3/envs/mpl-dev/lib/python3.11/site-packages/__pycache__/pylab.cpython-311.pyc from /tmp/pip-uninstall-mkdozzpi/pylab.cpython-311.pyc Moving to /opt/miniforge3/envs/mpl-dev/lib/python3.11/site-packages/matplotlib-3.6.2-py3.11-nspkg.pth from /tmp/pip-uninstall-dvvlo8rv/matplotlib-3.6.2-py3.11-nspkg.pth Moving to /opt/miniforge3/envs/mpl-dev/lib/python3.11/site-packages/matplotlib-3.6.2.dist-info/ from /opt/miniforge3/envs/mpl-dev/lib/python3.11/site-packages/~atplotlib-3.6.2.dist-info Moving to /opt/miniforge3/envs/mpl-dev/lib/python3.11/site-packages/matplotlib/ from /opt/miniforge3/envs/mpl-dev/lib/python3.11/site-packages/~atplotlib Moving to /opt/miniforge3/envs/mpl-dev/lib/python3.11/site-packages/mpl_toolkits/axes_grid1/ from /opt/miniforge3/envs/mpl-dev/lib/python3.11/site-packages/mpl_toolkits/~xes_grid1 Moving to /opt/miniforge3/envs/mpl-dev/lib/python3.11/site-packages/mpl_toolkits/axisartist/ from /opt/miniforge3/envs/mpl-dev/lib/python3.11/site-packages/mpl_toolkits/~xisartist Moving to /opt/miniforge3/envs/mpl-dev/lib/python3.11/site-packages/mpl_toolkits/mplot3d/ from /opt/miniforge3/envs/mpl-dev/lib/python3.11/site-packages/mpl_toolkits/~plot3d Moving to /opt/miniforge3/envs/mpl-dev/lib/python3.11/site-packages/mpl_toolkits/tests/ from /opt/miniforge3/envs/mpl-dev/lib/python3.11/site-packages/mpl_toolkits/~ests Moving to /opt/miniforge3/envs/mpl-dev/lib/python3.11/site-packages/pylab.py from /tmp/pip-uninstall-dvvlo8rv/pylab.py error: subprocess-exited-with-error × python setup.py develop did not run successfully. │ exit code: 1 ╰─> See above for output. note: This error originates from a subprocess, and is likely not a problem with pip. ```

System info:

Ubuntu 22.04.1 LTS (jammy) mamba 0.14.1 conda 4.10.3

All fail on the same g++ line (something relating to freetype). I'll poke around and see what I can discover but meanwhile LMK if there's additional info that would be helpful or things you want me to try

tacaswell commented 1 year ago

A thing that jumps out to me is that these errors are happening when a mix of the system and conda compiler tool chains:

  lto1: fatal error: bytecode stream in file ‘build/freetype-2.6.1/objs/.libs/libfreetype.a’ generated with GCC compiler older than 10.0
  compilation terminated.
  lto-wrapper: fatal error: /usr/bin/g++ returned 1 exit status    <---- System g++
  compilation terminated.
  /opt/miniforge3/envs/mpl-dev/compiler_compat/ld: error: lto-wrapper failed  <------ conda ld
drammock commented 1 year ago

I fixed this by rm -rf build/* and then retrying python -m pip install -e . just worked. So, with a clean clone of matplotlib I cannot reproduce.