Midiout build error

Hi! Before I say this I should probably mention that I’m on Solus OS, so I have cloned the sonic-pi repo and I’m starting to build it.

During ./linux-prebuild.sh I get the following error:

/home/benstigsen/Downloads/sonic-pi/app/external/sp_midi/src/midiout.cpp: In member function ‘void MidiOut::send(const std::vector<unsigned char>*)’:
/home/benstigsen/Downloads/sonic-pi/app/external/sp_midi/src/midiout.cpp:62:28: error: invalid conversion from ‘const std::vector<unsigned char>*’ to ‘std::vector<unsigned char>*’ [-fpermissive]
   62 |     m_midiOut->sendMessage(msg);
      |                            ^~~
      |                            |
      |                            const std::vector<unsigned char>*
In file included from /home/benstigsen/Downloads/sonic-pi/app/external/sp_midi/src/midiout.h:29,
                 from /home/benstigsen/Downloads/sonic-pi/app/external/sp_midi/src/midiout.cpp:24:
/usr/include/rtmidi/RtMidi.h:561:67: note:   initializing argument 1 of ‘void RtMidiOut::sendMessage(std::vector<unsigned char>*)’
  561 | inline void RtMidiOut :: sendMessage( std::vector<unsigned char> *message ) { ((MidiOutApi *)rtapi_)->sendMessage( message ); }
      |                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
gmake[5]: *** [CMakeFiles/libsp_midi.dir/build.make:107: CMakeFiles/libsp_midi.dir/src/midiout.cpp.o] Error 1
gmake[4]: *** [CMakeFiles/Makefile2:86: CMakeFiles/libsp_midi.dir/all] Error 2
gmake[3]: *** [Makefile:94: all] Error 2
gmake[2]: *** [CMakeFiles/sp_midi.dir/build.make:86: sp_midi-prefix/src/sp_midi-stamp/sp_midi-build] Error 2
gmake[1]: *** [CMakeFiles/Makefile2:99: CMakeFiles/sp_midi.dir/all] Error 2
gmake: *** [Makefile:91: all] Error 2

What do I do?

@benstigsen - it may be more useful to raise this as a ticket on GitHub - we try to manage all build-related issues there :slight_smile: happy to try to troubleshoot this over there if you’re able to do that :+1:

1 Like

Yes, I have now opened an issue on GitHub: midiout build error · Issue #2981 · sonic-pi-net/sonic-pi · GitHub

2 Likes