Yes, you do need a GUI display (IE logged into KDE) to compile, you can’t do it if you’re just SSH’d into a shell for instance. For whatever reason shader_builder opens a tiny little window briefly so it needs an X environment.
If you’re trying to do this remote via SSH, if the workstation is sitting there logged into KDE as a user or even sitting at the login window, try doing:
env sets environment variables, in this case just one called DISPLAY set to :0 and then runs whatever’s after it in that environment, which, on Linux, tells a GUI app you’re wanting it to use display 0 which is your main monitor.
Why that works (or even means anything) on Mac, I’m not really sure!