[MacPorts] #62523: py39-matplotlib 3.3.4 fails to build on Lion

MacPorts noreply at macports.org
Mon Mar 22 19:31:27 UTC 2021


#62523: py39-matplotlib 3.3.4 fails to build on Lion
--------------------+-----------------------------
 Reporter:  RobK88  |      Owner:  (none)
     Type:  defect  |     Status:  new
 Priority:  Normal  |  Milestone:
Component:  ports   |    Version:  2.6.4
 Keywords:  Lion    |       Port:  py39-matplotlib
--------------------+-----------------------------
 I am unable to build py39-matplotlib on Lion.

 Here is the bottom part of "sudo port install -v py39-matplotlib"


 {{{
 UPDATING build/lib.macosx-10.7-x86_64-3.9/matplotlib/_version.py
 set build/lib.macosx-10.7-x86_64-3.9/matplotlib/_version.py to '3.3.4'
 running build_ext
 Traceback (most recent call last):
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9
 /site-packages/numpy/core/__init__.py", line 22, in <module>
     from . import multiarray
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9
 /site-packages/numpy/core/multiarray.py", line 12, in <module>
     from . import overrides
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9
 /site-packages/numpy/core/overrides.py", line 7, in <module>
     from numpy.core._multiarray_umath import (
 ImportError:
 dlopen(/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9
 /site-packages/numpy/core/_multiarray_umath.cpython-39-darwin.so, 2):
 Symbol not found: _environ
   Referenced from: /opt/local/lib/libgcc/libgfortran.5.dylib
   Expected in: flat namespace
  in /opt/local/lib/libgcc/libgfortran.5.dylib

 During handling of the above exception, another exception occurred:

 Traceback (most recent call last):
   File
 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports
 .org_release_tarballs_ports_python_py-
 matplotlib/py39-matplotlib/work/matplotlib-3.3.4/setup.py", line 256, in
 <module>
     setup(  # Finally, pass this all along to distutils to do the heavy
 lifting.
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9
 /site-packages/setuptools/__init__.py", line 153, in setup
     return distutils.core.setup(**attrs)
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/core.py",
 line 148, in setup
     dist.run_commands()
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py",
 line 966, in run_commands
     self.run_command(cmd)
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py",
 line 985, in run_command
     cmd_obj.run()
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/command/build.py",
 line 135, in run
     self.run_command(cmd_name)
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/cmd.py",
 line 313, in run_command
     self.distribution.run_command(command)
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py",
 line 984, in run_command
     cmd_obj.ensure_finalized()
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/cmd.py",
 line 107, in ensure_finalized
     self.finalize_options()
   File
 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports
 .org_release_tarballs_ports_python_py-
 matplotlib/py39-matplotlib/work/matplotlib-3.3.4/setup.py", line 88, in
 finalize_options
     self.distribution.ext_modules[:] = [
   File
 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports
 .org_release_tarballs_ports_python_py-
 matplotlib/py39-matplotlib/work/matplotlib-3.3.4/setup.py", line 91, in
 <listcomp>
     for ext in package.get_extensions()
   File
 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports
 .org_release_tarballs_ports_python_py-
 matplotlib/py39-matplotlib/work/matplotlib-3.3.4/setupext.py", line 345,
 in get_extensions
     add_numpy_flags(ext)
   File
 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports
 .org_release_tarballs_ports_python_py-
 matplotlib/py39-matplotlib/work/matplotlib-3.3.4/setupext.py", line 468,
 in add_numpy_flags
     import numpy as np
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9
 /site-packages/numpy/__init__.py", line 145, in <module>
     from . import core
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9
 /site-packages/numpy/core/__init__.py", line 48, in <module>
     raise ImportError(msg)
 ImportError:

 IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

 Importing the numpy C-extensions failed. This error can happen for
 many reasons, often due to issues with your setup or how NumPy was
 installed.

 We have compiled some common reasons and troubleshooting tips at:

     https://numpy.org/devdocs/user/troubleshooting-importerror.html

 Please note and check the following:

   * The Python version is: Python3.9 from
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9"
   * The NumPy version is: "1.20.1"

 and make sure that they are the versions you expect.
 Please carefully study the documentation linked above for further help.

 Original error was:
 dlopen(/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9
 /site-packages/numpy/core/_multiarray_umath.cpython-39-darwin.so, 2):
 Symbol not found: _environ
   Referenced from: /opt/local/lib/libgcc/libgfortran.5.dylib
   Expected in: flat namespace
  in /opt/local/lib/libgcc/libgfortran.5.dylib

 Command failed:  cd
 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports
 .org_release_tarballs_ports_python_py-
 matplotlib/py39-matplotlib/work/matplotlib-3.3.4" &&
 /opt/local/Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9
 setup.py --no-user-cfg build
 Exit code: 1
 Error: Failed to build py39-matplotlib: command execution failed
 Error: See
 /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports
 .org_release_tarballs_ports_python_py-matplotlib/py39-matplotlib/main.log
 for details.
 Error: Follow https://guide.macports.org/#project.tickets to report a bug.
 Error: Processing of port py39-matplotlib failed
 }}}

 I tried uninstalling and reinstalling openBLAS and py39-numpy but that did
 not make a difference. The build for py39-matplotlib still failed with the
 same error.

 I will attach main.log

-- 
Ticket URL: <https://trac.macports.org/ticket/62523>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list