Opened 4 years ago

Closed 4 years ago

#60337 closed defect (fixed)

uhd @3.15.0.0_1 fails to build on catalina

Reported by: nebukadnezar (Balthasar Indermuehle) Owned by: michaelld (Michael Dickens)
Priority: Normal Milestone:
Component: ports Version: 2.6.2
Keywords: Cc:
Port: uhd

Description (last modified by nebukadnezar (Balthasar Indermuehle))

This is on 10.15 (Catalina). uhd won't install. Appears to be a missing LibUHD problem? Error message from /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_uhd/uhd/main.log:

:info:configure -- Configuring LibUHD support...
:info:configure --   Dependency Boost_FOUND = TRUE
:info:configure --   Dependency HAVE_PYTHON_PLAT_MIN_VERSION = TRUE
:info:configure --   Dependency HAVE_PYTHON_MODULE_MAKO = TRUE
:info:configure --   Enabling LibUHD support.
:info:configure --   Override with -DENABLE_LIBUHD=ON/OFF
:info:configure -- 
:info:configure -- Configuring LibUHD - C API support...
:info:configure --   Dependency ENABLE_LIBUHD = ON
:info:configure --   Enabling LibUHD - C API support.
:info:configure --   Override with -DENABLE_C_API=ON/OFF
:info:configure -- 
:info:configure -- Configuring LibUHD - Python API support...
:info:configure --   Dependency ENABLE_LIBUHD = ON
:info:configure --   Dependency HAVE_PYTHON_MODULE_NUMPY = FALSE
:info:configure --   Dependency HAVE_PYTHON_LIBS = TRUE
:info:configure CMake Error at cmake/Modules/UHDComponent.cmake:56 (message):
:info:configure   Dependencies for required component LibUHD - Python API not met.
:info:configure Call Stack (most recent call first):
:info:configure   CMakeLists.txt:368 (LIBUHD_REGISTER_COMPONENT)
:info:configure -- Configuring incomplete, errors occurred!
:info:configure See also "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_uhd/uhd/work/build/CMakeFiles/CMakeOutput.log".
:info:configure Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_uhd/uhd/work/build" && /opt/local/bin/cmake -DCMAKE_INSTALL_PREFIX='/opt/local' -DCMAKE_BUILD_TYPE=Release -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON -DCMAKE_C_COMPILER="$CC" -DCMAKE_COLOR_MAKEFILE=ON -DCMAKE_CXX_COMPILER="$CXX" -DCMAKE_FIND_FRAMEWORK=LAST -DCMAKE_INSTALL_NAME_DIR=/opt/local/lib -DCMAKE_INSTALL_RPATH=/opt/local/lib -DCMAKE_MAKE_PROGRAM=/usr/bin/make -DCMAKE_MODULE_PATH=/opt/local/share/cmake/Modules -DCMAKE_SYSTEM_PREFIX_PATH="/opt/local;/opt/local;/usr" -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_POLICY_DEFAULT_CMP0025=NEW -Wno-dev -DCURSES_CURSES_LIBRARY=/opt/local/lib/libcurses.dylib -DCURSES_FORM_LIBRARY=/opt/local/lib/libform.dylib -DCURSES_INCLUDE_PATH=/opt/local/include -DCURSES_LIBRARY=/opt/local/lib/libcurses.dylib -DCURSES_NCURSES_LIBRARY=/opt/local/lib/libncurses.dylib -DUHD_GIT_COUNT="MacPorts" -DUHD_GIT_HASH="Release" -DPKG_LIB_DIR=/opt/local/share/uhd -DCMAKE_MODULES_DIR=/opt/local/share/cmake -DCMAKE_CXX_EXTENSIONS=OFF -DCMAKE_C_EXTENSIONS=OFF -DPYTHON_EXECUTABLE=/opt/local/Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7 -DENABLE_PYTHON3=ON -DENABLE_E300=ON -DENABLE_PYTHON_API=OFF -DENABLE_TESTS=ON -DENABLE_EXAMPLES=ON -DENABLE_USB=ON -DLIBUSB_INCLUDE_DIRS=/opt/local/include/libusb-1.0 -DENABLE_DOXYGEN=ON -DENABLE_MANUAL=ON -DENABLE_MAN_PAGES=ON -DENABLE_PYTHON_API=ON -DPYTHON_INCLUDE_DIR=/opt/local/Library/Frameworks/Python.framework/Versions/3.7/Headers -DPYTHON_LIBRARY=/opt/local/Library/Frameworks/Python.framework/Versions/3.7/Python -DUHD_PYTHON_DIR=/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages -DCMAKE_C_FLAGS_RELEASE="-DNDEBUG" -DCMAKE_CXX_FLAGS_RELEASE="-DNDEBUG" -DCMAKE_OSX_ARCHITECTURES="x86_64" -DCMAKE_OSX_DEPLOYMENT_TARGET="10.15" -DCMAKE_OSX_SYSROOT="/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk" ../uhd-3.15.0.0/host 
:info:configure Exit code: 1
:error:configure Failed to configure uhd: configure failure: command execution failed
:debug:configure Error code: NONE
:debug:configure Backtrace: configure failure: command execution failed
:debug:configure     while executing
:debug:configure "$procedure $targetname"
:error:configure See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_uhd/uhd/main.log for details.

Attachments (1)

main.log (116.6 KB) - added by nebukadnezar (Balthasar Indermuehle) 4 years ago.
uhd build log after port selfupdate (which did nothing as macports was already at the latest version)

Download all attachments as: .zip

Change History (11)

comment:1 Changed 4 years ago by nebukadnezar (Balthasar Indermuehle)

Owner: set to michaelld@…
Status: newassigned

comment:2 Changed 4 years ago by nebukadnezar (Balthasar Indermuehle)

Description: modified (diff)

comment:3 Changed 4 years ago by jmroot (Joshua Root)

Owner: changed from michaelld@… to michaelld
Port: uhd added

comment:4 Changed 4 years ago by michaelld (Michael Dickens)

Please do the following:

sudo port clean uhd
sudo port selfupdate
sudo port install uhd

and if there's still an issue, please upload the whole build log here for me to review.

comment:5 Changed 4 years ago by michaelld (Michael Dickens)

Just FYI using the latest Catalina + Xcode + MacPorts, the "uhd" port builds cleanly and runs very nicely for me.

comment:6 Changed 4 years ago by michaelld (Michael Dickens)

Something you can test ... startup whatever Python you're using to build UHD ... default is Python 3.7, then do (as Python script):

(1) from distutils.version import LooseVersion

and if that works, then:

(2) import numpy

and if that works, then:

(3) LooseVersion(numpy.__version__) >= LooseVersion ('1.17')

If something fails, then note the number here.

Changed 4 years ago by nebukadnezar (Balthasar Indermuehle)

Attachment: main.log added

uhd build log after port selfupdate (which did nothing as macports was already at the latest version)

comment:7 Changed 4 years ago by nebukadnezar (Balthasar Indermuehle)

Thanks Michael for looking into this.

I've done the clean/selfupdate/install and repeated the uhd install. It fails at the same step as before, I've attached the full build log.

python 3.7.7 is the version being used for the build according to the log.

running /opt/local/bin/python3.7 and trying to import numpy produces this error:

>>> import numpy
Traceback (most recent call last):
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/numpy/core/__init__.py", line 24, in <module>
    from . import multiarray
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/numpy/core/multiarray.py", line 14, in <module>
    from . import overrides
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/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.7/lib/python3.7/site-packages/numpy/core/_multiarray_umath.cpython-37m-darwin.so, 2): Library not loaded: /opt/local/lib/libgcc/libgfortran.5.dylib
  Referenced from: /opt/local/lib/libopenblas-r1.dylib
  Reason: image not found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/numpy/__init__.py", line 142, in <module>
    from . import core
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/numpy/core/__init__.py", line 54, in <module>
    raise ImportError(msg)
ImportError: 

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

Importing the numpy c-extensions failed.
- Try uninstalling and reinstalling numpy.
- If you have already done that, then:
  1. Check that you expected to use Python3.7 from "/opt/local/bin/python3.7",
     and that you have no directories in your PATH or PYTHONPATH that can
     interfere with the Python and numpy version "1.18.2" you're trying to use.
  2. If (1) looks fine, you can open a new issue at
     https://github.com/numpy/numpy/issues.  Please include details on:
     - how you installed Python
     - how you installed numpy
     - your operating system
     - whether or not you have multiple versions of Python installed
     - if you built from source, your compiler versions and ideally a build log

- If you're working with a numpy git repository, try `git clean -xdf`
  (removes all files not under version control) and rebuild numpy.

Note: this error has many possible causes, so please don't comment on
an existing issue about this - open a new one instead.

Original error was: dlopen(/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/numpy/core/_multiarray_umath.cpython-37m-darwin.so, 2): Library not loaded: /opt/local/lib/libgcc/libgfortran.5.dylib
  Referenced from: /opt/local/lib/libopenblas-r1.dylib
  Reason: image not found

comment:8 Changed 4 years ago by nebukadnezar (Balthasar Indermuehle)

based on these errors, I'm reinstalling py37-numpy - which found a bunch of broken libraries. Will report back here, standby...

edit: lots of broken binaries in my macports. I'm reinstalling from scratch. Removed macports completely following https://guide.macports.org/chunked/installing.macports.uninstalling.html

Last edited 4 years ago by nebukadnezar (Balthasar Indermuehle) (previous) (diff)

comment:9 Changed 4 years ago by nebukadnezar (Balthasar Indermuehle)

...and it compiled and works after a complete reinstall of macports.

Version 0, edited 4 years ago by nebukadnezar (Balthasar Indermuehle) (next)

comment:10 Changed 4 years ago by michaelld (Michael Dickens)

Resolution: fixed
Status: assignedclosed

Well done! Sometimes "cruft happens" and a reinstall is required. Thanks for reporting back & I'm closing this ticket.

Note: See TracTickets for help on using tickets.