Ubuntu 18.04: Sonic Pi aborts on startup

I followed the steps here to build Sonic Pi for Ubuntu 18.04.
I can build, but when I start Sonic Pi, it crashes with an abort:

sancho@sancho-Aspire-V3-772G:~/github/sonic-pi$ ./bin/sonic-pi
QApplication: invalid style override passed, ignoring it.

─ ╛▒╛
▐╫ ▄█├
─╟╛ █▄ ╪▓▀
╓┤┤┤┤┤┤┤┤┤ ╩▌ ██ ▀▓▌
▐▒ ╬▒ ╟▓╘ ─▓█ ▓▓├
▒╫ ▒╪ ▓█ ▓▓─ ▓▓▄
╒▒─ │▒ ▓█ ▓▓ ─▓▓─
╬▒ ▄▒ ╒ ╪▓═ ╬▓╬ ▌▓▄
╥╒ ╦╥ ╕█╒ ╙▓▐ ▄▓╫
▐╩ ▒▒ ▀▀
╒╪ ▐▄

   _____             __        ____  __
  / ___/____  ____  /_/____   / __ \/_/
  \__ \/ __ \/ __ \/ / ___/  / /_/ / /
 ___/ / /_/ / / / / / /__   / ____/ /
/____/\____/_/ /_/_/\___/  /_/   /_/

The Live Coding Music Synth for Everyone

        http://sonic-pi.net

[GUI] - reading settings
sonic-pi: /home/sancho/github/sonic-pi/app/gui/qt/external/scsynth_3_11_1_boost/boost/interprocess/segment_manager.hpp:861: void* boost::interprocess::segment_manager<CharType, MemoryAlgorithm, IndexType>::priv_generic_find(const CharT*, IndexType<boost::interprocess::ipcdetail::index_config<CharT, MemoryAlgorithm> >&, boost::interprocess::ipcdetail::in_place_interface&, boost::interprocess::segment_manager<CharType, MemoryAlgorithm, IndexType>::size_type&, boost::interprocess::ipcdetail::true_, bool) [with CharT = char; CharType = char; MemoryAlgorithm = boost::interprocess::rbtree_best_fitboost::interprocess::mutex_family; IndexType = boost::interprocess::iset_index; boost::interprocess::segment_manager<CharType, MemoryAlgorithm, IndexType>::size_type = long unsigned int; boost::interprocess::ipcdetail::true_ = boost::interprocess::ipcdetail::bool_]: Assertion `(ctrl_data->m_value_bytes % table.size) == 0’ failed.
./bin/sonic-pi: line 20: 14294 Aborted (core dumped) $DIR/…/app/gui/qt/build/sonic-pi

Can anyone help?
Thanks
Martin

SuperCollider (the sound engine that Sonic Pi uses) also uses the boost library. Others may correct me here if I’m wrong, but it’s possible that the version of boost installed was different to the one that is needed for SuperCollider. I’m not sure off the top of my head which version you’d require, but that’s quite possibly the problem.

How can I find out? It looks to me as though Sonic Pi is not using boost:

sancho@sancho-Aspire-V3-772G:~/github/sonic-pi$ ldd app/gui/qt/build/sonic-pi
linux-vdso.so.1 (0x00007ffdbd505000)
libQt5Network.so.5 => /usr/lib/x86_64-linux-gnu/libQt5Network.so.5 (0x00007f7ad9049000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f7ad8e41000)
libQt5Widgets.so.5 => /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 (0x00007f7ad85fa000)
libQt5Gui.so.5 => /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5 (0x00007f7ad7e91000)
libQt5Core.so.5 => /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 (0x00007f7ad7746000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f7ad7527000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f7ad719e000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f7ad6e00000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f7ad6be8000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f7ad67f7000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f7ad65da000)
libGL.so.1 => /usr/lib/x86_64-linux-gnu/libGL.so.1 (0x00007f7ad634e000)
libpng16.so.16 => /usr/lib/x86_64-linux-gnu/libpng16.so.16 (0x00007f7ad611c000)
libharfbuzz.so.0 => /usr/lib/x86_64-linux-gnu/libharfbuzz.so.0 (0x00007f7ad5e7e000)
libicui18n.so.60 => /usr/lib/x86_64-linux-gnu/libicui18n.so.60 (0x00007f7ad59dd000)
libicuuc.so.60 => /usr/lib/x86_64-linux-gnu/libicuuc.so.60 (0x00007f7ad5625000)
libdouble-conversion.so.1 => /usr/lib/x86_64-linux-gnu/libdouble-conversion.so.1 (0x00007f7ad5414000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f7ad5210000)
libglib-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007f7ad4ef9000)
/lib64/ld-linux-x86-64.so.2 (0x00007f7adb0ba000)
libGLX.so.0 => /usr/lib/x86_64-linux-gnu/libGLX.so.0 (0x00007f7ad4cc8000)
libGLdispatch.so.0 => /usr/lib/x86_64-linux-gnu/libGLdispatch.so.0 (0x00007f7ad4a12000)
libfreetype.so.6 => /usr/lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007f7ad475e000)
libgraphite2.so.3 => /usr/lib/x86_64-linux-gnu/libgraphite2.so.3 (0x00007f7ad4531000)
libicudata.so.60 => /usr/lib/x86_64-linux-gnu/libicudata.so.60 (0x00007f7ad2988000)
libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f7ad2716000)
libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007f7ad23de000)
libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f7ad21b6000)
libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007f7ad1fb2000)
libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f7ad1dac000)
libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0 (0x00007f7ad1b97000)

I have this installed:

sancho@sancho-Aspire-V3-772G:~/github/sonic-pi$ dpkg -l | grep boost
ii libboost-date-time1.65.1:amd64 1.65.1+dfsg-0ubuntu5 amd64 set of date-time libraries based on generic programming concepts
ii libboost-dev:amd64 1.65.1.0ubuntu1 amd64 Boost C++ Libraries development files (default version)
ii libboost-filesystem1.62.0:amd64 1.62.0+dfsg-5 amd64 filesystem operations (portable paths, iteration over directories, etc) in C++
ii libboost-filesystem1.65.1:amd64 1.65.1+dfsg-0ubuntu5 amd64 filesystem operations (portable paths, iteration over directories, etc) in C++
ii libboost-iostreams1.65.1:amd64 1.65.1+dfsg-0ubuntu5 amd64 Boost.Iostreams Library
ii libboost-locale1.65.1:amd64 1.65.1+dfsg-0ubuntu5 amd64 C++ facilities for localization
ii libboost-regex1.65.1:amd64 1.65.1+dfsg-0ubuntu5 amd64 regular expression library for C++
ii libboost-system1.62.0:amd64 1.62.0+dfsg-5 amd64 Operating system (e.g. diagnostics support) library
ii libboost-system1.65.1:amd64 1.65.1+dfsg-0ubuntu5 amd64 Operating system (e.g. diagnostics support) library
ii libboost-thread1.62.0:amd64 1.62.0+dfsg-5 amd64 portable C++ multi-threading
ii libboost-thread1.65.1:amd64 1.65.1+dfsg-0ubuntu5 amd64 portable C++ multi-threading
ii libboost1.65-dev:amd64 1.65.1+dfsg-0ubuntu5 amd64 Boost C++ Libraries development files

Thanks
Martin

Hi, @sancho1980, for me it starts allright and I also have 1.65:

libboost-all-dev                                1.65.1.0ubuntu1

In your post there are some lines with 1.62, however. May re-installing the boost package is worth a try?

Ben

Hi,

Just to point out that the sonic-pi/BUILD-LINUX.md at main · sonic-pi-net/sonic-pi · GitHub is a bit messy with instructions for xcode inside… I guess the source was the BUILD-MAC.md.

That was a commit made by mistake, now updated :grinning_face_with_smiling_eyes:

1 Like

IMHO we shouldn’t propose such a file without testing it in real life :slight_smile:. I just try quickly on ubuntu 18.04.05 and it fails cause cmake version etc. So why let people believe they can do it easily following the steps. Btw i will try and come back to add some details if i get it on working.

Edit : i would add that this post is now caduque Install Sonic Pi 3.3 beta on Ubuntu 20.04 : very easy.

Edit 02 : this may help Install from sources on ubuntu 18.04.05 - spi3.3dev . Erlang?

We are already thinking about addressing this soon by switching to keeping the ‘main’ branch ‘clean’, and only merging things into it from other branches once it is reasonably well tested, instead of effectively having only one development branch.

1 Like

@sancho1980

no pb with aubio ? Cmake version ?

Hello,
just a quick update:
Yes I had problems with aubio and cmake, but as advised elsewhere:

  1. I built and installed cmake from source
  2. I added “–build-aubio” to command “/linux-prebuild.sh --build-aubio”, as suggested in an earlier version of these instructions (now gone).

So I just tried again after changing the following:

  1. I uninstalled all apt-installed boost-related packages with version 62.
  2. I installed an up-to-date version of erlang, as described here: w w w .erlang-solutions.com/resources/download.html
  3. Instead of providing option “–build-aubio” to command “/linux-prebuild.sh”, i created a symlink to /usr/lib/x86_64-linux-gnu/libaubio.so under /usr/lib/x86_64-linux-gnu/libaubio.so.1 as described here: [solved] `Could not open library 'libaubio'` on ubuntu 20.04 · Issue #2368 · sonic-pi-net/sonic-pi · GitHub

I was again able to build, but keep getting the same error when I start Sonic Pi:

PS: Why the heck can I post only two links?

I don’t know for sure, but quite possibly because you are a brand new user to the forum. Discourse has various automated trust levels.

I have also tried to build Sonic Pi on Ubuntu 20.04 but at the last step the process fails in building Sonic Pi. This is the error I get: verbgio@verbgio-S500CA:~/Development/sonic-pi/app/gui/qt/build$ cmake --build . --config Release
[ 0%] Automatic MOC for target QScintilla
[ 0%] Built target QScintilla_autogen
[ 98%] Built target QScintilla
[ 99%] Automatic MOC for target sonic-pi
[ 99%] Built target sonic-pi_autogen
[ 99%] Linking CXX executable sonic-pi
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/…/…/…/x86_64-linux-gnu/Scrt1.o: in function _start': (.text+0x24): undefined reference to main’
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/sonic-pi.dir/build.make:93: sonic-pi] Errore 1
make[1]: *** [CMakeFiles/Makefile2:99: CMakeFiles/sonic-pi.dir/all] Errore 2
make: *** [Makefile:84: all] Errore 2

may i encourage you to create a specific post for ubuntu 20.04 as the packages are different from 18.04.
Cheers !

1 Like

So is there no one who is able to build (and run) a more or less recent version of Sonic Pi on Linux (not counting Raspberry)? If there is, what distro, version, architecture? Any guidance how to proceed?

I have managed to install the github version today on a 20.04 but there is a but not on a fresh installed system. So I can not guide you but I am pretty sure things are gone to be better very soon. So see you soon :relaxed:

Ok, I just updated my Ubuntu installation to 20.04.1 and tried to run Sonic Pi. Instead of an abort, it now seems to hang on startup. After a while I get a pop up telling me it was not possible to start, with the following details:

Sonic Pi Boot Error Report

System Information

  • Sonic Pi version: 3.3-BETA-4
  • OS: Ubuntu 20.04.1 LTS

GUI Log

/home/sancho/.sonic-pi/log/gui.log

[GUI] - Welcome to the Sonic Pi GUI
[GUI] - ===========================
[GUI] -                            
[GUI] - {e7f02168-a870-451c-9024-231e6f048d43}
[GUI] - Discovering port numbers...
[GUI] - Port entry server-listen-to-gui : 51235 : 51235
[GUI] - Port entry gui-send-to-server : 51235 : 51235
[GUI] - Port entry gui-listen-to-server : 51236 : 51236
[GUI] - Port entry server-send-to-gui : 51236 : 51236
[GUI] - Port entry scsynth : 51237 : 51237
[GUI] - Port entry scsynth-send : 51237 : 51237
[GUI] - Port entry server-osc-cues : 4560 : 4560
[GUI] - Port entry erlang-router : 51238 : 51238
[GUI] - Port entry websocket : 51239 : 51239
[GUI] - Detecting port numbers...
[GUI] - GUI listen to server port 51236
[GUI] -    port: 51236 [OK]
[GUI] - Server listen to gui port 51235
[GUI] -    port: 51235 [OK]
[GUI] - Server incoming OSC cues port 4560
[GUI] -    port: 4560 [OK]
[GUI] - Scsynth port 51237
[GUI] -    port: 51237 [OK]
[GUI] - Server send to GUI port 51236
[GUI] -    port: 51236 [OK]
[GUI] - GUI send to server port 51235
[GUI] -    port: 51235 [OK]
[GUI] - Scsynth send port 51237
[GUI] -    port: 51237 [OK]
[GUI] - Erlang router port 51238
[GUI] -    port: 51238 [OK]
[GUI] - Websocket port 51239
[GUI] -    port: 51239 [OK]
[GUI] - All ports OK
[GUI] - launching Sonic Pi Runtime Server:
[GUI] - Ruby server pid registered: 1891
[GUI] - hiding main window
[GUI] - initialising toolbar icons
[GUI] - setting up window structure
[GUI] - restoring scope states 
[GUI] - creating status bar
[GUI] - creating info panel
[GUI] - creating shortcuts
[GUI] - creating tool bar
[GUI] - initialising documentation window
[GUI] - wait for sync
[GUI] - waiting for Sonic Pi Server to boot...
[GUI] - starting UDP OSC Server on port 51236...
[GUI] - UDP OSC Server ready and listening
............................................................
[GUI] - Critical error! Could not boot Sonic Pi Server.
[GUI] - stopping UDP OSC Server...
[GUI] - Critical Error. Unable to connect to server..
[GUI] - UDP OSC Server no longer listening

Server Errors

/home/sancho/.sonic-pi/log/server-errors.log

/usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require': cannot load such file -- ffi_c (LoadError)
	from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
	from /home/sancho/github/sonic-pi/app/server/ruby/vendor/ffi-1.11.3/lib/ffi.rb:6:in `rescue in <top (required)>'
	from /home/sancho/github/sonic-pi/app/server/ruby/vendor/ffi-1.11.3/lib/ffi.rb:3:in `<top (required)>'
	from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
	from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
	from /home/sancho/github/sonic-pi/app/server/ruby/vendor/ruby-aubio-0.3.3/lib/aubio/aubio-ffi.rb:3:in `<top (required)>'
	from /home/sancho/github/sonic-pi/app/server/ruby/vendor/ruby-aubio-0.3.3/lib/aubio.rb:2:in `require_relative'
	from /home/sancho/github/sonic-pi/app/server/ruby/vendor/ruby-aubio-0.3.3/lib/aubio.rb:2:in `<top (required)>'
	from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
	from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
	from /home/sancho/github/sonic-pi/app/server/ruby/lib/sonicpi/samplebuffer.rb:17:in `<top (required)>'
	from /home/sancho/github/sonic-pi/app/server/ruby/lib/sonicpi/studio.rb:16:in `require_relative'
	from /home/sancho/github/sonic-pi/app/server/ruby/lib/sonicpi/studio.rb:16:in `<top (required)>'
	from /home/sancho/github/sonic-pi/app/gui/qt/build/../../../../app/server/ruby/bin/sonic-pi-server.rb:20:in `require_relative'
	from /home/sancho/github/sonic-pi/app/gui/qt/build/../../../../app/server/ruby/bin/sonic-pi-server.rb:20:in `<main>'
/usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require': cannot load such file -- 2.7/ffi_c (LoadError)
	from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
	from /home/sancho/github/sonic-pi/app/server/ruby/vendor/ffi-1.11.3/lib/ffi.rb:4:in `<top (required)>'
	from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
	from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
	from /home/sancho/github/sonic-pi/app/server/ruby/vendor/ruby-aubio-0.3.3/lib/aubio/aubio-ffi.rb:3:in `<top (required)>'
	from /home/sancho/github/sonic-pi/app/server/ruby/vendor/ruby-aubio-0.3.3/lib/aubio.rb:2:in `require_relative'
	from /home/sancho/github/sonic-pi/app/server/ruby/vendor/ruby-aubio-0.3.3/lib/aubio.rb:2:in `<top (required)>'
	from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
	from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
	from /home/sancho/github/sonic-pi/app/server/ruby/lib/sonicpi/samplebuffer.rb:17:in `<top (required)>'
	from /home/sancho/github/sonic-pi/app/server/ruby/lib/sonicpi/studio.rb:16:in `require_relative'
	from /home/sancho/github/sonic-pi/app/server/ruby/lib/sonicpi/studio.rb:16:in `<top (required)>'
	from /home/sancho/github/sonic-pi/app/gui/qt/build/../../../../app/server/ruby/bin/sonic-pi-server.rb:20:in `require_relative'
	from /home/sancho/github/sonic-pi/app/gui/qt/build/../../../../app/server/ruby/bin/sonic-pi-server.rb:20:in `<main>'

Server Output

/home/sancho/.sonic-pi/log/server-output.log


Scsynth Output

/home/sancho/.sonic-pi/log/scsynth.log


Process Log

/home/sancho/.sonic-pi/log/processes.log

No pids store found here: /tmp/sonic-pi-pids
Exiting
Creating pids store: /tmp/sonic-pi-pids
Started [1891] [-] /usr/bin/ruby --enable-frozen-string-literal -E utf-8 /home/sancho/github/sonic-pi/app/gui/qt/build/../../../../app/server/ruby/bin/sonic-pi-server.rb -u 51235 51236 51237 51237 4560 51238 51239 [-] /tmp/sonic-pi-pids/1891



@sancho1980 - do you have libffi installed on your system?

1 Like

sancho@sancho-Aspire-V3-772G:~$ dpkg -l | grep libffi
ii libffi-dev:amd64 3.3-4 amd64 Foreign Function Interface library (development files)
ii libffi7:amd64 3.3-4 amd64 Foreign Function Interface library runtime

Check if Jack is running via Qjackctl.
i have to launch Jack manually before sonic pi

It looks like the Ruby gems with native binaries couldn’t build or aren’t available on your system.

Could you navigate to app/server/ruby and do a tree on rb-native. Do you see a bunch of compiled library files?

For example, on my RPi system I see:

λ tree rb-native
rb-native
└── 2.5.0
    ├── atomic_reference.so
    ├── ffi_c.so
    ├── ruby_prof.so
    └── rugged.so

1 directory, 4 files