French President Emmanuel Macron says protesters who attacked government buildings need to pay for their crimes.