Permanent Alliances are BROKEN. You cannot form one during the course of a CUSTOM singleplayer game you can only set them at the beginning of a game. I've used the world-builder to cheat in all ways imaginable to try and get a permanent alliance with Greece. I had a VERY good diplomatic relationship with all sorts of + 's from different things and only a single -1 from close borders. When I finally stopped getting the message "We have not had a defensive pact or shared a military struggle long enough" he started saying "You have grown too powerful for us." So I decide to use Worldbuilder to increase his cities populations, military and add important buildings to his cities. This brings his score up to just under half of my own. Now he simply says, "We're doing just fine on our own."
I'm convinced you cannot form one with the exception of setting it at the beginning of the game.