Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in macOS 15.0: pointer being freed was not allocated (uhd #778) #59

Closed
1 task done
joergho opened this issue Dec 2, 2024 · 54 comments
Closed
1 task done
Labels
bug Something isn't working

Comments

@joergho
Copy link

joergho commented Dec 2, 2024

Solution to issue cannot be found in the documentation.

  • I checked the documentation.

Issue

Hi @ryanvolz ,

in EttusResearch/uhd#778 we (NI) have a bug report that there is a crash when using macOS 15.0 (it worked for macOS 14.x) when executing the following code:

import uhd
import time
usrp = uhd.usrp.MultiUSRP()

Console prints:

[INFO] [UHD] Mac OS; Clang version 16.0.6 ; Boost_108400; UHD_4.7.0.0-release
python(28956,0x1f0f218c0) malloc: *** error for object 0x1eee29cc0: pointer being freed was not allocated
python(28956,0x1f0f218c0) malloc: *** set a breakpoint in malloc_error_break to debug

Exact line in the code where the crash happens: https://github.com/EttusResearch/uhd/blob/a5ed1872be6d0fc36de9a7e0b508933da1f119bc/host/python/uhd/usrp/multi_usrp.py#L36

The current assumption is that building the application with Xcode is causing the issue. Another user has found that a similar problem exists with gr-osmosdr: EttusResearch/uhd#778 (comment)
When the application is built using cmake, then no crash happens. When it is built using Xcode, it crashes with the same error as above.

What is your opinion on this? Do you think a rebuild of the uhd conda package (maybe a toolchain was updated without causing a rebuild trigger?) could solve the issue (I think it might be at least worth a try)? Or would it be okay if I create a test-PR which explicitly uses a macOS 15 agent for building (https://github.com/conda-forge/uhd-feedstock/blob/main/.azure-pipelines/azure-pipelines-osx.yml#L8) so that we can check if the generated artifacts work?

Installed packages

from https://github.com/EttusResearch/uhd/issues/778#issuecomment-2509569184

❯ mamba install gnuradio       

Looking for: ['gnuradio']

conda-forge/osx-arm64                               13.2MB @   3.7MB/s  3.5s
conda-forge/noarch                                  17.5MB @   4.4MB/s  4.0s
warning  libmamba Invalid package cache, file '/Users/yiminzhao/.pyenv/versions/miniforge3-latest/pkgs/uhd-4.7.0.0-py312h11b8700_2/lib/python3.12/site-packages/uhd/usrp/libtypes.py' has incorrect size
Transaction

  Prefix: /Users/yiminzhao/.pyenv/versions/miniforge3-latest/envs/latest

  Updating specs:

   - gnuradio


  Package                           Version  Build                 Channel           Size
───────────────────────────────────────────────────────────────────────────────────────────
  Install:
───────────────────────────────────────────────────────────────────────────────────────────

  + libusb                           1.0.27  h93a5062_100          conda-forge     Cached
  + libzlib                           1.3.1  h8359307_2            conda-forge     Cached
  + gstreamer-orc                    0.4.40  hd74edd7_0            conda-forge     Cached
  + libcxx                           19.1.4  ha82da77_0            conda-forge     Cached
  + icu                                75.1  hfee45f7_0            conda-forge     Cached
  + libogg                            1.3.5  h99b78c6_0            conda-forge     Cached
  + fribidi                          1.0.10  h27ca646_0            conda-forge     Cached
  + hicolor-icon-theme                 0.17  hce30654_2            conda-forge     Cached
  + libjpeg-turbo                     3.0.0  hb547adb_1            conda-forge     Cached
  + ca-certificates               2024.8.30  hf0a4a13_0            conda-forge     Cached
  + xz                                5.2.6  h57fd34a_0            conda-forge     Cached
  + libffi                            3.4.2  h3422bc3_5            conda-forge     Cached
  + libiconv                           1.17  h0d3ecfb_2            conda-forge     Cached
  + epoxy                            1.5.10  h1c322ee_1            conda-forge     Cached
  + libopus                           1.3.1  h27ca646_1            conda-forge     Cached
  + python_abi                         3.12  5_cp312               conda-forge     Cached
  + libsodium                        1.0.20  h99b78c6_0            conda-forge     Cached
  + libcodec2                         1.2.0  hd74edd7_2            conda-forge     Cached
  + libdeflate                         1.22  hd74edd7_0            conda-forge     Cached
  + libwebp-base                      1.4.0  h93a5062_0            conda-forge     Cached
  + llvm-openmp                      19.1.4  hdb05f8b_0            conda-forge     Cached
  + ncurses                             6.5  h7bae524_1            conda-forge     Cached
  + yaml                              0.2.5  h3422bc3_2            conda-forge     Cached
  + bzip2                             1.0.8  h99b78c6_7            conda-forge     Cached
  + libexpat                          2.6.4  h286801f_0            conda-forge     Cached
  + pthread-stubs                       0.4  hd74edd7_1002         conda-forge     Cached
  + xorg-libxdmcp                     1.1.5  hd74edd7_0            conda-forge     Cached
  + xorg-libxau                      1.0.11  hd74edd7_1            conda-forge     Cached
  + lame                              3.100  h1a8c8d9_1003         conda-forge     Cached
  + libbrotlicommon                   1.1.0  hd74edd7_2            conda-forge     Cached
  + tk                               8.6.13  h5083fa2_1            conda-forge     Cached
  + libsqlite                        3.47.0  hbaaea75_1            conda-forge     Cached
  + zlib                              1.3.1  h8359307_2            conda-forge     Cached
  + libpng                           1.6.44  hc14010f_0            conda-forge     Cached
  + zstd                              1.5.6  hb46c0d2_0            conda-forge     Cached
  + mpg123                           1.32.9  hf642e45_0            conda-forge     Cached
  + qhull                            2020.2  h420ef59_5            conda-forge     Cached
  + lerc                              4.0.0  h9a09cb3_0            conda-forge     Cached
  + gmp                               6.3.0  h7bae524_2            conda-forge     Cached
  + libasprintf                      0.22.5  h8414b35_3            conda-forge     Cached
  + graphite2                        1.3.13  hebf3989_1003         conda-forge     Cached
  + pixman                           0.43.4  hebf3989_0            conda-forge     Cached
  + nspr                               4.36  h5833ebf_0            conda-forge     Cached
  + sdl2                             2.30.7  hf9b8971_0            conda-forge     Cached
  + volk                              3.1.2  hebf3989_0            conda-forge     Cached
  + portaudio                        19.7.0  h5833ebf_0            conda-forge     Cached
  + fmt                              11.0.2  h420ef59_0            conda-forge     Cached
  + libvorbis                         1.3.7  h9f76cd9_0            conda-forge     Cached
  + openssl                           3.4.0  h39f12f2_0            conda-forge     Cached
  + libintl                          0.22.5  h8414b35_3            conda-forge     Cached
  + libxml2                          2.13.5  hbbdcc80_0            conda-forge     Cached
  + libgfortran5                     13.2.0  hf226fd6_3            conda-forge     Cached
  + readline                            8.2  h92ec313_1            conda-forge     Cached
  + libedit                    3.1.20191231  hc8eb9b7_2            conda-forge     Cached
  + pcre2                             10.44  h297a79d_2            conda-forge     Cached
  + libxcb                           1.17.0  hdb1d25a_0            conda-forge     Cached
  + libbrotlienc                      1.1.0  hd74edd7_2            conda-forge     Cached
  + libbrotlidec                      1.1.0  hd74edd7_2            conda-forge     Cached
  + freetype                         2.12.1  hadb7bae_2            conda-forge     Cached
  + libboost                         1.86.0  h29978a0_2            conda-forge     Cached
  + libtiff                           4.7.0  hfce79cd_1            conda-forge     Cached
  + libasprintf-devel                0.22.5  h8414b35_3            conda-forge     Cached
  + nss                               3.107  hc555b47_0            conda-forge     Cached
  + sdl                              1.2.68  hfc12253_0            conda-forge     Cached
  + spdlog                           1.14.1  h6d8af72_1            conda-forge     Cached
  + libevent                         2.1.12  h2757513_1            conda-forge     Cached
  + mysql-common                      9.0.1  h0887d5e_2            conda-forge     Cached
  + gettext-tools                    0.22.5  h8414b35_3            conda-forge     Cached
  + libgettextpo                     0.22.5  h8414b35_3            conda-forge     Cached
  + libintl-devel                    0.22.5  h8414b35_3            conda-forge     Cached
  + libxslt                          1.1.39  h223e5b9_0            conda-forge     Cached
  + libllvm19                        19.1.4  hc4b4ae8_1            conda-forge       27MB
  + libllvm17                        17.0.6  h5090b49_2            conda-forge     Cached
  + libiio-c                           0.26  h34e41b8_0            conda-forge     Cached
  + libgfortran                       5.0.0  13_2_0_hd922786_3     conda-forge     Cached
  + krb5                             1.21.3  h237132a_0            conda-forge     Cached
  + libglib                          2.82.2  h07bd6cf_0            conda-forge     Cached
  + brotli-bin                        1.1.0  hd74edd7_2            conda-forge     Cached
  + fontconfig                       2.15.0  h1383a14_1            conda-forge     Cached
  + openjpeg                          2.5.2  h9f1df11_0            conda-forge     Cached
  + lcms2                              2.16  ha0e7c42_0            conda-forge     Cached
  + libthrift                        0.21.0  h64651cc_0            conda-forge     Cached
  + mysql-libs                        9.0.1  he9bc4e1_2            conda-forge     Cached
  + libgettextpo-devel               0.22.5  h8414b35_3            conda-forge     Cached
  + libclang13                       19.1.4  default_h81d93ff_0    conda-forge     Cached
  + libclang-cpp17                   17.0.6  default_h146c034_7    conda-forge     Cached
  + libad9361-iio-c                     0.3  ha39782d_0            conda-forge     Cached
  + libopenblas                      0.3.28  openmp_hf332438_1     conda-forge     Cached
  + fftw                             3.3.10  nompi_h6637ab6_110    conda-forge     Cached
  + zeromq                            4.3.5  hc1bb282_7            conda-forge     Cached
  + libpq                              16.6  h0224a88_0            conda-forge     Cached
  + atk-1.0                          2.38.0  hd03087b_2            conda-forge     Cached
  + gdk-pixbuf                      2.42.12  h7ddc832_0            conda-forge     Cached
  + glib-tools                       2.82.2  h25d4a46_0            conda-forge     Cached
  + brotli                            1.1.0  hd74edd7_2            conda-forge     Cached
  + gettext                          0.22.5  h8414b35_3            conda-forge     Cached
  + libblas                           3.9.0  25_osxarm64_openblas  conda-forge     Cached
  + libflac                           1.4.3  hb765f3a_0            conda-forge     Cached
  + libcblas                          3.9.0  25_osxarm64_openblas  conda-forge     Cached
  + liblapack                         3.9.0  25_osxarm64_openblas  conda-forge     Cached
  + libsndfile                        1.2.2  h9739721_1            conda-forge     Cached
  + gsl                                 2.7  h6e638da_0            conda-forge     Cached
  + font-ttf-dejavu-sans-mono          2.37  hab24e00_0            conda-forge     Cached
  + pybind11-abi                          4  hd8ed1ab_3            conda-forge     Cached
  + font-ttf-inconsolata              3.000  h77eed37_0            conda-forge     Cached
  + font-ttf-source-code-pro          2.038  h77eed37_0            conda-forge     Cached
  + font-ttf-ubuntu                    0.83  h77eed37_3            conda-forge     Cached
  + tzdata                            2024b  hc8b5060_0            conda-forge     Cached
  + fonts-conda-forge                     1  0                     conda-forge     Cached
  + fonts-conda-ecosystem                 1  0                     conda-forge     Cached
  + python                           3.12.7  h739c21a_0_cpython    conda-forge     Cached
  + cairo                            1.18.0  hb4a6bf7_3            conda-forge     Cached
  + libgirepository                  1.82.0  h607895c_0            conda-forge     Cached
  + harfbuzz                          9.0.0  h997cde5_1            conda-forge     Cached
  + pango                            1.54.0  h9ee27a3_2            conda-forge     Cached
  + librsvg                          2.58.4  h40956f1_0            conda-forge     Cached
  + gtk3                            3.24.43  h7492e44_1            conda-forge     Cached
  + wheel                            0.45.1  pyhd8ed1ab_0          conda-forge     Cached
  + setuptools                       75.6.0  pyhff2d567_1          conda-forge      774kB
  + adwaita-icon-theme                 47.0  unix_0                conda-forge     Cached
  + pip                              24.3.1  pyh8b19718_0          conda-forge     Cached
  + pycparser                          2.22  pyhd8ed1ab_0          conda-forge     Cached
  + tomli                             2.2.1  pyhd8ed1ab_0          conda-forge       19kB
  + ply                                3.11  pyhd8ed1ab_2          conda-forge     Cached
  + hyperframe                        6.0.1  pyhd8ed1ab_0          conda-forge     Cached
  + six                              1.16.0  pyh6c4a22f_0          conda-forge     Cached
  + hpack                             4.0.0  pyh9f0ad1d_0          conda-forge     Cached
  + pysocks                           1.7.1  pyha2e5f31_6          conda-forge     Cached
  + idna                               3.10  pyhd8ed1ab_0          conda-forge     Cached
  + charset-normalizer                3.4.0  pyhd8ed1ab_0          conda-forge     Cached
  + munkres                           1.1.4  pyh9f0ad1d_0          conda-forge     Cached
  + pyparsing                         3.2.0  pyhd8ed1ab_1          conda-forge     Cached
  + cycler                           0.12.1  pyhd8ed1ab_0          conda-forge     Cached
  + certifi                       2024.8.30  pyhd8ed1ab_0          conda-forge     Cached
  + toml                             0.10.2  pyhd8ed1ab_0          conda-forge     Cached
  + zipp                             3.21.0  pyhd8ed1ab_1          conda-forge       22kB
  + attrs                            24.2.0  pyh71513ae_0          conda-forge     Cached
  + pkgutil-resolve-name             1.3.10  pyhd8ed1ab_1          conda-forge     Cached
  + packaging                          24.2  pyhff2d567_1          conda-forge     Cached
  + click                             8.1.7  unix_pyh707e725_0     conda-forge     Cached
  + python-dateutil             2.9.0.post0  pyhff2d567_0          conda-forge     Cached
  + h2                                4.1.0  pyhd8ed1ab_0          conda-forge     Cached
  + importlib_resources               6.4.5  pyhd8ed1ab_0          conda-forge     Cached
  + importlib-metadata                8.5.0  pyha770c72_0          conda-forge     Cached
  + qtpy                              2.4.2  pyhdecd6ff_0          conda-forge     Cached
  + click-plugins                     1.1.1  py_0                  conda-forge     Cached
  + qdarkstyle                        3.2.3  pyhd8ed1ab_0          conda-forge     Cached
  + brotli-python                     1.1.0  py312hde4cb15_2       conda-forge     Cached
  + unicodedata2                     15.1.0  py312h0bf5046_1       conda-forge     Cached
  + pyzmq                            26.2.0  py312hf8a1cbd_3       conda-forge     Cached
  + pillow                           11.0.0  py312haf37ca6_0       conda-forge     Cached
  + kiwisolver                        1.4.7  py312h6142ec9_0       conda-forge     Cached
  + pycairo                          1.27.0  py312h798cee4_0       conda-forge     Cached
  + ruamel.yaml.clib                  0.2.8  py312h0bf5046_1       conda-forge     Cached
  + rpds-py                          0.21.0  py312hcd83bfe_0       conda-forge     Cached
  + markupsafe                        3.0.2  py312ha0ccf2a_0       conda-forge     Cached
  + pyyaml                            6.0.2  py312h024a12e_1       conda-forge     Cached
  + lxml                              5.3.0  py312ha59c1f6_2       conda-forge     Cached
  + numpy                             2.1.3  py312h94ee1e1_0       conda-forge     Cached
  + soapysdr                          0.8.1  py312h6142ec9_5       conda-forge     Cached
  + cffi                             1.17.1  py312h0fad829_0       conda-forge     Cached
  + sip                               6.8.6  py312hde4cb15_1       conda-forge     Cached
  + glib                             2.82.2  hb1db9eb_0            conda-forge     Cached
  + fonttools                        4.55.0  py312h998013c_0       conda-forge     Cached
  + pygobject                        3.50.0  py312hc4f7465_1       conda-forge     Cached
  + ruamel.yaml                      0.18.6  py312h0bf5046_1       conda-forge     Cached
  + contourpy                         1.3.1  py312hb23fbb9_0       conda-forge     Cached
  + scipy                            1.14.1  py312h20deb59_1       conda-forge     Cached
  + gnuradio-pmt                  3.10.11.0  py312h2d65830_5       conda-forge     Cached
  + zstandard                        0.23.0  py312h15fbf35_1       conda-forge     Cached
  + pyqt5-sip                       12.12.2  py312h9f69965_5       conda-forge     Cached
  + gstreamer                        1.24.7  hc3f5269_0            conda-forge     Cached
  + matplotlib-base                   3.9.2  py312h9bd0bc6_2       conda-forge     Cached
  + gst-plugins-base                 1.24.7  hb49d354_0            conda-forge     Cached
  + qt-main                         5.15.15  h7d33341_0            conda-forge     Cached
  + pyqt                             5.15.9  py312h550cae4_5       conda-forge     Cached
  + qwt                               6.3.0  h4ff56cd_0            conda-forge     Cached
  + referencing                      0.35.1  pyhd8ed1ab_0          conda-forge     Cached
  + mako                              1.3.6  pyhff2d567_0          conda-forge     Cached
  + pyqtgraph                        0.13.7  pyhd8ed1ab_0          conda-forge     Cached
  + urllib3                           2.2.3  pyhd8ed1ab_0          conda-forge     Cached
  + jsonschema-specifications     2024.10.1  pyhd8ed1ab_0          conda-forge     Cached
  + requests                         2.32.3  pyhd8ed1ab_0          conda-forge     Cached
  + jsonschema                       4.23.0  pyhd8ed1ab_0          conda-forge     Cached
  + gnuradio-core                 3.10.11.0  py312h9c444a1_5       conda-forge     Cached
  + uhd                             4.7.0.0  py312h11b8700_2       conda-forge     Cached
  + gnuradio-zeromq               3.10.11.0  py312h17788b2_5       conda-forge     Cached
  + gnuradio-video-sdl            3.10.11.0  py312h14fb442_5       conda-forge     Cached
  + gnuradio-soapy                3.10.11.0  py312h3cf95d6_5       conda-forge     Cached
  + gnuradio-qtgui                3.10.11.0  py312hd34dc92_5       conda-forge     Cached
  + gnuradio-iio                  3.10.11.0  py312hc9ed232_5       conda-forge     Cached
  + gnuradio-grc                  3.10.11.0  py312h14fb442_5       conda-forge     Cached
  + gnuradio-uhd                  3.10.11.0  py312hbfa0caa_5       conda-forge     Cached
  + gnuradio                      3.10.11.0  py312h19d1795_5       conda-forge     Cached

  Summary:

  Install: 194 packages

  Total download: 28MB

───────────────────────────────────────────────────────────────────────────────────────────


Confirm changes: [Y/n]

Environment info

Hardware: Apple Silicon (ARM64)
OS: MacOS 15.0
@joergho joergho added the bug Something isn't working label Dec 2, 2024
@joergho joergho changed the title Error in macOS 15.0: pointer being freed was not allocated #778 Error in macOS 15.0: pointer being freed was not allocated (uhd #778) Dec 2, 2024
@ryanvolz
Copy link
Contributor

ryanvolz commented Dec 2, 2024

Thanks for the report!

I quickly scanned the linked UHD bug report and nothing has jumped out to me yet. I'll have to look more closely when I have a little bit more time later this week to form some theories.

Certainly it doesn't hurt to try rebuilding just to see if something conda-forge-wide has changed. The way conda-forge works, I can't modify the Azure agent and expect to keep compatibility with other packages, but I can "re-render" the recipe to update the CI scripts to the latest versions distributed by conda-forge, so I'm trying that in #60. Fresh build logs will also give us something to inspect to look for problems.

@joergho
Copy link
Author

joergho commented Dec 2, 2024

Hi! Thanks @ryanvolz for starting the re-rendering in PR #60. I see that there is a change in run_osx_buils.sh which now does a desitinction if it is arm64 architecture or not:

if [[ "$(uname -m)" == "arm64" ]]; then
osx_arch="osx-arm64"
else
osx_arch="osx-64"
fi
Maybe this helps.
What is your further plan for this PR? Merge it if all tests pass? If I understand it correctly, the new build should then be available in conda-forge soon after the PR was merged, correct?

@ryanvolz
Copy link
Contributor

ryanvolz commented Dec 2, 2024

Yes, I will merge it if the build succeeds and then it will be available for folks to test. If that doesn't just fix it, then we can work from there.

@joergho
Copy link
Author

joergho commented Dec 2, 2024

BTW, while we are already talking: We (UHD maintainers) plan to take your patches 0002...0006 mainline, if you don't mind.

@michaelld
Copy link

@ryanvolz Long time! I hope you're doing well & thanks for keeping RadioConda going!

My primary wondering right now is whether the provided Python 3.12, which is built using (I'm guessing Apple) Clang 14 can work with the provided UHD if it is not built with the same Clang. In MacPorts we fixed the various compilers to use the same underlying libraries so that they can be intermixed with very high success rate; IDK if the same applies to Conda.

I haven't been active on MacPorts for nearly 2 years, so I had to reinstall everything from scratch yesterday, but once done UHD worked as expected -- both the executables as well as the Python API. I'm guessing compiling everything from source helps :) Today I will move the current MP installs to a separate directory & have MP install from precompiled binary to see if that works.

@ryanvolz
Copy link
Contributor

ryanvolz commented Dec 2, 2024

BTW, while we are already talking: We (UHD maintainers) plan to take your patches 0002...0006 mainline, if you don't mind.

Sure! Saves me from having to figure out what's broadly useful and remember to submit them...

@ryanvolz Long time! I hope you're doing well & thanks for keeping RadioConda going!

Thanks for leading the way in the Apple world on MacPorts since before Radioconda was even a thing! I remember it being really helpful to see what you'd done in MacPorts in getting everything to work in conda-forge initially. Especially since I'm not myself a Mac user!

My primary wondering right now is whether the provided Python 3.12, which is built using (I'm guessing Apple) Clang 14 can work with the provided UHD if it is not built with the same Clang. In MacPorts we fixed the various compilers to use the same underlying libraries so that they can be intermixed with very high success rate; IDK if the same applies to Conda.

Without still having looked into it further, I do suspect something along these lines. The conda-forge Python and compiler stack maintainers definitely take pains with things like that, but I haven't been tracking conda-forge closely enough over the past few months to know if anything has changed. That's why my primary hope is that they've already done some hard work that will fix it and be picked up in the rebuilt package (that should be available in 30-60 minutes).

@michaelld
Copy link

@ryanvolz I followed the instructions in your uhd-feedstock for "Installing uhd". This provides Forge python3.12, which is compiled with clang 16.0.6 & is consistent with that used to compile UHD. This install performs "import uhd" just fine. This reinforces my belief that it's a mixed compiler issue & also that this is not a UHD issue.

@doctormin
Copy link

Thanks! I've upgraded to the newest build of uhd from conda-forge.
mamba update --all

- uhd                4.7.0.0  py312h11b8700_2  conda-forge     Cached
+ uhd                4.7.0.0  py312hcf98d66_3  conda-forge        5MB

Unfortunately, this issue persists.

[INFO] [UHD] Mac OS; Clang version 18.1.8 ; Boost_108600; UHD_4.7.0.0-release
python(4789,0x207010240) malloc: *** error for object 0x204be1cc0: pointer being freed was not allocated
python(4789,0x207010240) malloc: *** set a breakpoint in malloc_error_break to debug
[1]    4789 abort      python usrp_setting.py

(Copied from: EttusResearch/uhd#778 (comment))

@michaelld
Copy link

@doctormin what is the text printed out when executing "python3.12". Here's what I see: "Python 3.12.2 | packaged by conda-forge | (main, Feb 16 2024, 20:54:21) [Clang 16.0.6 ] on darwin". Note that the compiler here is Clang 16 whereas the compiler for UHD in yours is Clang 18.

While it is possible to mix compilers even after building, the background libraries have to be consistently use for both compiler builds, so that the compilers can build interoperable binaries. MacPorts does all of this intentionally so that they can intermix various Clang both from Apple and MacPorts built along with different GCC and GFORTRAN. MacPorts provides prebuilt binaries where possible; some code just has to be compiled locally for it to work & they note this in the build script.

I have never used Conda / Forge / Mamba (etc) before this, so I have no idea how everything works ... in this specific case meaning: (1) how is the source built to create the binaries to distribute? (2) can we build from source locally? (3) can we control which prebuilt binary we install via a selection of the compiler used to build it? (4) are common libraries used for all compilers (a la MacPorts)?

IDK the answer to (1); for the rest my gut says: no, no, and no ... basically it is up to the end-user to make sure all of the needed alignment is in place. Most of the time this works seamlessly, but when it fails it fails poorly (not robustly). Just gut beliefs: I might be totally wrong. As note: I have never used Conda / Forge / Mamba (etc) before this

@ryanvolz
Copy link
Contributor

ryanvolz commented Dec 4, 2024

I looked through the most recent build log and didn't see anything that would point me to problems. There are some compiler warnings, but I think that's typical. Maybe one of those is relevant though and I'm not catching it.

I have never used Conda / Forge / Mamba (etc) before this, so I have no idea how everything works ... in this specific case meaning: (1) how is the source built to create the binaries to distribute? (2) can we build from source locally? (3) can we control which prebuilt binary we install via a selection of the compiler used to build it? (4) are common libraries used for all compilers (a la MacPorts)?

(1) There's a build matrix that covers the different platforms and Python versions. The build follows the recipe in this feedstock. Packages end up with dependencies that restrict the installation to compatible builds, ensuring that e.g. the C++ stdlib is compatible. Conda-forge also has ecosystem-wide "pins" to ensure that the versions of dependencies that we build against are uniform with everything else (that's one reason to re-render and re-build, to pick up updates in the global "pins").

(2) Not as easily as something like MacPorts, but it is possible to use conda-build to build the recipe in this feedstock locally.

(3) One can install particular builds of packages by specifying the full version+build string, but there's not an easy way to select by what compiler a package was built with.

(4) Yes, common libraries are used. The way this may fall apart is if the library versions that are assumed to be compatible and are manifested in dependencies aren't actually compatible. This can happen if the upstream makes an incompatible change without appropriately changing the version number, or if the conda-forge build has a subtle problem, or if the conda-forge maintainers made a compatibility assumption that is incorrect.

It's harder to get and keep (4) right with MacOS arm64 since the free CI infrastructure hasn't thus far allowed automated testing of those packages. Hopefully that is close to changing.


My next step will be to see if I can find any similar reports in other conda-forge packages that could point to a wider problem. I'm suspicious of that since the important change seems to be between MacOS versions.

Any further clues from folks who can test this would be most welcome.

@joergho
Copy link
Author

joergho commented Dec 4, 2024

Hi @ryanvolz , I just spotted

2024-12-02T15:25:18.9854240Z CMake Warning:
2024-12-02T15:25:18.9855890Z   Manually-specified variables were not used by the project:
2024-12-02T15:25:18.9856450Z 
2024-12-02T15:25:18.9856850Z     CMAKE_LIBTOOL

In the log file. The cmake command line arguments sets this to $BUILD_PREFIX/bin/arm64-apple-darwin20.0.0-libtool but according to the warning, this value is not applied. Maybe this is already the root cause of the issue...?!

@ryanvolz
Copy link
Contributor

ryanvolz commented Dec 4, 2024

Hi @ryanvolz , I just spotted

2024-12-02T15:25:18.9854240Z CMake Warning:
2024-12-02T15:25:18.9855890Z   Manually-specified variables were not used by the project:
2024-12-02T15:25:18.9856450Z 
2024-12-02T15:25:18.9856850Z     CMAKE_LIBTOOL

In the log file. The cmake command line arguments sets this to $BUILD_PREFIX/bin/arm64-apple-darwin20.0.0-libtool but according to the warning, this value is not applied. Maybe this is already the root cause of the issue...?!

I think CMAKE_LIBTOOL comes in from settings provided by the conda-forge compiler package just in case the build needs it, and in this case I don't think it's needed. Unless there's a libtool error/warning somewhere else, it's probably fine.

@ryanvolz
Copy link
Contributor

ryanvolz commented Dec 4, 2024

Another thing I just thought of: I've known pybind to cause hard-to-track-down issues kinda like this before. I think uhd 4.7 switched to allowing using a system-provided pybind (which this build does) instead of an internal pybind. It's very possible that this is now causing problems.

Does the uhd 4.6 package show this error? If it does, that would probably rule out pybind issues. If it doesn't, then we might be onto something. (You can install uhd 4.6 with conda install "uhd=4.6".)

@michaelld
Copy link

CMAKE_LIBTOOL makes no difference here since it is not used (according to CMake)

@michaelld
Copy link

@ryanvolz thanks for the info on Conda about background libraries. That's great! I'm assuming the background libraries work for both Conda and Apple compilers ... yes?

This could still be a more general compiler issue, but I agree with you that it's most likely something to do with PyBind11 as the interface between UHD and Python. Maybe mixing and matching system and Conda versions? I'm not a PyBind11 expert by any means to know how it works and what it links to.

@michaelld
Copy link

Using miniforge for all installs seems to provide working UHD 4.7 <-> Python 3.12; at least "import uhd" works

@ryanvolz
Copy link
Contributor

ryanvolz commented Dec 4, 2024

@ryanvolz thanks for the info on Conda about background libraries. That's great! I'm assuming the background libraries work for both Conda and Apple compilers ... yes?

I think conda-forge optionally supports GCC as well, but I don't think it's widespread. So they've probably done the work to make things as compiler-agnostic as practical. I'm not sure about Apple compilers. It's uncommon for anyone to build locally for use within a conda environment and even have the ability to use a different compiler.

Does the uhd 4.6 package show this error? If it does, that would probably rule out pybind issues. If it doesn't, then we might be onto something. (You can install uhd 4.6 with conda install "uhd=4.6".)

I just reminded myself that despite the change in uhd's CMake build script, I've actually been using the external conda-forge pybind11 for quite a while, so testing uhd 4.6 probably won't tell us whether it's a pybind issue or not.

@kgarrels
Copy link

kgarrels commented Dec 4, 2024

Using miniforge for all installs seems to provide working UHD 4.7 <-> Python 3.12; at least "import uhd" works

You need to do more than the import:

import uhd
usrp = uhd.usrp.MultiUSRP()

the crash happens in the last line.

I tried with uhd 4.6, same issue.

@michaelld
Copy link

Ah ... OK it used to be that "import uhd" caused the crash, so we've progressed beyond the basics now :)

Yes issuing 'usrp = uhd.usrp.MultiUSRP()' in UHD 4.6 causes the noted crash for me. Let me try UHD 4.7

@michaelld
Copy link

Double checked now & the above works fine within MacPorts. The Python examples also work when using the Python that UHD was installed to use (python3.12 from MacPorts; not the system Python)

@kgarrels
Copy link

kgarrels commented Dec 5, 2024

Forced to use python=3.13.1, bug still there:

Python 3.13.1 | packaged by conda-forge | (main, Dec  5 2024, 08:44:03) [Clang 18.1.8 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import uhd
>>> usrp = uhd.usrp.MultiUSRP()
[INFO] [UHD] Mac OS; Clang version 18.1.8 ; Boost_108600; UHD_4.7.0.0-release
python(28949,0x1fcc3f840) malloc: *** error for object 0x1fab1dcc0: pointer being freed was not allocated
python(28949,0x1fcc3f840) malloc: *** set a breakpoint in malloc_error_break to debug
zsh: abort      python

@michaelld
Copy link

@kgarrels can you run "lldb python3.12" and do the same & then when it breaks to "bt" and provide that listing here?

@kgarrels
Copy link

kgarrels commented Dec 5, 2024

oh my, what is that? Like so...? This is the default python in conda,

(lldb) r
Process 50484 launched: '/Users/kaigarrels/radioconda/bin/python' (arm64)
Python 3.10.14 | packaged by conda-forge | (main, Mar 20 2024, 12:51:49) [Clang 16.0.6 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import uhd
>>> usrp = uhd.usrp.MultiUSRP()
[INFO] [UHD] Mac OS; Clang version 16.0.6 ; Boost_108200; UHD_4.6.0.0-release
python(50484,0x1f8da3840) malloc: *** error for object 0x1f6c81cc0: pointer being freed was not allocated
python(50484,0x1f8da3840) malloc: *** set a breakpoint in malloc_error_break to debug
Process 50484 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
    frame #0: 0x0000000193c56600 libsystem_kernel.dylib`__pthread_kill + 8
libsystem_kernel.dylib`__pthread_kill:
->  0x193c56600 <+8>:  b.lo   0x193c56620    ; <+40>
    0x193c56604 <+12>: pacibsp 
    0x193c56608 <+16>: stp    x29, x30, [sp, #-0x10]!
    0x193c5660c <+20>: mov    x29, sp
Target 0: (python) stopped.
(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
  * frame #0: 0x0000000193c56600 libsystem_kernel.dylib`__pthread_kill + 8
    frame #1: 0x0000000193c8ef70 libsystem_pthread.dylib`pthread_kill + 288
    frame #2: 0x0000000193b9b908 libsystem_c.dylib`abort + 128
    frame #3: 0x0000000193aa5524 libsystem_malloc.dylib`malloc_vreport + 896
    frame #4: 0x0000000193aa90a8 libsystem_malloc.dylib`malloc_report + 64
    frame #5: 0x0000000193ac71a4 libsystem_malloc.dylib`find_zone_and_free + 528
    frame #6: 0x0000000100a2ac44 libc++.1.0.dylib`std::__1::locale::~locale() + 72
    frame #7: 0x0000000100989440 libboost_serialization.dylib`boost::archive::basic_text_oprimitive<std::__1::basic_ostream<char, std::__1::char_traits<char>>>::basic_text_oprimitive(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, bool) + 348
    frame #8: 0x000000010098f8e8 libboost_serialization.dylib`boost::archive::text_oarchive_impl<boost::archive::text_oarchive>::text_oarchive_impl(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, unsigned int) + 40
    frame #9: 0x00000001029709ec libuhd.4.6.0.dylib`uhd::usrprio_rpc::boost_serialization_archive_utils::get_version() + 188
    frame #10: 0x000000010296fbfc libuhd.4.6.0.dylib`uhd::usrprio_rpc::rpc_client::rpc_client(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, unsigned int, unsigned int) + 324
    frame #11: 0x00000001029759c4 libuhd.4.6.0.dylib`uhd::usrprio_rpc::usrprio_rpc_client::usrprio_rpc_client(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>) + 64
    frame #12: 0x0000000102979030 libuhd.4.6.0.dylib`uhd::niusrprio::niusrprio_session::enumerate(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::vector<uhd::usrprio_rpc::usrprio_device_info, std::__1::allocator<uhd::usrprio_rpc::usrprio_device_info>>&) + 100
    frame #13: 0x000000010286e788 libuhd.4.6.0.dylib`uhd::usrp::x300::pcie_manager::find(uhd::device_addr_t const&, bool) + 332
    frame #14: 0x00000001028314b4 libuhd.4.6.0.dylib`x300_find(uhd::device_addr_t const&) + 2968
    frame #15: 0x00000001029eb6d4 libuhd.4.6.0.dylib`uhd::device::make(uhd::device_addr_t const&, uhd::device::device_filter_t, unsigned long) + 232
    frame #16: 0x00000001021e1368 libuhd.4.6.0.dylib`uhd::usrp::multi_usrp::make(uhd::device_addr_t const&) + 324
    frame #17: 0x0000000100d58570 libpyuhd.cpython-310-darwin.so`void pybind11::detail::initimpl::factory<std::__1::shared_ptr<uhd::usrp::multi_usrp> (*)(uhd::device_addr_t const&), pybind11::detail::void_type (*)(), std::__1::shared_ptr<uhd::usrp::multi_usrp> (uhd::device_addr_t const&), pybind11::detail::void_type ()>::execute<pybind11::class_<uhd::usrp::multi_usrp, std::__1::shared_ptr<uhd::usrp::multi_usrp>>>(pybind11::class_<uhd::usrp::multi_usrp, std::__1::shared_ptr<uhd::usrp::multi_usrp>>&) &&::'lambda'(pybind11::detail::value_and_holder&, uhd::device_addr_t const&)::operator()(pybind11::detail::value_and_holder&, uhd::device_addr_t const&) const + 52
    frame #18: 0x0000000100d584bc libpyuhd.cpython-310-darwin.so`void pybind11::cpp_function::initialize<void pybind11::detail::initimpl::factory<std::__1::shared_ptr<uhd::usrp::multi_usrp> (*)(uhd::device_addr_t const&), pybind11::detail::void_type (*)(), std::__1::shared_ptr<uhd::usrp::multi_usrp> (uhd::device_addr_t const&), pybind11::detail::void_type ()>::execute<pybind11::class_<uhd::usrp::multi_usrp, std::__1::shared_ptr<uhd::usrp::multi_usrp>>>(pybind11::class_<uhd::usrp::multi_usrp, std::__1::shared_ptr<uhd::usrp::multi_usrp>>&) &&::'lambda'(pybind11::detail::value_and_holder&, uhd::device_addr_t const&), void, pybind11::detail::value_and_holder&, uhd::device_addr_t const&, pybind11::name, pybind11::is_method, pybind11::sibling, pybind11::detail::is_new_style_constructor>(pybind11::class_<uhd::usrp::multi_usrp, std::__1::shared_ptr<uhd::usrp::multi_usrp>>&&, void (*)(pybind11::detail::value_and_holder&, uhd::device_addr_t const&), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&, pybind11::detail::is_new_style_constructor const&)::'lambda'(pybind11::detail::function_call&)::operator()(pybind11::detail::function_call&) const + 160
    frame #19: 0x0000000100d583f4 libpyuhd.cpython-310-darwin.so`void pybind11::cpp_function::initialize<void pybind11::detail::initimpl::factory<std::__1::shared_ptr<uhd::usrp::multi_usrp> (*)(uhd::device_addr_t const&), pybind11::detail::void_type (*)(), std::__1::shared_ptr<uhd::usrp::multi_usrp> (uhd::device_addr_t const&), pybind11::detail::void_type ()>::execute<pybind11::class_<uhd::usrp::multi_usrp, std::__1::shared_ptr<uhd::usrp::multi_usrp>>>(pybind11::class_<uhd::usrp::multi_usrp, std::__1::shared_ptr<uhd::usrp::multi_usrp>>&) &&::'lambda'(pybind11::detail::value_and_holder&, uhd::device_addr_t const&), void, pybind11::detail::value_and_holder&, uhd::device_addr_t const&, pybind11::name, pybind11::is_method, pybind11::sibling, pybind11::detail::is_new_style_constructor>(pybind11::class_<uhd::usrp::multi_usrp, std::__1::shared_ptr<uhd::usrp::multi_usrp>>&&, void (*)(pybind11::detail::value_and_holder&, uhd::device_addr_t const&), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&, pybind11::detail::is_new_style_constructor const&)::'lambda'(pybind11::detail::function_call&)::__invoke(pybind11::detail::function_call&) + 40
    frame #20: 0x0000000100c6c074 libpyuhd.cpython-310-darwin.so`pybind11::cpp_function::dispatcher(_object*, _object*, _object*) + 4648
    frame #21: 0x00000001000aab3c python`cfunction_call + 80
    frame #22: 0x000000010005759c python`_PyObject_MakeTpCall + 612
    frame #23: 0x000000010005accc python`method_vectorcall + 276
    frame #24: 0x0000000100149540 python`call_function + 524
    frame #25: 0x0000000100144e60 python`_PyEval_EvalFrameDefault + 24940
    frame #26: 0x000000010013e364 python`_PyEval_Vector + 2036
    frame #27: 0x0000000100057850 python`_PyObject_FastCallDictTstate + 320
    frame #28: 0x0000000100058454 python`_PyObject_Call_Prepend + 176
    frame #29: 0x00000001000cf394 python`slot_tp_init + 116
    frame #30: 0x00000001000c7d64 python`type_call + 456
    frame #31: 0x0000000100c67524 libpyuhd.cpython-310-darwin.so`pybind11_meta_call + 56
    frame #32: 0x000000010005759c python`_PyObject_MakeTpCall + 612
    frame #33: 0x00000001001495d8 python`call_function + 676
    frame #34: 0x0000000100144e60 python`_PyEval_EvalFrameDefault + 24940
    frame #35: 0x000000010013e364 python`_PyEval_Vector + 2036
    frame #36: 0x0000000100199398 python`run_mod + 216
    frame #37: 0x0000000100199a00 python`PyRun_InteractiveOneObjectEx + 944
    frame #38: 0x0000000100198834 python`_PyRun_InteractiveLoopObject + 428
    frame #39: 0x0000000100197d9c python`_PyRun_AnyFileObject + 112
    frame #40: 0x000000010019bb24 python`PyRun_AnyFileExFlags + 184
    frame #41: 0x00000001001bca84 python`Py_RunMain + 2736
    frame #42: 0x00000001001bda54 python`pymain_main + 1180
    frame #43: 0x000000010000131c python`main + 56
    frame #44: 0x000000019390c274 dyld`start + 2840
(lldb) 

@michaelld
Copy link

@kgarrels great; thx! Which version of Boost is UHD linked to?

@michaelld
Copy link

duh: Boost_108200

@michaelld
Copy link

hmmm ... let me try that Boost version in MacPorts ... the debug log I have is basically identical to yours so maybe the issue is not Boost

@michaelld
Copy link

hmm ... no Boost 1.82 or newer in MP yet ... can you try building UHD with Boost 1.81? that's working for me in MP

@kgarrels
Copy link

kgarrels commented Dec 5, 2024

we also had this earlier
[INFO] [UHD] Mac OS; Clang version 16.0.6 ; Boost_108400; UHD_4.7.0.0-release

@michaelld
Copy link

michaelld commented Dec 5, 2024

did that work in Python all the way to instantiating the USRP object? The boost version is 1.84 there ... looking for 1.81

@kgarrels
Copy link

kgarrels commented Dec 5, 2024

it also crahed...

hmm ... no Boost 1.82 or newer in MP yet ... can you try building UHD with Boost 1.81? that's working for me in MP

ok, you want to go back? I can try, not today, I hope tomorrow afternoon.
Good night!

@ryanvolz
Copy link
Contributor

ryanvolz commented Dec 5, 2024

I'll try a build with Boost 1.81 in #61.

@michaelld
Copy link

I will look into getting Boost 1.82 into MacPorts, even just a local install, to see if I get issues with it

@michaelld
Copy link

Boost 1.82 works fine. Running otool -L on libuhd and the Python lib, MacPorts does not use @RPATH anywhere. I don't think that's the issue here anyway, but worth noting.

@kgarrels
Copy link

kgarrels commented Dec 6, 2024

problem does not occur with uhd=4.1.0.5, and starts to happen with udh=4.2.0.0:

Updating specs:

   - uhd=4.1.0.5
   - ca-certificates
   - openssl


  Package                 Version  Build                 Channel           Size
─────────────────────────────────────────────────────────────────────────────────
  Install:
─────────────────────────────────────────────────────────────────────────────────

  + libcxx                 19.1.5  ha82da77_0            conda-forge     Cached
  + libusb                 1.0.27  h93a5062_100          conda-forge     Cached
  + ncurses                   6.5  h7bae524_1            conda-forge     Cached
  + python_abi               3.10  5_cp310               conda-forge     Cached
  + bzip2                   1.0.8  h99b78c6_7            conda-forge     Cached
  + libzlib                 1.3.1  h8359307_2            conda-forge     Cached
  + liblzma                 5.6.3  h39f12f2_1            conda-forge     Cached
  + yaml                    0.2.5  h3422bc3_2            conda-forge     Cached
  + libffi                  3.4.2  h3422bc3_5            conda-forge     Cached
  + llvm-openmp            19.1.5  hdb05f8b_0            conda-forge     Cached
  + icu                      70.1  h6b3803e_0            conda-forge     Cached
  + readline                  8.2  h92ec313_1            conda-forge     Cached
  + tk                     8.6.13  h5083fa2_1            conda-forge     Cached
  + libsqlite              3.47.0  hbaaea75_1            conda-forge     Cached
  + zstd                    1.5.6  hb46c0d2_0            conda-forge     Cached
  + xz-tools                5.6.3  h39f12f2_1            conda-forge     Cached
  + xz-gpl-tools            5.6.3  h9a6d368_1            conda-forge     Cached
  + liblzma-devel           5.6.3  h39f12f2_1            conda-forge     Cached
  + libgfortran5           13.2.0  hf226fd6_3            conda-forge     Cached
  + xz                      5.6.3  h9a6d368_1            conda-forge     Cached
  + libgfortran             5.0.0  13_2_0_hd922786_3     conda-forge     Cached
  + boost-cpp              1.74.0  h1cb353e_8            conda-forge     Cached
  + libopenblas            0.3.28  openmp_hf332438_1     conda-forge     Cached
  + libblas                 3.9.0  25_osxarm64_openblas  conda-forge     Cached
  + libcblas                3.9.0  25_osxarm64_openblas  conda-forge     Cached
  + liblapack               3.9.0  25_osxarm64_openblas  conda-forge     Cached
  + tzdata                  2024b  hc8b5060_0            conda-forge     Cached
  + python                3.10.16  h870587a_1_cpython    conda-forge     Cached
  + wheel                  0.45.1  pyhd8ed1ab_1          conda-forge     Cached
  + setuptools             75.6.0  pyhff2d567_1          conda-forge     Cached
  + pip                    24.3.1  pyh8b19718_0          conda-forge     Cached
  + pycparser                2.22  pyh29332c3_1          conda-forge     Cached
  + hyperframe              6.0.1  pyhd8ed1ab_1          conda-forge     Cached
  + hpack                   4.0.0  pyhd8ed1ab_1          conda-forge     Cached
  + pysocks                 1.7.1  pyha55dd90_7          conda-forge     Cached
  + idna                     3.10  pyhd8ed1ab_1          conda-forge     Cached
  + charset-normalizer      3.4.0  pyhd8ed1ab_1          conda-forge     Cached
  + certifi             2024.8.30  pyhd8ed1ab_0          conda-forge     Cached
  + h2                      4.1.0  pyhd8ed1ab_1          conda-forge     Cached
  + brotli-python           1.1.0  py310hb4ad77e_2       conda-forge     Cached
  + numpy                  1.26.4  py310hd45542a_0       conda-forge     Cached
  + ruamel.yaml.clib        0.2.8  py310hf9df320_1       conda-forge     Cached
  + pyyaml                  6.0.2  py310h493c2e1_1       conda-forge     Cached
  + cffi                   1.17.1  py310h497396d_0       conda-forge     Cached
  + ruamel.yaml            0.18.6  py310hf9df320_1       conda-forge     Cached
  + zstandard              0.23.0  py310h2665a74_1       conda-forge     Cached
  + urllib3                 2.2.3  pyhd8ed1ab_1          conda-forge     Cached
  + requests               2.32.3  pyhd8ed1ab_1          conda-forge     Cached
  + uhd                   4.1.0.5  py310h585f25d_2       conda-forge        7MB

  Summary:

  Install: 49 packages

  Total download: 7MB

─────────────────────────────────────────────────────────────────────────────────


Confirm changes: [Y/n] y
uhd                                                  7.1MB @   1.4MB/s  5.2s

Downloading and Extracting Packages:

Preparing transaction: done
Verifying transaction: done
Executing transaction: done
python
Python 3.10.16 | packaged by conda-forge | (main, Dec  5 2024, 14:20:01) [Clang 18.1.8 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import uhd
>>> usrp = uhd.usrp.MultiUSRP()
[INFO] [UHD] Mac OS; Clang version 12.0.1 ; Boost_107400; UHD_4.1.0.5-release
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/kai/radioconda/envs/kk/lib/python3.10/site-packages/uhd/usrp/multi_usrp.py", line 30, in __init__
    super(MultiUSRP, self).__init__(args)
RuntimeError: LookupError: KeyError: No devices found for ----->
Empty Device Address
>>> 
Updating specs:

   - uhd=4.2.0.0
   - ca-certificates
   - openssl


  Package                 Version  Build                 Channel           Size
─────────────────────────────────────────────────────────────────────────────────
  Install:
─────────────────────────────────────────────────────────────────────────────────

  + libcxx                 19.1.5  ha82da77_0            conda-forge     Cached
  + libusb                 1.0.27  h93a5062_100          conda-forge     Cached
  + ncurses                   6.5  h7bae524_1            conda-forge     Cached
  + python_abi               3.10  5_cp310               conda-forge     Cached
  + bzip2                   1.0.8  h99b78c6_7            conda-forge     Cached
  + libzlib                 1.3.1  h8359307_2            conda-forge     Cached
  + liblzma                 5.6.3  h39f12f2_1            conda-forge     Cached
  + yaml                    0.2.5  h3422bc3_2            conda-forge     Cached
  + libffi                  3.4.2  h3422bc3_5            conda-forge     Cached
  + llvm-openmp            19.1.5  hdb05f8b_0            conda-forge     Cached
  + icu                      70.1  h6b3803e_0            conda-forge     Cached
  + readline                  8.2  h92ec313_1            conda-forge     Cached
  + tk                     8.6.13  h5083fa2_1            conda-forge     Cached
  + libsqlite              3.47.0  hbaaea75_1            conda-forge     Cached
  + zstd                    1.5.6  hb46c0d2_0            conda-forge     Cached
  + xz-tools                5.6.3  h39f12f2_1            conda-forge     Cached
  + xz-gpl-tools            5.6.3  h9a6d368_1            conda-forge     Cached
  + liblzma-devel           5.6.3  h39f12f2_1            conda-forge     Cached
  + libgfortran5           13.2.0  hf226fd6_3            conda-forge     Cached
  + xz                      5.6.3  h9a6d368_1            conda-forge     Cached
  + libgfortran             5.0.0  13_2_0_hd922786_3     conda-forge     Cached
  + boost-cpp              1.74.0  h1cb353e_8            conda-forge     Cached
  + libopenblas            0.3.28  openmp_hf332438_1     conda-forge     Cached
  + libblas                 3.9.0  25_osxarm64_openblas  conda-forge     Cached
  + libcblas                3.9.0  25_osxarm64_openblas  conda-forge     Cached
  + liblapack               3.9.0  25_osxarm64_openblas  conda-forge     Cached
  + tzdata                  2024b  hc8b5060_0            conda-forge     Cached
  + python                3.10.16  h870587a_1_cpython    conda-forge       12MB
  + wheel                  0.45.1  pyhd8ed1ab_1          conda-forge     Cached
  + setuptools             75.6.0  pyhff2d567_1          conda-forge     Cached
  + pip                    24.3.1  pyh8b19718_0          conda-forge     Cached
  + pycparser                2.22  pyh29332c3_1          conda-forge     Cached
  + hyperframe              6.0.1  pyhd8ed1ab_1          conda-forge     Cached
  + hpack                   4.0.0  pyhd8ed1ab_1          conda-forge     Cached
  + pysocks                 1.7.1  pyha55dd90_7          conda-forge     Cached
  + idna                     3.10  pyhd8ed1ab_1          conda-forge     Cached
  + charset-normalizer      3.4.0  pyhd8ed1ab_1          conda-forge     Cached
  + certifi             2024.8.30  pyhd8ed1ab_0          conda-forge     Cached
  + h2                      4.1.0  pyhd8ed1ab_1          conda-forge     Cached
  + brotli-python           1.1.0  py310hb4ad77e_2       conda-forge     Cached
  + numpy                  1.26.4  py310hd45542a_0       conda-forge     Cached
  + ruamel.yaml.clib        0.2.8  py310hf9df320_1       conda-forge     Cached
  + pyyaml                  6.0.2  py310h493c2e1_1       conda-forge     Cached
  + cffi                   1.17.1  py310h497396d_0       conda-forge     Cached
  + ruamel.yaml            0.18.6  py310hf9df320_1       conda-forge     Cached
  + zstandard              0.23.0  py310h2665a74_1       conda-forge     Cached
  + urllib3                 2.2.3  pyhd8ed1ab_1          conda-forge     Cached
  + requests               2.32.3  pyhd8ed1ab_1          conda-forge     Cached
  + uhd                   4.2.0.0  py310h585f25d_0       conda-forge        7MB

  Summary:

  Install: 49 packages

  Total download: 19MB

─────────────────────────────────────────────────────────────────────────────────


Confirm changes: [Y/n] y
python                                              12.4MB @   8.6MB/s  1.4s
uhd                                                  7.1MB @   2.3MB/s  3.1s

Downloading and Extracting Packages:

Preparing transaction: done
Verifying transaction: done
Executing transaction: done
python
Python 3.10.16 | packaged by conda-forge | (main, Dec  5 2024, 14:20:01) [Clang 18.1.8 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import uhd
>>> usrp = uhd.usrp.MultiUSRP()
[INFO] [UHD] Mac OS; Clang version 12.0.1 ; Boost_107400; UHD_4.2.0.0-release
python(67835,0x1fcc3f840) malloc: *** error for object 0x1fab1dcc0: pointer being freed was not allocated
python(67835,0x1fcc3f840) malloc: *** set a breakpoint in malloc_error_break to debug
zsh: abort      python

@ryanvolz
Copy link
Contributor

ryanvolz commented Dec 6, 2024

problem does not occur with uhd=4.0.0.0, and start to happen with udh=4.1.0.5:

The output seems to indicate that the transition was uhd 4.1 to 4.2.

Very interesting result. It looks like all of the packages are the same between those two installs, except for uhd. So what changed between 4.1 and 4.2?

@kgarrels
Copy link

kgarrels commented Dec 6, 2024

uhd release notes for 4.2, uhdboost?

cmake
mpm: Skip installing binaries for SIM
doxygen: Make MATHJAX_RELPATH configurable via CMake
ncurses: fix building with split tinfo
Remove libatomic check on macOS
Added libatomic check for boost/lockfree/queue.hpp
uhdboost: Fix check for UHD_BOOST_REQUIRED being set
Replace distutils.sysconfig with sysconfig
Replace distutils with CMake for version checks
Set debug to -Og for Clang builds
tests: Conditionally compile tests for X400
Use LooseVersion to ensure correct version comparisons
Fix rfnoc-example (CMake paths)
Fix issues with static builds and CMRC
Replace CMAKE_{SOURCE,BINARY}DIR with UHD*_DIR
tests: Add build-python path to PYTHONPATH
Add check for libatomic linking requirement
Remove duplicate entry in LIBUHD_PYTHON_GEN_SOURCE
Fix VS names and use relative for images
remove redundant include
Correctly set and unset any CMAKE_REQUIRED variables
Fix finding PkgConfig to work robustly (without CMake warnings)

@kgarrels
Copy link

kgarrels commented Dec 6, 2024

problem does not occur with uhd=4.0.0.0, and start to happen with udh=4.1.0.5:

The output seems to indicate that the transition was uhd 4.1 to 4.2.

Very interesting result. It looks like all of the packages are the same between those two installs, except for uhd. So what changed between 4.1 and 4.2?

I noted it wrong, this is correct, corrected above:
problem does not occur with uhd=4.1.0.5, and starts to happen with udh=4.2.0.0:

@ryanvolz
Copy link
Contributor

ryanvolz commented Dec 6, 2024

I have my eye on EttusResearch/uhd@2c7ce2d for having the potential to cause subtle issues, so my next build in #61 will patch that out.

@kgarrels
Copy link

kgarrels commented Dec 6, 2024

I everything is installed correctly with the latest versions, could I "brute force" replace uhd with the 4.1.0.5 version with conda?

@ryanvolz
Copy link
Contributor

ryanvolz commented Dec 6, 2024

I everything is installed correctly with the latest versions, could I "brute force" replace uhd with the 4.1.0.5 version with conda?

I'm not sure quite what you mean. If you're not using anything that compiles against the uhd library, then you can absolutely force install uhd==4.1.0.5 and just use that. But if you want to use the latest version of a package compiled against uhd (e.g. gnuradio), then you wouldn't be able to use the pre-built package because it was built against uhd 4.7. That said, there is some older version of gnuradio that was compiled against uhd 4.1, so if you're happy using that older version then that will work fine.

@kgarrels
Copy link

kgarrels commented Dec 6, 2024

I everything is installed correctly with the latest versions, could I "brute force" replace uhd with the 4.1.0.5 version with conda?

I'm not sure quite what you mean. If you're not using anything that compiles against the uhd library, then you can absolutely force install uhd==4.1.0.5 and just use that. But if you want to use the latest version of a package compiled against uhd (e.g. gnuradio), then you wouldn't be able to use the pre-built package because it was built against uhd 4.7. That said, there is some older version of gnuradio that was compiled against uhd 4.1, so if you're happy using that older version then that will work fine.

yes, that was my plan, does not work then...tricky.
Anyway, let's see what @michaelld says...

@kgarrels
Copy link

kgarrels commented Dec 6, 2024

I have my eye on EttusResearch/uhd@2c7ce2d for having the potential to cause subtle issues, so my next build in #61 will patch that out.

ok, how could I install it?

@joergho
Copy link
Author

joergho commented Dec 6, 2024

ok, how could I install it?

@kgarrels The artifacts are available in this build: uhd-feedstock / 20241206.2. Otherwise, follow the instructions from Ryan's comment

@kgarrels
Copy link

kgarrels commented Dec 6, 2024

works!

## Package Plan ##

  environment location: /Users/kaigarrels/radioconda/envs/kk

  added / updated specs:
    - uhd-feedstock_conda_artifacts_20241206.2.1_osx_arm64_numpy2.0python3.10.____cpython/osx-arm64::uhd==4.7.0.0=py310h9743a49_4


The following packages will be UPDATED:

  uhd                conda-forge::uhd-4.7.0.0-py310h9743a4~ --> uhd-feedstock_conda_artifacts_20241206.2.1_osx_arm64_numpy2.0python3.10.____cpython::uhd-4.7.0.0-py310h9743a49_4 



Downloading and Extracting Packages:

Preparing transaction: done
Verifying transaction: done
Executing transaction: done
(kk) kaigarrels@Mac ~ % python
Python 3.10.16 | packaged by conda-forge | (main, Dec  5 2024, 14:20:01) [Clang 18.1.8 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import uhd
>>> usrp = uhd.usrp.MultiUSRP()
[INFO] [UHD] Mac OS; Clang version 18.1.8 ; Boost_108600; UHD_4.7.0.0-release
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/kaigarrels/radioconda/envs/kk/lib/python3.10/site-packages/uhd/usrp/multi_usrp.py", line 36, in __init__
    super(MultiUSRP, self).__init__(args)
RuntimeError: LookupError: KeyError: No devices found for ----->
Empty Device Address
>>> 

You are all geniuses!

@kgarrels
Copy link

kgarrels commented Dec 6, 2024

also on my other machine, failure and resolution:

python
Python 3.13.1 | packaged by conda-forge | (main, Dec  5 2024, 21:09:18) [Clang 18.1.8 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import uhd
>>> usrp = uhd.usrp.MultiUSRP()
[INFO] [UHD] Mac OS; Clang version 18.1.8 ; Boost_108600; UHD_4.7.0.0-release
python(87099,0x1fcc3f840) malloc: *** error for object 0x1fab1dcc0: pointer being freed was not allocated
python(87099,0x1fcc3f840) malloc: *** set a breakpoint in malloc_error_break to debug
zsh: abort      python
conda install /Users/kai/Downloads/conda_artifacts_20241206.2.1_osx_arm64_numpy2python3.13.____cp313/uhd-feedstock_conda_artifacts_20241206.2.1_osx_arm64_numpy2python3.13.____cp313/osx-arm64/uhd-4.7.0.0-py313hcea3336_4.conda

Downloading and Extracting Packages:
                                                                                                                                                                               

## Package Plan ##

  environment location: /Users/kai/radioconda/envs/kk

  added / updated specs:
    - uhd-feedstock_conda_artifacts_20241206.2.1_osx_arm64_numpy2python3.13.____cp313/osx-arm64::uhd==4.7.0.0=py313hcea3336_4


The following packages will be UPDATED:

  uhd                conda-forge::uhd-4.7.0.0-py313hcea333~ --> uhd-feedstock_conda_artifacts_20241206.2.1_osx_arm64_numpy2python3.13.____cp313::uhd-4.7.0.0-py313hcea3336_4 



Downloading and Extracting Packages:

Preparing transaction: done
Verifying transaction: done
Executing transaction: done
python
Python 3.13.1 | packaged by conda-forge | (main, Dec  5 2024, 21:09:18) [Clang 18.1.8 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import uhd
>>> usrp = uhd.usrp.MultiUSRP()
[INFO] [UHD] Mac OS; Clang version 18.1.8 ; Boost_108600; UHD_4.7.0.0-release
Traceback (most recent call last):
  File "<python-input-1>", line 1, in <module>
    usrp = uhd.usrp.MultiUSRP()
  File "/Users/kai/radioconda/envs/kk/lib/python3.13/site-packages/uhd/usrp/multi_usrp.py", line 36, in __init__
    super(MultiUSRP, self).__init__(args)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
RuntimeError: LookupError: KeyError: No devices found for ----->
Empty Device Address
>>> 

@kgarrels
Copy link

kgarrels commented Dec 6, 2024

no success with python=3.10:

python
Python 3.10.16 | packaged by conda-forge | (main, Dec  5 2024, 14:20:01) [Clang 18.1.8 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import uhd
>>> usrp = uhd.usrp.MultiUSRP()
[INFO] [UHD] Mac OS; Clang version 16.0.6 ; Boost_108400; UHD_4.7.0.0-release
python(2326,0x1fcc3f840) malloc: *** error for object 0x1fab1dcc0: pointer being freed was not allocated
python(2326,0x1fcc3f840) malloc: *** set a breakpoint in malloc_error_break to debug
zsh: abort      python
conda install /Users/kai/Downloads/conda_artifacts_20241206.2.1_osx_arm64_numpy2.0python3.10.____cpython/uhd-feedstock_conda_artifacts_20241206.2.1_osx_arm64_numpy2.0python3.10.____cpython/osx-arm64/uhd-4.7.0.0-py310h9743a49_4.conda

Downloading and Extracting Packages:


## Package Plan ##

  environment location: /Users/kai/radioconda/envs/gnuradio

  added / updated specs:
    - uhd-feedstock_conda_artifacts_20241206.2.1_osx_arm64_numpy2.0python3.10.____cpython/osx-arm64::uhd==4.7.0.0=py310h9743a49_4


The following packages will be UPDATED:

  uhd                conda-forge::uhd-4.7.0.0-py310hd42cda~ --> uhd-feedstock_conda_artifacts_20241206.2.1_osx_arm64_numpy2.0python3.10.____cpython::uhd-4.7.0.0-py310h9743a49_4 



Downloading and Extracting Packages:

Preparing transaction: done
Verifying transaction: done
Executing transaction: done
python
Python 3.10.16 | packaged by conda-forge | (main, Dec  5 2024, 14:20:01) [Clang 18.1.8 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import uhd
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/kai/radioconda/envs/gnuradio/lib/python3.10/site-packages/uhd/__init__.py", line 10, in <module>
    from . import types
  File "/Users/kai/radioconda/envs/gnuradio/lib/python3.10/site-packages/uhd/types.py", line 10, in <module>
    from . import libpyuhd as lib
ImportError: dlopen(/Users/kai/radioconda/envs/gnuradio/lib/python3.10/site-packages/uhd/libpyuhd.cpython-310-darwin.so, 0x0002): Symbol not found: __ZN5boost10filesystem6detail28directory_iterator_constructERNS0_18directory_iteratorERKNS0_4pathENS0_17directory_optionsEPNS1_25directory_iterator_paramsEPNS_6system10error_codeE
  Referenced from: <4363025A-12D5-3979-A755-09FBA02BA457> /Users/kai/radioconda/envs/gnuradio/lib/libuhd.4.7.0.dylib
  Expected in:     <6DEDA6C4-E926-3F6B-A298-43A5869927BA> /Users/kai/radioconda/envs/gnuradio/lib/libboost_filesystem.dylib
>>> 

@ryanvolz
Copy link
Contributor

ryanvolz commented Dec 6, 2024

no success with python=3.10:

That looks like a dependency error caused by installing the package file directly (which bypasses dependency resolution). I'm guessing that will be fixed with a proper installation. I'll merge the test build so it goes live on conda-forge, then you can upgrade as normal and verify that it works.

@ryanvolz
Copy link
Contributor

ryanvolz commented Dec 6, 2024

The latest build should be available through conda-forge now, so please test and report back at your convenience. Thanks!

@kgarrels
Copy link

kgarrels commented Dec 6, 2024

Thanks.
Works in principle when I install uhd.
If I then install boost, it crashes again:

conda install boost
Channels:
 - conda-forge
 - defaults
 - ryanvolz
Platform: osx-arm64
Collecting package metadata (repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: /Users/kai/radioconda/envs/gnuradio

  added / updated specs:
    - boost


The following NEW packages will be INSTALLED:

  boost              conda-forge/osx-arm64::boost-1.84.0-h24597f5_7 
  libboost-devel     conda-forge/osx-arm64::libboost-devel-1.84.0-hf450f58_7 
  libboost-headers   conda-forge/osx-arm64::libboost-headers-1.84.0-hce30654_7 
  libboost-python    conda-forge/osx-arm64::libboost-python-1.84.0-py310hf1156d2_7 
  libboost-python-d~ conda-forge/osx-arm64::libboost-python-devel-1.84.0-py310h24597f5_7 

The following packages will be DOWNGRADED:

  gnuradio-core                   3.10.11.0-py310h65f229b_5 --> 3.10.11.0-py310h111d8c0_2 
  gnuradio-osmosdr                    0.2.6-py310hd634d83_4 --> 0.2.6-py310h744390e_3 
  gnuradio-pmt                    3.10.11.0-py310h002ee7d_5 --> 3.10.11.0-py310h91630d1_2 
  gnuradio-uhd                    3.10.11.0-py310h9262706_5 --> 3.10.11.0-py310h97a7fbb_2 
  libboost                                1.86.0-hc9fb7c5_3 --> 1.84.0-hc9fb7c5_7 
  libthrift                               0.21.0-h64651cc_0 --> 0.20.0-h64651cc_1 
  portaudio                               19.7.0-h5833ebf_0 --> 19.6.0-h13dd4ca_9 
  uhd                               4.7.0.0-py310h9743a49_4 --> 4.7.0.0-py310hd42cda6_0 


Proceed ([y]/n)? y


Downloading and Extracting Packages:

Preparing transaction: done
Verifying transaction: done
Executing transaction: done
python
Python 3.10.16 | packaged by conda-forge | (main, Dec  5 2024, 14:20:01) [Clang 18.1.8 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import uhd
>>> usrp = uhd.usrp.MultiUSRP()
[INFO] [UHD] Mac OS; Clang version 16.0.6 ; Boost_108400; UHD_4.7.0.0-release
python(15027,0x1fcc3f840) malloc: *** error for object 0x1fab1dcc0: pointer being freed was not allocated
python(15027,0x1fcc3f840) malloc: *** set a breakpoint in malloc_error_break to debug
zsh: abort      python

I will try a fresh install of radioconda.

@kgarrels
Copy link

kgarrels commented Dec 7, 2024

status:

  • fresh install of radioconda, new empty env
  • conda install gnuradio-core gnuradio-uhd
  • works:
python
Python 3.12.8 | packaged by conda-forge | (main, Dec  5 2024, 14:19:53) [Clang 18.1.8 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import uhd
>>> usrp = uhd.usrp.MultiUSRP()
[INFO] [UHD] Mac OS; Clang version 18.1.8 ; Boost_108600; UHD_4.7.0.0-release
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/kai/radioconda/envs/kk/lib/python3.12/site-packages/uhd/usrp/multi_usrp.py", line 36, in __init__
    super(MultiUSRP, self).__init__(args)
RuntimeError: LookupError: KeyError: No devices found for ----->
Empty Device Address
>>> 
  • add boost
  • crash:
conda install  boost
Channels:
 - conda-forge
 - defaults
 - ryanvolz
Platform: osx-arm64
Collecting package metadata (repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: /Users/kai/radioconda/envs/kk

  added / updated specs:
    - boost


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    boost-1.84.0               |       ha814d7c_7          17 KB  conda-forge
    gnuradio-core-3.10.11.0    |  py312h9c714ff_2         4.8 MB  conda-forge
    gnuradio-pmt-3.10.11.0     |  py312ha7c0959_2         246 KB  conda-forge
    gnuradio-uhd-3.10.11.0     |  py312h2890e24_2         475 KB  conda-forge
    libboost-python-1.84.0     |  py312h72cd453_7         104 KB  conda-forge
    libboost-python-devel-1.84.0|  py312ha814d7c_7          20 KB  conda-forge
    uhd-4.7.0.0                |  py312h1afdc0e_0         5.0 MB  conda-forge
    ------------------------------------------------------------
                                           Total:        10.7 MB

The following NEW packages will be INSTALLED:

  boost              conda-forge/osx-arm64::boost-1.84.0-ha814d7c_7 
  libboost-devel     conda-forge/osx-arm64::libboost-devel-1.84.0-hf450f58_7 
  libboost-headers   conda-forge/osx-arm64::libboost-headers-1.84.0-hce30654_7 
  libboost-python    conda-forge/osx-arm64::libboost-python-1.84.0-py312h72cd453_7 
  libboost-python-d~ conda-forge/osx-arm64::libboost-python-devel-1.84.0-py312ha814d7c_7 

The following packages will be DOWNGRADED:

  gnuradio-core                   3.10.11.0-py312h9c444a1_5 --> 3.10.11.0-py312h9c714ff_2 
  gnuradio-pmt                    3.10.11.0-py312h2d65830_5 --> 3.10.11.0-py312ha7c0959_2 
  gnuradio-uhd                    3.10.11.0-py312hbfa0caa_5 --> 3.10.11.0-py312h2890e24_2 
  libboost                                1.86.0-hc9fb7c5_3 --> 1.84.0-hc9fb7c5_7 
  libthrift                               0.21.0-h64651cc_0 --> 0.20.0-h64651cc_1 
  portaudio                               19.7.0-h5833ebf_0 --> 19.6.0-h13dd4ca_9 
  uhd                               4.7.0.0-py312hcf98d66_4 --> 4.7.0.0-py312h1afdc0e_0 


Proceed ([y]/n)? y


Downloading and Extracting Packages:
                                                                                                                                                                               
Preparing transaction: done                                                                                                                                                    
Verifying transaction: done                                                                                                                                                    
Executing transaction: done                                                                                                                                                    
python
Python 3.12.8 | packaged by conda-forge | (main, Dec  5 2024, 14:19:53) [Clang 18.1.8 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import uhd
>>> usrp = uhd.usrp.MultiUSRP()
[INFO] [UHD] Mac OS; Clang version 16.0.6 ; Boost_108400; UHD_4.7.0.0-release
python(48441,0x1fcc3f840) malloc: *** error for object 0x1fab1dcc0: pointer being freed was not allocated
python(48441,0x1fcc3f840) malloc: *** set a breakpoint in malloc_error_break to debug
zsh: abort      python

@kgarrels
Copy link

kgarrels commented Dec 7, 2024

If I don't install boost, but libboost-devel libboost-headers, it works.
Also Xcode now behaves as expected.

Maybe something with libboost-python?

Installing boost does this:

conda install  boost
Channels:
 - conda-forge
 - defaults
 - ryanvolz
Platform: osx-arm64
Collecting package metadata (repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: /Users/kai/radioconda/envs/kk

  added / updated specs:
    - boost


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    boost-1.84.0               |       ha814d7c_7          17 KB  conda-forge
    gnuradio-core-3.10.11.0    |  py312h9c714ff_2         4.8 MB  conda-forge
    gnuradio-pmt-3.10.11.0     |  py312ha7c0959_2         246 KB  conda-forge
    gnuradio-uhd-3.10.11.0     |  py312h2890e24_2         475 KB  conda-forge
    libboost-python-1.84.0     |  py312h72cd453_7         104 KB  conda-forge
    libboost-python-devel-1.84.0|  py312ha814d7c_7          20 KB  conda-forge
    uhd-4.7.0.0                |  py312h1afdc0e_0         5.0 MB  conda-forge
    ------------------------------------------------------------
                                           Total:        10.7 MB

The following NEW packages will be INSTALLED:

  boost              conda-forge/osx-arm64::boost-1.84.0-ha814d7c_7 
  libboost-devel     conda-forge/osx-arm64::libboost-devel-1.84.0-hf450f58_7 
  libboost-headers   conda-forge/osx-arm64::libboost-headers-1.84.0-hce30654_7 
  libboost-python    conda-forge/osx-arm64::libboost-python-1.84.0-py312h72cd453_7 
  libboost-python-d~ conda-forge/osx-arm64::libboost-python-devel-1.84.0-py312ha814d7c_7 

The following packages will be DOWNGRADED:

  gnuradio-core                   3.10.11.0-py312h9c444a1_5 --> 3.10.11.0-py312h9c714ff_2 
  gnuradio-pmt                    3.10.11.0-py312h2d65830_5 --> 3.10.11.0-py312ha7c0959_2 
  gnuradio-uhd                    3.10.11.0-py312hbfa0caa_5 --> 3.10.11.0-py312h2890e24_2 
  libboost                                1.86.0-hc9fb7c5_3 --> 1.84.0-hc9fb7c5_7 
  libthrift                               0.21.0-h64651cc_0 --> 0.20.0-h64651cc_1 
  portaudio                               19.7.0-h5833ebf_0 --> 19.6.0-h13dd4ca_9 
  uhd                               4.7.0.0-py312hcf98d66_4 --> 4.7.0.0-py312h1afdc0e_0 

@ryanvolz
Copy link
Contributor

ryanvolz commented Dec 7, 2024

Ah, I think the new package is still fine. Notice that when you install boost, it downgrades uhd to an older and therefore broken version. The boost package was renamed to libboost-python, so if you were to install the latter it wouldn't downgrade uhd and all should be well.

@kgarrels
Copy link

kgarrels commented Dec 8, 2024

ok, this works perfectly now.
Thanks again for this interesting investigation!

@joergho
Copy link
Author

joergho commented Dec 9, 2024

Thanks @ryanvolz for finding a solution!

@joergho joergho closed this as completed Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants