Who built the first stone castles?

willam the great built the first stone castle