You have stripped the most relevant error message from your output, but since this is a very frequently asked question, I guess you simply haven't installed flex yet:
https://sourceforge.net/p/linuxsampler/ ... /36758576/
And since you are using a Debian based system I recommend you to compile .deb packages instead of your manual installation approach, which would have resolve this particular issue automatically as well:
cd TOPLEVELSOURCEDIR
dpkg-buildpackage -b
Because if anything is missing for building the sampler, then it immediately tells you what package(s) to install on your system. And you will also avoid many other issues that might happen sooner or later that would happen with your manual "make install" solution, because manual "make install" e.g. often leads to people having several, conflicting versions of the sampler, libgig, and co. on their systems after some years, leading to confusing compiler errors and/or runtime errors and crashes.