I remember reading a novel about a city that moved across the landscape by continually being disassembled at the rear and those materials used to build at the front. The inhabitants had to walk from the back to the front when they were displaced. In the story the city has stopped, and eventually it's discovered by a displaced citizen that the front of the structure has collapsed as it was built in the water.
I can't remember the name of the book, and whenever I try to search for it all that comes up is Mortal Engines!