I presume from your other post that you are on Ubuntu 18.04. I have that OS at home but I am away at the moment so I cannot test this. It works ok on my laptop running Ubuntu 20.04.2 LTS.
However on line 33 of MidiDeviceFluidSynth.cpp you could try deleting the const keyword work. If that does not work just comment out the whole of the debug_settings_foreach_func function along with line 127 where is called. that function does nothing important and is only used for debugging.
Thank you for posting your other topics to the forum I will try and reply next week when I get back home. Sorry for the slow reply I have been rather distracted with other things and other projects.
I downloaded an AppImage of the newer version and it works just fine. I love this software. It seems that the version from the Ubuntu repositories is just outdated. I don't know who is responsible for that. Anyways, even though the AppImage works fine I still want to figure out how to build it from source. Thanks for your suggestion!