The answer depends upon whether the seller knew the structure did not have local government approval.
If the seller did not know then the contract would proceed to settlement without any further obligation upon the seller.
If the seller did know but did not disclose that fact to the agent to in turn relay to prospective buyers then the contract would proceed to settlement. In this instance the buyer could take action against the seller to recoup any damages they incurred as a result of the seller not disclosing relevant information.