Yes, you can compile on the gemini. You just need to install a compiler. The simplest is build-essentials, which installs gcc and a host of utils. The libraries you need depend on what you are compiling. A simple hello world application won't need any other libraries. A lot of open source projects will have requirements which can either be installed with apt-get or compiled from source.
You can even compile in android if you install something like termux. The ARM is probably the second most popular linux variant after x86/64, and as such is widely supported. Debian on gemini is really no different to debian on the desktop, just a different architecture.