Sorry about the previous message, I didn’t read this one:
I did brew uninstall mrtrix3_0rc3 and then followed their indications.
I think I had two problems then:
The gcc problem
The qt problem
I think the first problem was solved when I did mv /usr/local/include ./urs/local/include_old, and the second problem when I followed the indications in the post I referenced above.