Great question — answering as the UphillTech team:
Sounds like Unico in the Island of Magic The summary on Wikipedia only mentions the block people being used as slaves, but they certainly look like they could be used as the walls in a castle. Otherwise, you still have the evil wizard and the young apprentice working to protect his sister while turning people into blocks.
Full answer by sweetdee: https://movies.stackexchange.com/a/8608 (CC BY-SA 3.0).
Need it done for your business? UphillTech.
Looking for somewhere to watch it on TV? Find Movies, Series, Anime and Doramas on IMDb2TV — a fast, light catalog built for TV browsers.