sonic-pi-net / sonic-pi

Code. Music. Live.
https://sonic-pi.net
Other
10.83k stars 922 forks source link

issues with upgrade to ruby-aubio 0.3.3 and compile fast_osc the old-school way #2300

Closed rbnpi closed 3 years ago

rbnpi commented 4 years ago

Between them these two commits upset build on Rpi, Ubuntu and Debian. Now they need libaubio to be built by unix-prebuild.sh rather than working with libaubio5 as an apt install, and although fast_osc builds OK it does not seem to be recognised and falls back using ruby versions. Previously worked OK.

samaaron commented 4 years ago

Apologies, but it works on macOS and Windows which are my main focus right now. I don’t have any Linux systems to test on or time to test on them.

It should be fine though - this was the way I built everything on the pi for many years.

rbnpi commented 4 years ago

I'll investigate to see if I can see what is going wrong. One thought. Did you build from a pristine source? First time I tried on RPI fast_osc was recognised. I tried on a fresh source and it wasn;t. May be something was left behind...

rbnpi commented 4 years ago

The working solution at present seems to be the following. No changes to existing Sonic Pi sourcecode, BUT

  1. use the option to build aubio on unix-prebuld.sh
  2. sudo install gem fast_osc --version=1.2,2

Building fast_osc 1.2.2 with compile_ruby_extensions.rb works OK but when called it doesn't seem to be able to locate the library and falls back to the ruby replacement. Installing the gem in the system ruby (which is being used anyway) allows things to work. As far as aubio is concerned, the problem appears to be that the apt installed libaubio5 library is named libaubio.so.5 whereas the built aubio library from unix-prebuild.sh --build-aubio is named libaubio-5.so, so an alternative solution is to add a link in sonic-pi/app/server/native/lib

ln -s /path/to/apt/installed/libaubio.so.5 libaubio-5.so Although giving a quicker build, it may be preferable just to go with building the version via Sonic Pi.

ethancrawford commented 3 years ago

@rbnpi - any idea whether the above (or doing the same with our cut down version of aubio for onsets) is still a problem?

rbnpi commented 3 years ago

No I don't think it is a problem with the new version which is always built (and stored) from the source. I don't think libaubio is a dependency any more for that reason.