I don’t have a 3d printer, but I have compiled Marlin 2.0.x to help someone here a while back, step by step details at Why do I get this error everytime I try to build the new marlin firmware - #31 by NormanDunbar which might help.
Can you post your step by step details to see if we can help? Thanks.
Cheers,
Norm.