Building on Apple Silicon (M1) Macs

Has anyone managed to build Sonic Pi on a new M1 Mac?

I managed to get the mac-prebuild script working after fixing an issue with the homebrew prefix path (#2968).

Then the mac-config script failed because it couldn’t find the platform-folders package:

CMake Error at api/CMakeLists.txt:44 (find_package):
  Could not find a package configuration file provided by "platform_folders"
  with any of the following names:

    platform_foldersConfig.cmake
    platform_folders-config.cmake

  Add the installation prefix of "platform_folders" to CMAKE_PREFIX_PATH or

I can see that it was installed by vcpkg, and the file it’s looking for is in vcpkg/installed/x64-osx/share/platform_folders/platform_foldersConfig.cmake.

I thought that maybe the problem is it being in x64-osx, and maybe cmake is looking for arm64. So I edited mac-prebuild and changed the line with triplet=(x64-osx) to triplet=(arm64-osx) then reran the prebuild. I could then also see the file in vcpkg/installed/arm64-osx/share/platform_folders/platform_foldersConfig.cmake, but mac-config still failed with the same error.

I then noticed a warning saying Unable to determine target architecture, continuing without vcpkg. So I tried adding -DVCPKG_TARGET_TRIPLET=arm64-osx to the cmake command in mac-config. Now I’m seeing:

CMake Error at vcpkg/scripts/buildsystems/vcpkg.cmake:861 (_find_package):
  By not providing "FindQt5.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Qt5", but
  CMake did not find one.

  Could not find a package configuration file provided by "Qt5" with any of
  the following names:

    Qt5Config.cmake
    qt5-config.cmake

  Add the installation prefix of "Qt5" to CMAKE_PREFIX_PATH or set "Qt5_DIR"
  to a directory containing one of the above files.  If "Qt5" provides a
  separate development package or SDK, be sure it has been installed.
Call Stack (most recent call first):
  gui/qt/CMakeLists.txt:39 (find_package)

I’ll have another stab at it in a couple of days, but if anyone has some idea how to fix this that would be very appreciated.

Hey there,

thanks for looking into this. I don’t currently have access to an M1 Mac, so haven’t attempted a build there yet. I also just moved house and have covid, so I’m not in the best shape to help out just now. Hopefully someone else can :slight_smile:

1 Like

So, I updated to the latest dev branch and tried again. Although mac-prebuild.sh ran and returned a successful code, I noticed that there were a number of errors in the output when compiling native extensions, like:

Compiling native ruby extensions...
Clearing [path...]/sonic-pi/app/server/ruby/bin/../rb-native/2.6.0
Creating [path...]/sonic-pi/app/server/ruby/bin/../rb-native/2.6.0
Compiling native extension in [path...]/sonic-pi/app/server/ruby/vendor/rugged-1.3.0/ext/rugged
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
	--with-opt-dir
	--without-opt-dir
	--with-opt-include
	--without-opt-include=${opt-dir}/include
	--with-opt-lib
	--without-opt-lib=${opt-dir}/lib
	--with-make-prog
	--without-make-prog
	--srcdir=.
	--curdir
	--ruby=/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/$(RUBY_BASE_NAME)
	--with-sha1dc
	--without-sha1dc
	--use-system-libraries
	--with-git2-dir
	--without-git2-dir
	--with-git2-include
	--without-git2-include=${git2-dir}/include
	--with-git2-lib
	--without-git2-lib=${git2-dir}/lib
	--with-git2lib
	--without-git2lib
Traceback (most recent call last):
	15: from extconf.rb:137:in `<main>'
	14: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:1011:in `have_library'
	13: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:958:in `checking_for'
	12: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:357:in `postpone'
	11: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:331:in `open'
	10: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:361:in `block in postpone'
	 9: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:331:in `open'
	 8: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:361:in `block (2 levels) in postpone'
	 7: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:959:in `block in checking_for'
	 6: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:1016:in `block in have_library'
	 5: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:789:in `try_func'
	 4: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:570:in `try_link'
	 3: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:543:in `try_link0'
	 2: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/tmpdir.rb:93:in `mktmpdir'
	 1: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:546:in `block in try_link0'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:467:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
make: *** No rule to make target `clean'.  Stop.
make: *** No targets specified and no makefile found.  Stop.

And similar for the other native extensions. So I imagine the prebuild step didn’t work properly despite the successful return code.

OK, I’ve made a bit more progress.

It looks like the errors in the mac-prebuild output were because I was using the built-in ruby version in MacOS. I installed a more recent version using homebrew, and added it to the path using the commands printed by brew install ruby:

export PATH="/opt/homebrew/opt/ruby/bin:$PATH"
export LDFLAGS="-L/opt/homebrew/opt/ruby/lib"
export CPPFLAGS="-I/opt/homebrew/opt/ruby/include"
export PKG_CONFIG_PATH="/opt/homebrew/opt/ruby/lib/pkgconfig"

That allowed mac-prebuild to run successfully, without the above-mentioned errors about compiling native extensions in the output.

After that, I was back to the first error, of cmake not finding Qt5. I noticed that none of the Qt executables were on the path, so I added it to the path (with export PATH="/opt/homebrew/opt/qt@5/bin:$PATH) and reran mac-config.sh, and now it gets a bit further, but fails with an error about Qt5WebEngineWidgets:

CMake Error at vcpkg/scripts/buildsystems/vcpkg.cmake:861 (_find_package):
  Could not find a package configuration file provided by
  "Qt5WebEngineWidgets" with any of the following names:

    Qt5WebEngineWidgetsConfig.cmake
    qt5webenginewidgets-config.cmake

  Add the installation prefix of "Qt5WebEngineWidgets" to CMAKE_PREFIX_PATH
  or set "Qt5WebEngineWidgets_DIR" to a directory containing one of the above
  files.  If "Qt5WebEngineWidgets" provides a separate development package or
  SDK, be sure it has been installed.
Call Stack (most recent call first):
  /opt/homebrew/opt/qt@5/lib/cmake/Qt5/Qt5Config.cmake:28 (find_package)
  vcpkg/scripts/buildsystems/vcpkg.cmake:861 (_find_package)
  gui/qt/CMakeLists.txt:39 (find_package)

I have a feeling I may have seen this error before, but don’t remember what, if anything, I did to fix it… anyway, that’s all I’ve got time for today.

Hi @emlyn,

I vaguely remember reading that Qt6 was needed to build Qt’s WebView on M1 chips. I might be wrong, but that’s worth looking into. If so, it might be necessary to look into what needs to change to get Qt6 compatibility first before considering M1 issues.

Thanks, that’s useful information, I’ll look into it when I have some more time.

1 Like

Don’t have such a mac to test, but were able to reproduce this error under Ubuntu. To get it to compile and run, the system default Qt 5.12 and Elixir 1.10 (? or so) had to be overridden with Qt 5.15 and Elixir 1.13.

What seems like a horrible bug is that the pre-build and config scripts do not detect such incompatibilities and warn you with a comprehensible error message, nor automatically pull in the correct versions of the requisite libraries as part of a self-contained process.

Firstly, your post is about building on Ubuntu rather than M1 Macs which is the topic of this post. I’m pretty sure the issues aren’t the same as the main problem with building for M1 is to move the codebase to Qt6 first (which I’m currently working on).

Also, it feels pretty harsh to call something that hasn’t been built a “horrible bug”. There’s an infinite number of things that haven’t been built yet - are they all “horrible bugs” :wink: I think we really should be trying our best to be kind and courteous to those that work hard on open source software - giving it out for free.

Another approach that would be well received would have been to say something like “I noticed that the pre-build and config scripts would benefit from detecting and reporting when the Qt and Elixir dependencies are not compatible and I have prepared a quick example of how this might work…”

Also, note that “pulling in the correct versions automatically” isn’t entirely trivial. First it would require the scripts to run as root (something I’d prefer not to have to do) and secondly I’m not aware of a simple way of knowing the specific package name for every Linux distro available. This feels very much like something a package maintainer would look after. However, we do have a pretty rough-and-ready script for pulling in the dependencies for Raspberry Pi OS which should act as a good starting place: sonic-pi/pi-setup.sh at dev · sonic-pi-net/sonic-pi · GitHub

Apologies for sounding harsh or insulting. The post was not at all meant to level criticism or glib complaints not accompanied by suggested or actual fixes; upon re-reading, it could be read that way and it was wrong to use the word ‘bug’! We love Sonic Pi and love to help, or we would not be tinkering with it at all!

To take it from the top, the error message obtained under ubuntu is identical to the error message reported by @emlyn in post #4. That was the reason for posting in this thread, to suggest the possibility there may be a connection with vcpkg similarly failing. Admittedly, we have not even tested on an M1 Mac yet, are planning to try a couple of other platforms first.

Yes, if it was not clear, that is exactly what was meant. The suggestion/idea was that the scripts in question would detect (as far and as accurately as possible) library problems and issue an informative message before trying and failing to run. We do not yet have working code that does it, though if you already know by some means which versions are compatible then it reduces to a simple test.

For sure nothing should run as root or automatically modify system packages. Just that if it has somehow been determined that a specific version of, say, Qt is required, the script could just download it the way, e.g., aqt does, which results in a known version sitting in a known directory where the rest of the build can find it.

1 Like

I noticed the Qt6 branch, so I gave that a go. First I uninstalled qt@5 from Homebrew and installed qt (6.2.2). I ran mac-clean.sh to remove remnants of previous versions.

The mac-prebuild script ran successfully. The mac-config script still needed the -DVCPKG_TARGET_TRIPLET=arm64-osx to prevent it complaining it was unable to determine the target architecture (as above), but with that, it also completed successfully.

I then tried the actual build. It got up to 94% (Linking CXX executable "Sonic Pi.app/Contents/MacOS/Sonic Pi"), but then failed with:

ld: warning: dylib (/opt/homebrew/lib/QtXml.framework/Versions/A/QtXml) was built for newer macOS version (12.0) than being linked (11.0)
ld: warning: dylib (/opt/homebrew/lib/QtWebEngineWidgets.framework/Versions/A/QtWebEngineWidgets) was built for newer macOS version (12.0) than being linked (11.0)
...
ld: warning: dylib (/opt/homebrew/lib/QtQml.framework/Versions/A/QtQml) was built for newer macOS version (12.0) than being linked (11.0)
ld: warning: dylib (/opt/homebrew/lib/QtWebEngineCore.framework/Versions/A/QtWebEngineCore) was built for newer macOS version (12.0) than being linked (11.0)
ld: warning: object file (../../../vcpkg/installed/arm64-osx/debug/lib/libplatform_folders.a(platform_folders.cpp.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (../../../vcpkg/installed/arm64-osx/debug/lib/libreproc++.a(reproc.cpp.o)) was built for newer macOS version (11.6) than being linked (11.0)
...
ld: warning: object file (../../../vcpkg/installed/arm64-osx/debug/lib/libreproc.a(redirect.posix.c.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (../../../vcpkg/installed/arm64-osx/debug/lib/libreproc.a(strv.c.o)) was built for newer macOS version (11.6) than being linked (11.0)
ERROR: Cannot resolve rpath "@rpath/QtGui.framework/Versions/A/QtGui"
ERROR:  using QSet("/<path...>/sonic-pi/app/build/gui/qt/lib")
ERROR: Cannot resolve rpath "@rpath/QtCore.framework/Versions/A/QtCore"
ERROR:  using QSet("/<path...>/sonic-pi/app/build/gui/qt/lib")
...
ERROR: Cannot resolve rpath "@rpath/QtCore.framework/Versions/A/QtCore"
ERROR:  using QSet("/<path...>/sonic-pi/app/build/gui/qt/lib")
Sonic Pi.app/Contents/Info.plist: Permission denied
make[2]: *** [gui/qt/Sonic Pi.app/Contents/MacOS/Sonic Pi] Error 1
make[2]: *** Deleting file 'gui/qt/Sonic Pi.app/Contents/MacOS/Sonic Pi'
make[1]: *** [gui/qt/CMakeFiles/sonic-pi.dir/all] Error 2
make: *** [all] Error 2

(for brevity I snipped out a load of lines that were similar to their surrounding ones).
I couldn’t find anything immediately obvious with a quick Google search, so I’ll leave it for now and look into it more when I have more time - but it looks like this is getting close. :slight_smile:

Hi @emlyn, I ran into exactly this too. Turns out it’s a problem with the current homebrew packaging of Qt6. I uninstalled from homebrew and installed via the standard Qt installer and got things to compile ok today :slight_smile:

1 Like

Wow, I downloaded Qt6, and now it at least compiles to something that runs! And it even plays music!

The GUI looks a bit messed up though:

And the hotkeys don’t work. The file menu says it’s Alt-R for run, but that just types a ‘®’ symbol and then unfocuses the editor; Command-R does nothing.

Not sure if you were already familiar with such things, but that is the experimental alternative GUI built with Dear ImGui :slight_smile: - AFAIK, by default, the Sonic Pi build scripts build both this and the original Qt GUI…

1 Like

Oh nice, I wasn’t aware of that - I just saw “imgui” mentioned at the end of the build output so looked for the app in there.

Found the Qt version - and it seems to work perfectly well (although I haven’t thoroughly tested it yet):

2 Likes

In case anyone else wants to do the same, here’s what I did to get it to build:

  • Install the latest Ruby from Homebrew: brew install ruby (the version included in MacOS is too old)
  • Install Qt 6 from https://www.qt.io/ (the version in Homebrew didn’t work)
  • Edit app/mac-config.sh to add -DVCPKG_TARGET_TRIPLET=arm64-osx to the line beginning with cmake (otherwise it complains that it cannot determine the target architecture)
  • Edit app/CMakeLists.txt to change CMAKE_OSX_DEPLOYMENT_TARGET from 10.14 to 10.15 (I forget what, but something was incompatible with 10.14)
  • Add Ruby and Qt to the path (adjusting installation paths if necessary):
export PATH="$PATH:/Applications/Qt/6.2.2/macos/bin"

export PATH="/opt/homebrew/opt/ruby/bin:$PATH"
export LDFLAGS="-L/opt/homebrew/opt/ruby/lib"
export CPPFLAGS="-I/opt/homebrew/opt/ruby/include"
export PKG_CONFIG_PATH="/opt/homebrew/opt/ruby/lib/pkgconfig"

Then just run app/mac-build-all.sh, and if all goes well you should have the app in app/build/gui/qt/Sonic\ Pi.app.

Ideally, we’d probably want a Universal binary as opposed to separate arm64 and x86_64 apps, but I’m not sure how easy that is. I saw you can add SET(CMAKE_OSX_ARCHITECTURES "x86_64;arm64") to CMakeLists.txt, but that requires the dependencies to also be universal, and I’m not sure that vcpkg supports that yet (see discussion).

2 Likes

Although the basics seem to work well, I have found a couple of issues with it:

The scope doesn’t respond to any sounds - it always shows a flat line.

When I quit, the main window closes, but the app doesn’t finish quitting and I have to force quit it. I don’t see anything obvious in the logs, but I could be missing something. It sometimes leaves a few processes hanging around (daemon.rb, boot-mac.sh and beam.smp).
The first few times this happened I was able to reopen it without any issues, but now when I start it I get the boot error window saying “GUI was unable to connect to the Ruby server” (I can post the full logs if that would be useful). I’ve even rebooted my laptop, but it still fails to start.

I haven’t checked MIDI/OSC - I was about to give it a try when it started refusing to start up.

This is likely because I don’t think there’s yet an M1-native build of SuperCollider and you’re likely using an x64 build in emulation mode which probably isn’t playing well with the boost shared memory stuff. It would be useful to know if you’re also using M1-native builds of Ruby and Erlang.

Also weird that if the GUI crashes daemon.rb is still running - this definitely suggests something fishy is going wront and a check of the logs would definitely be useful!

I can see that the supercollider executable is indeed an x86_64 build.

Erlang seems to be arm64.

I’m not sure about Ruby as I can’t find a ruby executable in the app bundle. I did find a couple of ruby_prof.bundle files in there, which are both arm64. I don’t suppose it uses the system ruby does it? The built-in MacOS one (2.6.8) is a universal arm64/x86_64 binary, and the homebrew-installed one (3.0.3) is arm64.

When I try to start Sonic Pi now, it fails every time, I think it’s failing to connect to supercollider. The logs that it displays in the boot error window are below. I noticed a load of remaining processes after it had quit, but they then disappeared on their own after a short time.

Apologies, a critical error occurred during startup:
GUI was unable to connect to the Ruby server.

Please consider reporting a bug at
http://github.com/samaaron/sonic-pi/issues

Sonic Pi Boot Error Report
==========================

System Information
------------------

Sonic Pi version: 4.0-beta2
OS: macOS 12.1

Logs:

spider.log:
Sonic Pi Spider Server booting...
The time is 2022-01-27 00:40:18 +0000
Using primary protocol: udp
Detecting port numbers...
Ports: {:server_port=>30583, :gui_port=>30584, :scsynth_port=>30585, :scsynth_send_port=>30585, :osc_cues_port=>4560, :tau_port=>30586, :listen_to_tau_port=>30591}
Opening UDP Server to listen to GUI on port: 30583
Spider - Pulling in modules...
Spider - Starting Runtime Server
TauComms - Sending /ping to tau: 127.0.0.1:30586
studio - init
scsynth boot - Waiting for the SuperCollider Server to have booted...
scsynth boot - Sending /status to server: 127.0.0.1:30585
TauComms - Sending /ping to tau: 127.0.0.1:30586
scsynth boot - Sending /status to server: 127.0.0.1:30585
TauComms - Sending /ping to tau: 127.0.0.1:30586
TauComms - Receiving ack from tau
TauComms - connection established
scsynth boot - Sending /status to server: 127.0.0.1:30585
scsynth boot - Sending /status to server: 127.0.0.1:30585
scsynth boot - Sending /status to server: 127.0.0.1:30585
scsynth boot - Sending /status to server: 127.0.0.1:30585
scsynth boot - Sending /status to server: 127.0.0.1:30585
scsynth boot - Sending /status to server: 127.0.0.1:30585
scsynth boot - Sending /status to server: 127.0.0.1:30585
scsynth boot - Sending /status to server: 127.0.0.1:30585
scsynth boot - Sending /status to server: 127.0.0.1:30585
scsynth boot - Sending /status to server: 127.0.0.1:30585
scsynth boot - Sending /status to server: 127.0.0.1:30585
scsynth boot - Sending /status to server: 127.0.0.1:30585
scsynth boot - Sending /status to server: 127.0.0.1:30585
scsynth boot - Sending /status to server: 127.0.0.1:30585
scsynth boot - Sending /status to server: 127.0.0.1:30585
scsynth boot - Sending /status to server: 127.0.0.1:30585
scsynth boot - Sending /status to server: 127.0.0.1:30585
scsynth boot - Sending /status to server: 127.0.0.1:30585
scsynth boot - Sending /status to server: 127.0.0.1:30585
scsynth boot - Sending /status to server: 127.0.0.1:30585
scsynth boot - Sending /status to server: 127.0.0.1:30585
scsynth boot - Sending /status to server: 127.0.0.1:30585
scsynth boot - Sending /status to server: 127.0.0.1:30585
scsynth boot - Sending /status to server: 127.0.0.1:30585
scsynth boot - Sending /status to server: 127.0.0.1:30585
scsynth boot - Sending /status to server: 127.0.0.1:30585
scsynth boot - Sending /status to server: 127.0.0.1:30585
scsynth boot - Sending /status to server: 127.0.0.1:30585
scsynth boot - Unable to connect to SuperCollider Audio Server (Promise timed out after 30 seconds.). Exiting...
Spider - Failed to start server: exit
/Applications/Sonic Pi dev.app/Contents/Resources/app/server/ruby/lib/sonicpi/scsynthexternal.rb:183:in `exit'
/Applications/Sonic Pi dev.app/Contents/Resources/app/server/ruby/lib/sonicpi/scsynthexternal.rb:183:in `rescue in wait_for_boot'
/Applications/Sonic Pi dev.app/Contents/Resources/app/server/ruby/lib/sonicpi/scsynthexternal.rb:181:in `wait_for_boot'
/Applications/Sonic Pi dev.app/Contents/Resources/app/server/ruby/lib/sonicpi/scsynthexternal.rb:145:in `boot'
/Applications/Sonic Pi dev.app/Contents/Resources/app/server/ruby/lib/sonicpi/scsynthexternal.rb:38:in `initialize'
/Applications/Sonic Pi dev.app/Contents/Resources/app/server/ruby/lib/sonicpi/server.rb:81:in `new'
/Applications/Sonic Pi dev.app/Contents/Resources/app/server/ruby/lib/sonicpi/server.rb:81:in `initialize'
/Applications/Sonic Pi dev.app/Contents/Resources/app/server/ruby/lib/sonicpi/studio.rb:67:in `new'
/Applications/Sonic Pi dev.app/Contents/Resources/app/server/ruby/lib/sonicpi/studio.rb:67:in `init_scsynth'
/Applications/Sonic Pi dev.app/Contents/Resources/app/server/ruby/lib/sonicpi/studio.rb:44:in `initialize'
/Applications/Sonic Pi dev.app/Contents/Resources/app/server/ruby/lib/sonicpi/lang/sound.rb:90:in `new'
/Applications/Sonic Pi dev.app/Contents/Resources/app/server/ruby/lib/sonicpi/lang/sound.rb:90:in `block (2 levels) in included'
/Applications/Sonic Pi dev.app/Contents/Resources/app/server/ruby/lib/sonicpi/lang/ixi.rb:72:in `block (2 levels) in included'
/Applications/Sonic Pi dev.app/Contents/Resources/app/server/ruby/bin/sonic-pi-server.rb:241:in `new'
/Applications/Sonic Pi dev.app/Contents/Resources/app/server/ruby/bin/sonic-pi-server.rb:241:in `<main>'

daemon.log:
[2022-01-27 00:40:15] Welcome to the Daemon Booter
[2022-01-27 00:40:15] checked port 30583, #<UDPSocket:0x0000000148114718>
[2022-01-27 00:40:15] checked port 30584, #<UDPSocket:0x0000000148114330>
[2022-01-27 00:40:15] checked port 30585, #<UDPSocket:0x00000001480effa8>
[2022-01-27 00:40:15] checked port 4560, #<UDPSocket:0x00000001480efcb0>
[2022-01-27 00:40:15] checked port 30586, #<UDPSocket:0x00000001480ef508>
[2022-01-27 00:40:15] checked port 30587, #<UDPSocket:0x00000001480eeab8>
[2022-01-27 00:40:15] checked port 30588, #<UDPSocket:0x00000001480ee658>
[2022-01-27 00:40:15] checked port 30589, #<UDPSocket:0x00000001480ee1d0>
[2022-01-27 00:40:15] checked port 30590, #<UDPSocket:0x00000001480eddc0>
[2022-01-27 00:40:15] checked port 30591, #<UDPSocket:0x00000001480ed910>
[2022-01-27 00:40:15] checked port 30592, #<UDPSocket:0x00000001480ed618>
[2022-01-27 00:40:15] Selected ports: 
[2022-01-27 00:40:15] {"spider-listen-to-gui"=>30583, "gui-send-to-spider"=>30583, "gui-listen-to-spider"=>30584, "spider-send-to-gui"=>30584, "scsynth"=>30585, "scsynth-send"=>30585, "osc-cues"=>4560, "tau"=>30586, "spider"=>30587, "phx"=>30588, "gui-keep-alive"=>30589, "tau-keep-alive"=>30590, "spider-listen-to-tau"=>30591, "daemon-listen-to-tau"=>30592}
[2022-01-27 00:40:15] Setting up zombie kill switch for gui-keep-alive listening on port 30589
[2022-01-27 00:40:15] Setting up zombie kill switch for tau-keep-alive listening on port 30590
[2022-01-27 00:40:15] Booting Tau
[2022-01-27 00:40:15] fetching toml opts
[2022-01-27 00:40:15] Daemon listening to info from Tau on port 30592
[2022-01-27 00:40:15] Process Booter - booting sh with args ["/Applications/Sonic Pi dev.app/Contents/Resources/app/server/beam/tau/boot-mac.sh", "true", "false", "true", "true", "4560", "30586", "30591", "30592", "30590", "/Users/emcorrin/.sonic-pi/log/tau.log", "true", "true", "30588", "uoFhL2UYdCN47E6RSNdprvdPCJkKafSmtf3DkuMJyEm36Pr8cFa2FnQzke27XnTD+ikW0ib36Kpg3O5JW6L9Hg==", "prod"]
[2022-01-27 00:40:15] sh /Applications/Sonic Pi dev.app/Contents/Resources/app/server/beam/tau/boot-mac.sh true false true true 4560 30586 30591 30592 30590 /Users/emcorrin/.sonic-pi/log/tau.log true true 30588 uoFhL2UYdCN47E6RSNdprvdPCJkKafSmtf3DkuMJyEm36Pr8cFa2FnQzke27XnTD+ikW0ib36Kpg3O5JW6L9Hg== prod
[2022-01-27 00:40:15] Booting Scsynth
[2022-01-27 00:40:15] Process Booter - booting /Applications/Sonic Pi dev.app/Contents/Resources/app/server/native/scsynth with args ["-u", "30585", "-a", "1024", "-m", "131072", "-D", "0", "-R", "0", "-l", "1", "-i", "16", "-o", "16", "-b", "4096", "-B", "127.0.0.1"]
[2022-01-27 00:40:15] /Applications/Sonic Pi dev.app/Contents/Resources/app/server/native/scsynth -u 30585 -a 1024 -m 131072 -D 0 -R 0 -l 1 -i 16 -o 16 -b 4096 -B 127.0.0.1
[2022-01-27 00:40:15] Kill switch #30589 Received UDP data ["/daemon/keep-alive", [], ["AF_INET", 59775, "127.0.0.1", "127.0.0.1"]]
[2022-01-27 00:40:15] Booting Spider Server
[2022-01-27 00:40:16] Process Booter - booting /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby with args ["--enable-frozen-string-literal", "-E", "utf-8", "/Applications/Sonic Pi dev.app/Contents/Resources/app/server/ruby/bin/sonic-pi-server.rb", "-u", "30583", "30584", "30585", "30585", "4560", "30586", "30591"]
[2022-01-27 00:40:16] /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby --enable-frozen-string-literal -E utf-8 /Applications/Sonic Pi dev.app/Contents/Resources/app/server/ruby/bin/sonic-pi-server.rb -u 30583 30584 30585 30585 4560 30586 30591
[2022-01-27 00:40:16] Waiting for processes to complete....
[2022-01-27 00:40:19] Daemon received Pid data from Tau: [80483]
[2022-01-27 00:40:19] Kill switch #30590 Received UDP data ["/daemon/keep-alive", [], ["AF_INET", 61394, "127.0.0.1", "127.0.0.1"]]
[2022-01-27 00:40:19] Daemon received UDP data from Tau: ["/tau/pid", [80483], ["AF_INET", 61944, "127.0.0.1", "127.0.0.1"]]
[2022-01-27 00:40:20] Kill switch #30589 Received UDP data ["/daemon/keep-alive", [], ["AF_INET", 54708, "127.0.0.1", "127.0.0.1"]]
[2022-01-27 00:40:20] Daemon received Pid data from Tau: [80483]
[2022-01-27 00:40:20] Daemon received UDP data from Tau: ["/tau/pid", [80483], ["AF_INET", 61944, "127.0.0.1", "127.0.0.1"]]
[2022-01-27 00:40:21] Daemon received Pid data from Tau: [80483]
[2022-01-27 00:40:21] Daemon received UDP data from Tau: ["/tau/pid", [80483], ["AF_INET", 61944, "127.0.0.1", "127.0.0.1"]]
[2022-01-27 00:40:22] Daemon received Pid data from Tau: [80483]
[2022-01-27 00:40:22] Daemon received UDP data from Tau: ["/tau/pid", [80483], ["AF_INET", 61944, "127.0.0.1", "127.0.0.1"]]
[2022-01-27 00:40:23] Kill switch #30590 Received UDP data ["/daemon/keep-alive", [], ["AF_INET", 61394, "127.0.0.1", "127.0.0.1"]]
[2022-01-27 00:40:23] Daemon received Pid data from Tau: [80483]
[2022-01-27 00:40:23] Daemon received UDP data from Tau: ["/tau/pid", [80483], ["AF_INET", 61944, "127.0.0.1", "127.0.0.1"]]
[2022-01-27 00:40:24] Kill switch #30589 Received UDP data ["/daemon/keep-alive", [], ["AF_INET", 64463, "127.0.0.1", "127.0.0.1"]]
[2022-01-27 00:40:24] Daemon received Pid data from Tau: [80483]
[2022-01-27 00:40:24] Daemon received UDP data from Tau: ["/tau/pid", [80483], ["AF_INET", 61944, "127.0.0.1", "127.0.0.1"]]
[2022-01-27 00:40:25] Daemon received Pid data from Tau: [80483]
[2022-01-27 00:40:25] Daemon received UDP data from Tau: ["/tau/pid", [80483], ["AF_INET", 61944, "127.0.0.1", "127.0.0.1"]]
[2022-01-27 00:40:26] Daemon received Pid data from Tau: [80483]
[2022-01-27 00:40:26] Daemon received UDP data from Tau: ["/tau/pid", [80483], ["AF_INET", 61944, "127.0.0.1", "127.0.0.1"]]
[2022-01-27 00:40:27] Kill switch #30590 Received UDP data ["/daemon/keep-alive", [], ["AF_INET", 61394, "127.0.0.1", "127.0.0.1"]]
[2022-01-27 00:40:27] Daemon received Pid data from Tau: [80483]
[2022-01-27 00:40:27] Daemon received UDP data from Tau: ["/tau/pid", [80483], ["AF_INET", 61944, "127.0.0.1", "127.0.0.1"]]
[2022-01-27 00:40:28] Kill switch #30589 Received UDP data ["/daemon/keep-alive", [], ["AF_INET", 59730, "127.0.0.1", "127.0.0.1"]]
[2022-01-27 00:40:28] Daemon received Pid data from Tau: [80483]
[2022-01-27 00:40:28] Daemon received UDP data from Tau: ["/tau/pid", [80483], ["AF_INET", 61944, "127.0.0.1", "127.0.0.1"]]
[2022-01-27 00:40:29] Daemon received Pid data from Tau: [80483]
[2022-01-27 00:40:29] Daemon received UDP data from Tau: ["/tau/pid", [80483], ["AF_INET", 61944, "127.0.0.1", "127.0.0.1"]]
[2022-01-27 00:40:30] Daemon received Pid data from Tau: [80483]
[2022-01-27 00:40:30] Daemon received UDP data from Tau: ["/tau/pid", [80483], ["AF_INET", 61944, "127.0.0.1", "127.0.0.1"]]
[2022-01-27 00:40:31] Kill switch #30590 Received UDP data ["/daemon/keep-alive", [], ["AF_INET", 61394, "127.0.0.1", "127.0.0.1"]]
[2022-01-27 00:40:31] Daemon received Pid data from Tau: [80483]
[2022-01-27 00:40:31] Daemon received UDP data from Tau: ["/tau/pid", [80483], ["AF_INET", 61944, "127.0.0.1", "127.0.0.1"]]
[2022-01-27 00:40:32] Kill switch #30589 Received UDP data ["/daemon/keep-alive", [], ["AF_INET", 50527, "127.0.0.1", "127.0.0.1"]]
[2022-01-27 00:40:32] Daemon received Pid data from Tau: [80483]
[2022-01-27 00:40:32] Daemon received UDP data from Tau: ["/tau/pid", [80483], ["AF_INET", 61944, "127.0.0.1", "127.0.0.1"]]
[2022-01-27 00:40:33] Daemon received Pid data from Tau: [80483]
[2022-01-27 00:40:33] Daemon received UDP data from Tau: ["/tau/pid", [80483], ["AF_INET", 61944, "127.0.0.1", "127.0.0.1"]]
[2022-01-27 00:40:34] Daemon received Pid data from Tau: [80483]
[2022-01-27 00:40:34] Daemon received UDP data from Tau: ["/tau/pid", [80483], ["AF_INET", 61944, "127.0.0.1", "127.0.0.1"]]
[2022-01-27 00:40:35] Kill switch #30590 Received UDP data ["/daemon/keep-alive", [], ["AF_INET", 61394, "127.0.0.1", "127.0.0.1"]]
[2022-01-27 00:40:35] Daemon received Pid data from Tau: [80483]
[2022-01-27 00:40:35] Daemon received UDP data from Tau: ["/tau/pid", [80483], ["AF_INET", 61944, "127.0.0.1", "127.0.0.1"]]
[2022-01-27 00:40:36] Kill switch #30589 Received UDP data ["/daemon/keep-alive", [], ["AF_INET", 60298, "127.0.0.1", "127.0.0.1"]]
[2022-01-27 00:40:36] Daemon received Pid data from Tau: [80483]
[2022-01-27 00:40:36] Daemon received UDP data from Tau: ["/tau/pid", [80483], ["AF_INET", 61944, "127.0.0.1", "127.0.0.1"]]
[2022-01-27 00:40:37] Daemon received Pid data from Tau: [80483]
[2022-01-27 00:40:37] Daemon received UDP data from Tau: ["/tau/pid", [80483], ["AF_INET", 61944, "127.0.0.1", "127.0.0.1"]]
[2022-01-27 00:40:38] Daemon received Pid data from Tau: [80483]
[2022-01-27 00:40:38] Daemon received UDP data from Tau: ["/tau/pid", [80483], ["AF_INET", 61944, "127.0.0.1", "127.0.0.1"]]
[2022-01-27 00:40:39] Kill switch #30590 Received UDP data ["/daemon/keep-alive", [], ["AF_INET", 61394, "127.0.0.1", "127.0.0.1"]]
[2022-01-27 00:40:39] Daemon received Pid data from Tau: [80483]
[2022-01-27 00:40:39] Daemon received UDP data from Tau: ["/tau/pid", [80483], ["AF_INET", 61944, "127.0.0.1", "127.0.0.1"]]
[2022-01-27 00:40:40] Kill switch #30589 Received UDP data ["/daemon/keep-alive", [], ["AF_INET", 53063, "127.0.0.1", "127.0.0.1"]]
[2022-01-27 00:40:40] Daemon received Pid data from Tau: [80483]
[2022-01-27 00:40:40] Daemon received UDP data from Tau: ["/tau/pid", [80483], ["AF_INET", 61944, "127.0.0.1", "127.0.0.1"]]
[2022-01-27 00:40:41] Daemon received Pid data from Tau: [80483]
[2022-01-27 00:40:41] Daemon received UDP data from Tau: ["/tau/pid", [80483], ["AF_INET", 61944, "127.0.0.1", "127.0.0.1"]]
[2022-01-27 00:40:42] Daemon received Pid data from Tau: [80483]
[2022-01-27 00:40:42] Daemon received UDP data from Tau: ["/tau/pid", [80483], ["AF_INET", 61944, "127.0.0.1", "127.0.0.1"]]
[2022-01-27 00:40:43] Kill switch #30590 Received UDP data ["/daemon/keep-alive", [], ["AF_INET", 61394, "127.0.0.1", "127.0.0.1"]]
[2022-01-27 00:40:43] Daemon received Pid data from Tau: [80483]
[2022-01-27 00:40:43] Daemon received UDP data from Tau: ["/tau/pid", [80483], ["AF_INET", 61944, "127.0.0.1", "127.0.0.1"]]
[2022-01-27 00:40:44] Kill switch #30589 Received UDP data ["/daemon/keep-alive", [], ["AF_INET", 64845, "127.0.0.1", "127.0.0.1"]]
[2022-01-27 00:40:44] Daemon received Pid data from Tau: [80483]
[2022-01-27 00:40:44] Daemon received UDP data from Tau: ["/tau/pid", [80483], ["AF_INET", 61944, "127.0.0.1", "127.0.0.1"]]
[2022-01-27 00:40:45] Daemon received Pid data from Tau: [80483]
[2022-01-27 00:40:45] Daemon received UDP data from Tau: ["/tau/pid", [80483], ["AF_INET", 61944, "127.0.0.1", "127.0.0.1"]]
[2022-01-27 00:40:46] Daemon received Pid data from Tau: [80483]
[2022-01-27 00:40:46] Daemon received UDP data from Tau: ["/tau/pid", [80483], ["AF_INET", 61944, "127.0.0.1", "127.0.0.1"]]
[2022-01-27 00:40:47] Kill switch #30590 Received UDP data ["/daemon/keep-alive", [], ["AF_INET", 61394, "127.0.0.1", "127.0.0.1"]]
[2022-01-27 00:40:47] Daemon received Pid data from Tau: [80483]
[2022-01-27 00:40:47] Daemon received UDP data from Tau: ["/tau/pid", [80483], ["AF_INET", 61944, "127.0.0.1", "127.0.0.1"]]
[2022-01-27 00:40:48] Kill switch #30589 Received UDP data ["/daemon/keep-alive", [], ["AF_INET", 60413, "127.0.0.1", "127.0.0.1"]]
[2022-01-27 00:40:48] Daemon received Pid data from Tau: [80483]
[2022-01-27 00:40:48] Daemon received UDP data from Tau: ["/tau/pid", [80483], ["AF_INET", 61944, "127.0.0.1", "127.0.0.1"]]
[2022-01-27 00:40:49] Daemon received Pid data from Tau: [80483]
[2022-01-27 00:40:49] Daemon received UDP data from Tau: ["/tau/pid", [80483], ["AF_INET", 61944, "127.0.0.1", "127.0.0.1"]]

scsynth.log:
Number of Devices: 4
   0 : "BlackHole 2ch"
   1 : "MacBook Pro Microphone"
   2 : "MacBook Pro Speakers"
   3 : "Multi-Output Device"

ERROR: Input sample rate is 48000, but output is 44100. Mismatched sample rates are not supported. To disable input, set the number of input channels to 0.
could not initialize audio.
libc++abi: terminating

gui.log:
[API] [INFO ] : daemon_stdout: 30589
[API] [INFO ] : daemon_stdout: 30584
[API] [INFO ] : daemon_stdout: 30583
[API] [INFO ] : daemon_stdout: 30585
[API] [INFO ] : daemon_stdout: 4560
[API] [INFO ] : daemon_stdout: 30588
[API] [INFO ] : daemon_stdout: +LZ7MA1L/AGE2X6Aq1KyFBLkSMPYvfdM71Bme8OsAHXnQeLWcluttXVy1OEMtSkeKE1Axq1mq7n1rp04ZgWHqA==
[API] [INFO ] : Setting up Boot Daemon keep alive loop
[API] [INFO ] : API Init Started...
[API] [INFO ] : API State set to: Initializing...
[API] [INFO ] : Going to start pinging server...
[API] [INFO ] : Starting UDP OSC Server on port 30584...
[API] [INFO ] : UDP OSC Server ready and listening
[API] [INFO ] : Pinging Spider Server until a response is received...
[API] [INFO ] : Waiting for Sonic Pi Spider Server to respond...
[GUI] [i18n] - Looping through preferred ui languages
[GUI] - Language setting: system_language
[GUI] - System language: en_GB
[GUI] [i18n] - Looping through preferred ui languages
[GUI] - Using language: en_GB
[GUI] [i18n] - Loading translations for en_GB
[GUI] - translations available 
[GUI] - hiding main window
[GUI] - initialising toolbar icons
[GUI] - setting up window structure
[Debug] Adding language combo box entries...
2
[Debug] Adding language system_language to the combo box
[Debug] Adding language en_GB to the combo box
[GUI] [i18n] - Warning: Predefined language name not found: 'en_Latn_GB'
[GUI] [i18n] - Warning: Predefined language name not found: 'fr_GB'
[GUI] [i18n] - Warning: Predefined language name not found: 'fr_FR'
[GUI] [i18n] - Warning: Predefined language name not found: 'fr_Latn_FR'
[GUI] [i18n] - Warning: Predefined language name not found: 'es_GB'
[GUI] [i18n] - Warning: Predefined language name not found: 'es_ES'
[GUI] [i18n] - Warning: Predefined language name not found: 'es_Latn_ES'
[GUI] - restoring scope states 
[GUI] - creating status bar
[GUI] - creating info panel
[GUI] - creating shortcuts
[GUI] - creating tool bar
[GUI] - initialising documentation window
[API] [ERROR] : Waiting Until Ready... 59
[API] [INFO ] : .
[API] [ERROR] : Waiting Until Ready... 58
[API] [INFO ] : .
[API] [ERROR] : Waiting Until Ready... 57
[API] [INFO ] : .
[API] [ERROR] : Waiting Until Ready... 56
[API] [INFO ] : .
[API] [ERROR] : Waiting Until Ready... 55
[API] [INFO ] : .
[API] [ERROR] : Waiting Until Ready... 54
[API] [INFO ] : .
[API] [ERROR] : Waiting Until Ready... 53
[API] [INFO ] : .
[API] [ERROR] : Waiting Until Ready... 52
[API] [INFO ] : .
[API] [ERROR] : Waiting Until Ready... 51
[API] [INFO ] : .
[API] [ERROR] : Waiting Until Ready... 50
[API] [INFO ] : .
[API] [ERROR] : Waiting Until Ready... 49
[API] [INFO ] : .
[API] [ERROR] : Waiting Until Ready... 48
[API] [INFO ] : .
[API] [ERROR] : Waiting Until Ready... 47
[API] [INFO ] : .
[API] [ERROR] : Waiting Until Ready... 46
[API] [INFO ] : .
[API] [ERROR] : Waiting Until Ready... 45
[API] [INFO ] : .
[API] [ERROR] : Waiting Until Ready... 44
[API] [INFO ] : .
[API] [ERROR] : Waiting Until Ready... 43
[API] [INFO ] : .
[API] [ERROR] : Waiting Until Ready... 42
[API] [INFO ] : .
[API] [ERROR] : Waiting Until Ready... 41
[API] [INFO ] : .
[API] [ERROR] : Waiting Until Ready... 40
[API] [INFO ] : .
[API] [ERROR] : Waiting Until Ready... 39
[API] [INFO ] : .
[API] [ERROR] : Waiting Until Ready... 38
[API] [INFO ] : .
[API] [ERROR] : Waiting Until Ready... 37
[API] [INFO ] : .
[API] [ERROR] : Waiting Until Ready... 36
[API] [INFO ] : .
[API] [ERROR] : Waiting Until Ready... 35
[API] [INFO ] : .
[API] [ERROR] : Waiting Until Ready... 34
[API] [INFO ] : .
[API] [ERROR] : Waiting Until Ready... 33
[API] [INFO ] : .
[API] [ERROR] : Waiting Until Ready... 32
[API] [INFO ] : .
[API] [ERROR] : Waiting Until Ready... 31
[API] [INFO ] : .
[API] [ERROR] : Waiting Until Ready... 30
[API] [INFO ] : .
[API] [ERROR] : Waiting Until Ready... 29
[API] [INFO ] : .
[API] [ERROR] : Waiting Until Ready... 28
[API] [INFO ] : .
[API] [INFO ] : UDP OSC Server no longer listening
[API] [ERROR] : Waiting Until Ready... 27
[API] [INFO ] : .
[API] [ERROR] : Oh no, Spider Server got to an Error State whilst starting...
[GUI] - Critical Error. Unable to connect to server..

[GUI] - Sonic Pi Server failed to start with this error message: 
      > Server Exception:
 exit
 ["/Applications/Sonic Pi dev.app/Contents/Resources/app/server/ruby/lib/sonicpi/scsynthexternal.rb:183:in `exit'", "/Applications/Sonic Pi dev.app/Contents/Resources/app/server/ruby/lib/sonicpi/scsynthexternal.rb:183:in `rescue in wait_for_boot'", "/Applications/Sonic Pi dev.app/Contents/Resources/app/server/ruby/lib/sonicpi/scsynthexternal.rb:181:in `wait_for_boot'", "/Applications/Sonic Pi dev.app/Contents/Resources/app/server/ruby/lib/sonicpi/scsynthexternal.rb:145:in `boot'", "/Applications/Sonic Pi dev.app/Contents/Resources/app/server/ruby/lib/sonicpi/scsynthexternal.rb:38:in `initialize'", "/Applications/Sonic Pi dev.app/Contents/Resources/app/server/ruby/lib/sonicpi/server.rb:81:in `new'", "/Applications/Sonic Pi dev.app/Contents/Resources/app/server/ruby/lib/sonicpi/server.rb:81:in `initialize'", "/Applications/Sonic Pi dev.app/Contents/Resources/app/server/ruby/lib/sonicpi/studio.rb:67:in `new'", "/Applications/Sonic Pi dev.app/Contents/Resources/app/server/ruby/lib/sonicpi/studio.rb:67:in `init_scsynth'", "/Applications/Sonic Pi dev.app/Contents/Resources/app/server/ruby/lib/sonicpi/studio.rb:44:in `initialize'", "/Applications/Sonic Pi dev.app/Contents/Resources/app/server/ruby/lib/sonicpi/lang/sound.rb:90:in `new'", "/Applications/Sonic Pi dev.app/Contents/Resources/app/server/ruby/lib/sonicpi/lang/sound.rb:90:in `block (2 levels) in included'", "/Applications/Sonic Pi dev.app/Contents/Resources/app/server/ruby/lib/sonicpi/lang/ixi.rb:72:in `block (2 levels) in included'", "/Applications/Sonic Pi dev.app/Contents/Resources/app/server/ruby/bin/sonic-pi-server.rb:241:in `new'", "/Applications/Sonic Pi dev.app/Contents/Resources/app/server/ruby/bin/sonic-pi-server.rb:241:in `<main>'"]

[GUI] - Sonic Pi Server failed to start with this error message: 
      > Critical error! Could not connect to Sonic Pi Server.

Looks like you’ve got a rate mismatch error:

1 Like

Oh, that’s weird, the sound devices are just set to the built-in microphone and speakers. I managed to fix the sample rate using Audio MIDI Setup so I can run Sonic Pi again, but not sure how/why it got changed in the first place.

I just checked MIDI and it seems to be working well (at least I can send MIDI notes to Helm).

When I quit, the window disappears, but the dot remains under the icon in the dock, and most/all the processes remain (there are 7 that I see). When I right-click on the icon I have the option to Force Quit, and when I select it the dot goes. However I can still see 5 processes running (daemon.rb, scsynth, boot-mac.sh, ruby, beam.smp), but if I wait, after about 30 seconds they shut down on their own.
I’ve uploaded the logs here.

I also noticed that it’s using the MacOS system ruby (version 2.6) which didn’t work for building the app - not sure if that’s an issue.