Oops; obviously I meant gtk 3.24, not 2.24. Also, I forgot to mention that I uncommented the relevant lines in /usr/bin/emacs to set the environment variables.