Opened 4 years ago
Closed 4 years ago
#62744 closed defect (fixed)
py39-opencv4 4.5.2: staging into destroot fails
Reported by: | phosphide (Jakub Tomczyński) | Owned by: | mascguy (Christopher Nielsen) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.6.4 |
Keywords: | Cc: | stromnov (Andrey Stromnov) | |
Port: | py39-opencv4 |
Description
py39-opencv4 build successfully, but staging fails with the following output:
---> Fetching distfiles for py39-opencv4 ---> Verifying checksums for py39-opencv4 ---> Extracting py39-opencv4 ---> Applying patches to py39-opencv4 ---> Configuring py39-opencv4 ---> Building py39-opencv4 ---> Staging py39-opencv4 into destroot Error: No files have been installed in the destroot directory! Error: Please make sure that this software supports 'make install DESTDIR=${destroot}' or implement an alternative destroot mechanism in the Portfile. Error: Files might have been installed directly into your system, check before proceeding. Error: Failed to destroot py39-opencv4: Staging py39-opencv4 into destroot failed Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_opencv4/py39-opencv4/main.log for details. Error: Follow https://guide.macports.org/#project.tickets to report a bug. Error: Processing of port py39-opencv4 failed
macOS Big Sur 11.2.3, Apple M1. Full log is attached.
Attachments (1)
Change History (14)
Changed 4 years ago by phosphide (Jakub Tomczyński)
comment:1 Changed 4 years ago by mascguy (Christopher Nielsen)
I'll take this, please reassign to me. Thanks!
comment:2 Changed 4 years ago by mascguy (Christopher Nielsen)
This error occurs when the Python bindings aren't built successfully.
Indeed, I'm seeing the following in the logs. It looks like there's in an issue with py39-numpy
:
:info:configure -- Found PythonInterp: /opt/local/bin/python3.9 (found suitable version "3.9.4", minimum required is "3.2") :info:configure -- Found PythonLibs: /opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/libpython3.9.dylib (found sui table exact version "3.9.4") :info:configure Traceback (most recent call last): :info:configure File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/numpy/core/__init__.py", line 22, in <module> :info:configure from . import multiarray :info:configure File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/numpy/core/multiarray.py", line 12, in <module> :info:configure from . import overrides :info:configure File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/numpy/core/overrides.py", line 7, in <module> :info:configure from numpy.core._multiarray_umath import ( :info:configure 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): Library not loaded: @rpath/libgcc_s.1.1.dylib :info:configure Referenced from: /opt/local/lib/libgcc/libgfortran.5.dylib :info:configure Reason: image not found :info:configure During handling of the above exception, another exception occurred: :info:configure Traceback (most recent call last): :info:configure File "<string>", line 1, in <module> :info:configure File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/numpy/__init__.py", line 145, in <module> :info:configure from . import core :info:configure File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/numpy/core/__init__.py", line 48, in <module> :info:configure raise ImportError(msg) :info:configure ImportError: :info:configure IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE! :info:configure Importing the numpy C-extensions failed. This error can happen for :info:configure many reasons, often due to issues with your setup or how NumPy was :info:configure installed. :info:configure We have compiled some common reasons and troubleshooting tips at: :info:configure https://numpy.org/devdocs/user/troubleshooting-importerror.html :info:configure Please note and check the following: :info:configure * The Python version is: Python3.9 from "/opt/local/bin/python3.9" :info:configure * The NumPy version is: "1.20.2" :info:configure and make sure that they are the versions you expect. :info:configure Please carefully study the documentation linked above for further help. :info:configure 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): Library not loaded: @rpath/libgcc_s.1.1.dylib :info:configure Referenced from: /opt/local/lib/libgcc/libgfortran.5.dylib :info:configure Reason: image not found
comment:3 Changed 4 years ago by mascguy (Christopher Nielsen)
Fellow Maintainers, are any of you folks successfully using py39-numpy
on an M1 Mac?
comment:4 Changed 4 years ago by mascguy (Christopher Nielsen)
I suspect this is an issue with upstream dependency OpenBLAS, on M1 Macs. Not 100% certain though.
Two related tickets:
comment:5 Changed 4 years ago by mf2k (Frank Schima)
Port: | py-opencv4 added; py39-opencv4 removed |
---|
comment:6 Changed 4 years ago by phosphide (Jakub Tomczyński)
Owner: | changed from stromnov to mascguy |
---|
I reassigned to mascguy.
As for OpenBLAS/numpy , I have OpenBLAS @0.3.14_0+gccdevel+lapack+native successfully installed. py39-numpy is also installed, but when I try to import it I get:
Python 3.9.4 (default, Apr 17 2021, 10:08:48) [Clang 12.0.0 (clang-1200.0.32.29)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import numpy as np 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): Library not loaded: @rpath/libgcc_s.1.1.dylib Referenced from: /opt/local/lib/libgcc/libgfortran.5.dylib Reason: image not found
comment:7 Changed 4 years ago by mf2k (Frank Schima)
Port: | py39-opencv4 added; py-opencv4 removed |
---|
comment:8 Changed 4 years ago by mf2k (Frank Schima)
Cc: | stromnov added; mascguy removed |
---|
comment:9 Changed 4 years ago by freedomtan ("freedom" Koan-Sin Tan)
This is kinda rpath problem. If library path such as /opt/local/lib/gcc-devel/ is added to LD_LIBRARY_PATH, it should run well. This may be caused by recent gcc-devel changes though.
comment:10 Changed 4 years ago by kencu (Ken)
https://github.com/iains/gcc-darwin-arm64/commit/fb623616ef18fb9bf8254e41351a08a92ba3f91f
https://github.com/iains/gcc-darwin-arm64/commit/65675a9f317f13b72a20869271bcc127fcfb12b0
and similar commits.
Hiccups with this move would be expected...
comment:11 Changed 4 years ago by mascguy (Christopher Nielsen)
Jakub, this issue may be resolved, as dependencies like OpenBLAS and py39-numpy are now building on Big Sur ARM/M1.
Are you still seeing this issue?
comment:12 Changed 4 years ago by phosphide (Jakub Tomczyński)
I have temporarily switched to emulated x86_64, but today I reinstalled everything (python 3.9, py39-numpy, py39-opencv4) natively and it seems to be working, thank you!
comment:13 Changed 4 years ago by mascguy (Christopher Nielsen)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Beautiful, glad everything's working for you!
Closing as resolved.
py39-opencv4 @4.5.2 main.log