Opened 3 years ago

Closed 3 years ago

#64907 closed defect (invalid)

py*-numpy breaks with Symbol not found: ___addtf3, Referenced from: /opt/local/lib/libgcc/libgfortran.5.dylib

Reported by: essandess (Steve Smith) Owned by:
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: michaelld (Michael Dickens)
Port: py-numpy

Description (last modified by ryandesign (Ryan Carsten Schmidt))

python3.9 -c 'import numpy'

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 23, 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 10, 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 6, 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, 0x0002): Symbol not found: ___addtf3
  Referenced from: /opt/local/lib/libgcc/libgfortran.5.dylib
  Expected in: /usr/lib/libSystem.B.dylib

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/numpy/__init__.py", line 144, 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 49, 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/bin/python3.9"
  * The NumPy version is: "1.22.3"

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, 0x0002): Symbol not found: ___addtf3
  Referenced from: /opt/local/lib/libgcc/libgfortran.5.dylib
  Expected in: /usr/lib/libSystem.B.dylib

Likely related: #64800

Change History (7)

comment:1 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)

comment:2 Changed 3 years ago by michaelld (Michael Dickens)

What version of macOS / OSX is being used here?

comment:3 Changed 3 years ago by essandess (Steve Smith)

This is on macOS 12.3.

I was able to fix this issue by uninstalling libgcc and installing libgcc-devel.

comment:4 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)

On Intel or Apple Silicon?

comment:5 in reply to:  4 Changed 3 years ago by essandess (Steve Smith)

Intel.

Replying to ryandesign:

On Intel or Apple Silicon?

comment:6 Changed 3 years ago by essandess (Steve Smith)

I no longer see this issue after a reinstall of libgcc that installed the libgcc11 dependency, and uninstalled previous libgcc9 versions.

I believe that this was the cause of the issue and that this ticket may be closed.

comment:7 Changed 3 years ago by reneeotten (Renee Otten)

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.