Post Go back to editing

iio-oscilloscope failing to build on mac os 14 Sonoma

Category: Software
Product Number: iio
Software Version: https://github.com/tfcollins/homebrew-formulae

I'm having difficulty building iio-oscilloscope using the tfcollins homebrew formula. I'm not sure if the formula has been updated to support mac os 14 Sonoma.

Basic info:

Latest error:

MB-Pro homebrew-formulae % brew install --build-from-source ./iio-oscilloscope.rb
==> Downloading formulae.brew.sh/.../formula.jws.json

Error: Failed to load cask: ./iio-oscilloscope.rb
Cask 'iio-oscilloscope' is unreadable: wrong constant name #<Class:0x0000000161c191b8>
Warning: Treating ./iio-oscilloscope.rb as a formula.
Warning: No available formula with the name "libad9361-iio" (dependency of iio-oscilloscope).
==> Searching for similarly named formulae and casks...
==> Downloading formulae.brew.sh/.../cask.jws.json

Error: No formulae or casks found for libad9361-iio.

I've encountered several errors over the course of trying to get this working and I've done several manual installations of various packages in an effort to to get past the issues. However, I think at this point it is best to connect with someone to collaborate with to get an updated formula in place for mac os Sonoma users. To that end, if anyone can guide me on resetting my environment to start the process over and work with me to diagnose and fix the problems that would be great.

Thanks in advance.

Parents
  • Hello, .

    We do not have a specific formula in place for macOS Sonoma. However, other macOS users have reported similar issues, and the tap has been updated.

    The new tap lives here:

    git clone https://github.com/tfcollins/homebrew-formulae.git -b tfcollins/update-packages

    It seems that you are also missing some dependencies. To make sure everything is installed, after cloning the repo do the following:

    brew install -f --build-from-source ./libiio.rb
    brew install -f --build-from-source ./libad9361-iio.rb
    brew install -f --build-from-source --fetch-HEAD --HEAD ./iio-oscilloscope.rb

    Let us know if this fixes your issue.

    Thanks,

    Cristina

  • Hi Cristina,

    Thank you for the prompt reply. Here is my updated progress from tonight:

    - I checked out the tfcollins/update-packages branch of the tap per. your instruction

    - I uninstalled the previous build of libiio (brew uninstall libiio)

    - I rebuilt libiio with "brew install -f --build-from-source ./libiio.rb

    - I attempted to rebuild libad9361 using your instructed build command above however I got the following error:

    denis@Denis-MB-Pro homebrew-formulae % brew install -f --build-from-source ./libad9361-iio.rb
    Error: Failed to load cask: ./libad9361-iio.rb
    Cask 'libad9361-iio' is unreadable: wrong constant name #<Class:0x000000012495ee38>
    Warning: Treating ./libad9361-iio.rb as a formula.
    ==> Fetching libad9361-iio
    ==> Downloading github.com/.../v0.3.tar.gz
    Already downloaded: /Users/denis/Library/Caches/Homebrew/downloads/2d00716f64a8c739e7b2331807e9e984aa85016f9e0816df37a8fb592624cbcd--libad9361-iio-0.3.tar.gz
    ==> cmake .. -DOSX_PACKAGE=OFF
    ==> make
    Last 15 lines from /Users/denis/Library/Logs/Homebrew/libad9361-iio/02.make:
    ^~~~~~~
    1 error generated.
    /tmp/libad9361-iio-20240620-83542-od96yf/libad9361-iio-0.3/ad9361_design_taps.c:18:10: fatal error: 'iio.h' file not found
    #include <iio.h>
    ^~~~~~~
    1 error generated.
    make[2]: *** [CMakeFiles/ad9361.dir/ad9361_baseband_auto_rate.c.o] Error 1
    make[2]: *** Waiting for unfinished jobs....
    make[2]: *** [CMakeFiles/ad9361.dir/ad9361_multichip_sync.c.o] Error 1
    1 error generated.
    make[2]: *** [CMakeFiles/ad9361.dir/ad9361_fmcomms5_phase_sync.c.o] Error 1
    1 error generated.
    make[2]: *** [CMakeFiles/ad9361.dir/ad9361_design_taps.c.o] Error 1
    make[1]: *** [CMakeFiles/ad9361.dir/all] Error 2
    make: *** [all] Error 2

    Do not report this issue to Homebrew/brew or Homebrew/homebrew-core!

    I can see the iio.h header file in the following location on my machine:

    denis@Denis-MB-Pro homebrew-formulae % ls /opt/homebrew/Cellar/libiio/0.25/Frameworks/iio.framework/Headers
    iio.h
    denis@Denis-MB-Pro homebrew-formulae % ls -l /opt/homebrew/Cellar/libiio/0.25/Frameworks/iio.framework
    total 0
    lrwxr-xr-x 1 denis admin 24 20 Jun 22:15 Headers -> Versions/Current/Headers
    lrwxr-xr-x 1 denis admin 26 20 Jun 22:15 Resources -> Versions/Current/Resources
    drwxr-xr-x 9 denis admin 288 20 Jun 22:15 Tools
    drwxr-xr-x 4 denis admin 128 20 Jun 22:15 Versions
    lrwxr-xr-x 1 denis admin 20 20 Jun 22:15 iio -> Versions/Current/iio
    denis@Denis-MB-Pro homebrew-formulae %

    What is the proper way to point to the location of the iio.h header file when attempting to build libad9361?

    Thanks,

    Denis

  • Hi, Dennis.

    You said in your initial post that you have installed some packages manually. Did you also install libiio manually?  If so , do you remember which branch of the github repository you used when building libiio manually?

    Thanks,

    Cristina


  • it’s very possible at one point I may have done a

    cmake; make; make install

    from the main branch of the libiio GitHub repo.

  • I made a bit more progress here but still not out of the woods yet.

    For getting the libad9361 to build, I manually created soft links to iio.h in /opt/homebrew/include/ as well as /opt/homebrew/include/iio/. Seemingly those soft links are not being created automatically as part of the libiio build recipe. After manually adding those soft links, the libad9361 build seemed to complete succesfully.

    That brought me to the third and final step of attempting to build the iio-oscilloscope.rb recipe. Unfortunately that is also failing, this time due to libglade being disabled in homebrew since October 2023 as it is no longer supported upstream.

    Do you have any insight on that and any possible work-arounds?

  • Hi,

    There are two separte issues here.

    1) The reason I asked about libiio is because the main branch is currently under heavy development, as we are working on releasing version 1.0. All of the projects that depend on libiio still use v0.x. What I suspect happened to you is : you installed libiio from github by building the main branch, and then you installed another version of libiio, as per the instructions in the comment above. When uninstalling the stuff you built from source, it is possible that there might some leftover artifacts, which are causing the error.  My suggestion for this is to delete everything libiio related in your system and then install the tap provided in the repo. Please bare in mind, that there are API changes in libiio v1. This means that a program compiled against libiio-v0 will not run with libiiov1 (in your case this libad9361, iio-oscilloscope).

    2) For the libglade issue, or for future similar issues with homebrew, there are a couple of solutions listed here : https://www.macphpstudy.com/help-4-6.html

    Let me know if these fix your issues.

    Thanks,

    Cristina

  • Thank you for the link above. Following those steps I was able to disable the disable line (pardon the pun) in the libglade build file and I was then able to brew install it.

    With that done, I was able to get much farther in building the iio-oscilloscope package but now it is throwing an error in the 'make install' stage but does not give much description as to what the error is nor how to resolve it.

    Here is the output:

    denis@Denis-MB-Pro homebrew-formulae % brew install -f --build-from-source --fetch-HEAD --HEAD ./iio-oscilloscope.rb


    Error: Failed to load cask: ./iio-oscilloscope.rb
    Cask 'iio-oscilloscope' is unreadable: wrong constant name #<Class:0x000000012091d7c0>
    Warning: Treating ./iio-oscilloscope.rb as a formula.
    ==> Fetching iio-oscilloscope
    ==> Cloning github.com/.../iio-oscilloscope.git
    Updating /Users/denis/Library/Caches/Homebrew/iio-oscilloscope--git
    ==> Checking out branch tfcollins/macos-updates
    Already on 'tfcollins/macos-updates'
    Your branch is up to date with 'origin/tfcollins/macos-updates'.
    HEAD is now at d81df1f Add temporary workaround for mac
    ==> cmake ..
    ==> make install
    Last 15 lines from /Users/denis/Library/Logs/Homebrew/iio-oscilloscope/02.make:
    [ 48%] Linking C shared library adrv9009.dylib
    cd /tmp/iio-oscilloscope-20240625-96341-jsxuvb/build/plugins && /opt/homebrew/Cellar/cmake/3.29.6/bin/cmake -E cmake_link_script CMakeFiles/adrv9009.dir/link.txt --verbose=1
    [ 50%] Linking C shared library ad9371.dylib
    cd /tmp/iio-oscilloscope-20240625-96341-jsxuvb/build/plugins && /opt/homebrew/Cellar/cmake/3.29.6/bin/cmake -E cmake_link_script CMakeFiles/ad9371.dir/link.txt --verbose=1
    [ 50%] Built target fmcomms11
    /opt/homebrew/Library/Homebrew/shims/mac/super/clang -O3 -DNDEBUG -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -dynamiclib -Wl,-headerpad_max_install_names -rdynamic -o ad9371.dylib -install_name @rpath/ad9371.dylib CMakeFiles/ad9371.dir/ad9371.c.o -L/usr/local/lib -Wl,-rpath,/usr/local/lib -Wl,-rpath,/tmp/iio-oscilloscope-20240625-96341-jsxuvb/build -F/Library/Frameworks/ -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -lharfbuzz -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lintl /opt/local/lib/libiio.dylib -lxml2 /opt/local/lib/libad9361.dylib ../libosc.0.8.dylib -lm -F/Library/Frameworks/
    /opt/homebrew/Library/Homebrew/shims/mac/super/clang -O3 -DNDEBUG -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -dynamiclib -Wl,-headerpad_max_install_names -rdynamic -o adrv9009.dylib -install_name @rpath/adrv9009.dylib CMakeFiles/adrv9009.dir/adrv9009.c.o -L/usr/local/lib -Wl,-rpath,/usr/local/lib -Wl,-rpath,/tmp/iio-oscilloscope-20240625-96341-jsxuvb/build -F/Library/Frameworks/ -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -lharfbuzz -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lintl /opt/local/lib/libiio.dylib -lxml2 /opt/local/lib/libad9361.dylib ../libosc.0.8.dylib -lm -F/Library/Frameworks/
    [ 50%] Built target generic_dac
    [ 50%] Built target oscmain
    [ 50%] Built target ad9371_adv
    [ 50%] Built target adrv9009_adv
    [ 50%] Built target fmcomms5
    [ 50%] Built target adrv9009
    [ 50%] Built target ad9371
    make: *** [all] Error 2

    Do not report this issue to Homebrew/brew or Homebrew/homebrew-core!

  • By the way, to your point about the libiio repo main branch being under heavy churn and development for the v1 release, I was aware of that already and I made sure to check out the v0.25 branch before building it. Apologies if I was unclear on that in any of my earlier posts.

  • We tested the tap on MacOS 14 Sonoma, and we were able to build and run the application.

    You said that you installed several packages manually. Can you uninstall the following : gtkdatabox, gtk+3, gtk+, libepoxy, hicolor-icon-theme ? Then , try and install the iio-oscilloscope tap again, and it should pull the right deps for itself.

    brew install --verbose -f --build-from-source --fetch-HEAD --HEAD ./iio-oscilloscope.rb

    Let me know if this fixes your issue.

    Thanks,

    Cristina

  • I uninstalled all of the listed packages (brew uninstall <package name>). In the process of doing that I also needed to uninstall libglade as it was a depenendency to uninstall gtk+.

    Then I tried to install iio-oscilloscope.rb but again I was getting the "disabled" error for libglade so I once again added HOMEBREW_NO_INSTALL_FROM_API=1 to my environment and rebuilt libglade with the disabled line commented out.

    After reinstalling libglade in this way I re-ran the build for iio-oscilloscope.rb. Most of the build and dependencies seemed to go fine however the process ended with the following message (see below). Does this match what you saw in your attempt to build on Sonoma? I'm happy to share the build logs below if that will help.

     

    HOMEBREW_SDKROOT: /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk
    ACLOCAL_PATH: /opt/homebrew/opt/curl/share/aclocal:/opt/homebrew/opt/libxml2/share/aclocal:/opt/homebrew/share/aclocal
    PATH: /opt/homebrew/Library/Homebrew/shims/mac/super:/opt/homebrew/opt/cmake/bin:/opt/homebrew/opt/pkg-config/bin:/opt/homebrew/opt/dbus/bin:/opt/homebrew/opt/pcre2/bin:/opt/homebrew/opt/openssl@3/bin:/opt/homebrew/opt/sqlite/bin:/opt/homebrew/opt/xz/bin:/opt/homebrew/opt/python@3.12/bin:/opt/homebrew/opt/gettext/bin:/opt/homebrew/opt/glib/bin:/opt/homebrew/opt/libpng/bin:/opt/homebrew/opt/freetype/bin:/opt/homebrew/opt/fontconfig/bin:/opt/homebrew/opt/cairo/bin:/opt/homebrew/opt/brotli/bin:/opt/homebrew/opt/libidn2/bin:/opt/homebrew/opt/openldap/bin:/opt/homebrew/opt/rtmpdump/bin:/opt/homebrew/opt/lz4/bin:/opt/homebrew/opt/zstd/bin:/opt/homebrew/opt/curl/bin:/opt/homebrew/opt/gcc/bin:/opt/homebrew/opt/hwloc/bin:/opt/homebrew/opt/libevent/bin:/opt/homebrew/opt/pmix/bin:/opt/homebrew/opt/open-mpi/bin:/opt/homebrew/opt/fftw/bin:/opt/homebrew/opt/jpeg-turbo/bin:/opt/homebrew/opt/libtiff/bin:/opt/homebrew/opt/gdk-pixbuf/bin:/opt/homebrew/opt/fribidi/bin:/opt/homebrew/opt/graphite2/bin:/opt/homebrew/opt/icu4c/bin:/opt/homebrew/opt/harfbuzz/bin:/opt/homebrew/opt/pango/bin:/opt/homebrew/opt/gtk+3/bin:/opt/homebrew/opt/libiio/bin:/opt/homebrew/opt/gtk+/bin:/opt/homebrew/opt/libxml2/bin:/opt/homebrew/opt/hdf5/bin:/opt/homebrew/opt/libmatio/bin:/opt/homebrew/opt/python@3.12/libexec/bin:/usr/bin:/bin:/usr/sbin:/sbin

    Error: iio-oscilloscope HEAD-d81df1f did not build
    Logs:
    /Users/denis/Library/Logs/Homebrew/iio-oscilloscope/00.options.out
    /Users/denis/Library/Logs/Homebrew/iio-oscilloscope/01.cmake
    /Users/denis/Library/Logs/Homebrew/iio-oscilloscope/01.cmake.cc
    /Users/denis/Library/Logs/Homebrew/iio-oscilloscope/02.make
    /Users/denis/Library/Logs/Homebrew/iio-oscilloscope/02.make.cc
    /Users/denis/Library/Logs/Homebrew/iio-oscilloscope/build
    Do not report this issue to Homebrew/brew or Homebrew/homebrew-core!

    iio-oscilloscope's formula was built from an unstable upstream --HEAD.

  • Hi!  The link for libglade workaround above seems broken.  I have the same issue with libglade being disabled in brew.  Thanks!

Reply Children
No Data