Install successfully 3.2.2 Linux Debian 10

The way I have overcome the positioning of libaubio library is to use the app/server/native/lib folder in which the library for libaubio-5.so is placed when you choose to build it from the unix_prebuild.sh (now renamed linux_prebuild.sh). I install libaubio5 as a package, use dpkg -L libaubio5 to show the library position and put a soft link in the native/lib to that file. NB I have to change the name too, as the linux package installs libaubio.so.5 and the native library expects libaubio-5.so

For anyone attempting to build on Linux at the latest commit Update linux-prebuild.sh
one or two pointers. You need two further erlang packages, erlang-dev and erlang-tools as well as the existing erlang-base
(erlang-dev satisfies the include erl_nif.h problems referred to further up this thread, and erlang-base enables the new build for the erlang tree using the erl -make command in linux-prebuild.sh).
I have successfull builds for Ubuntu 20.04 and Raspberry Pi OS 64bit version using the present linux-prebuild.sh script.
Sadly there appears to be a problem which I have not yet resolved in compiling the sp_midi package on Raspberry PI 32 bit OS which I have not yet resolved. It builds OK but gives an error when in use.

/usr/lib/arm-linux-gnueabihf/libsp_midi.so: undefined symbol: __atomic_fetch_xor_8

In summary, as Sam says, expect difficulties if you attempt building other than at release points. However, if you can get there it gives a nice buzz :slight_smile:

2 Likes

To erlang-dev: how do I get those headers into gcc-search-path when having compiled erlang from source? erl_nif.h is in /usr/local/lib/erlang/erts-11.0.2/include/erl_nif.h in my case.

I had the same problem on my Mac build (where I used brew installed erlang) which I kludged as follows.
First I set up a new folder in /usr/local/include/erlang and copied all the headers from the erlang/erts include folder there.
Secondly I edited the CMakeLists.tx file in the sp_midi folder and added the line
include_directories("/usr/local/include/erlang")
As I was building on Apple I put this in line 15 just after the if(Apple) line. Obviously you would want to put it elsewhere for a different platform.
This was probably a pretty horrendous way to do it but it worked. I think you have to put it pretty early on so that it is included before any source files.
I’m sure in time there will be a more elegant solution.

1 Like

I discovered the need for the erlang-dev package last night, as well as (in my case at least) OTP 23 for Erlang to properly compile without unknown symbol resolution failures :joy:

Finally got it on Ubuntu 19.10, documented everything here:
https://github.com/samaaron/sonic-pi/issues/2444

cool but why don’t you update to 20.04 ?
19.10 is outdate now https://ubuntu.com/about/release-cycle

This has now been addressed on the main branch :slight_smile: