Hopefully you are reading this even with the silly title. One thing I love about sailfish is that it is a linux distro, and as such can do things like compile third party apps. I compile on the gemini, and it is actually pretty good.
How are you compiling? I assume you've downloaded the customary tools and the source tarballs -- are you compiling from mainstream source repositories, some trick port repositories, or what? It would be cool if we could d/l the tarball of any old thing and compile it, but this sounds almost too easy.
That is pretty much all I do. I have installed the gcc tools, make, cmake etc. I cloned (git) the ffmpeg source, ran ./configure, added the correct options - namely --arch=armv8 (it fails with aarch64 btw), added the required libraries and compiled. Make sure you do something like:
make -j 9
So that you use 9 threads (CPUs). I was generous and left one for the gemini to keep doing its thing. I also patched a few things to get the correct rotation, as the gemini by default is LandscapeInverted. SDL2 sound still isn't working, but from what I can see it is an SDL/pulseaudio thing - still looking into it. The video plays well though - much better than the builtin gstreamer, or LLsVideoPlayer. Sailfish uses wayland, but has SDL2 and GLES libs, so if your app can make use of SDL, then all is good. I don't have Xwayland running, so pretty much all X apps wont run without mods. Qt stuff should work as well.
I am starting to learn QML - might as well play nicely. For that, there is a native IDE called tIDE - which works well. You can create projects, edit, run, build and package from tIDE. Its almost painless
You can of course build/run command line apps, eg. inotifywait. I got mplayer compiling, but it would only use the frame buffer and didn't play nicely with Qt (flicker between background and video). So it is possible to do, but due to wayland, systemd (hiss), pulseaudio (bigger hiss), it can be a bit of a hard slog. Have a play and see how far you get.