I understand that the web of various tax laws and trade agreements makes this impossible though. 80 years of cruft is too much to sift through to improve things in one fell swoop I suppose.
My understanding is that the whole problem stems from companies being able to choose. Apple chose to pay taxes in Ireland for some things, because Ireland gave them a tax advantage, thus avoiding taxes in other European countries.
Allowing import tariffs between EU countries would maybe help with this but cause other problems. The EU free market isn't a whim, it has good reasons to exist and significant benefits.
There is no "clear way" to fix this. If there was, it would be used already.
What do you mean by "this"? When I said "this", I meant this specific form of tax avoidance. There is a clear way to fix it, as I mentioned.
When you say "this" it seems like you mean tax avoidance in general, in which case I would agree that there is no clear way to fix it.
Ordinary people that have written books or songs or otherwise earn royalties from creative works on a regular basis could probably have arranged for ownership of their royalties to be owned by a complex corporate structure as well, but I don't know that very many ordinary people earn enough in royalties that tax avoidance is worth the setup and maintenance costs.