Just in case you are unaware, these build issues are entirely solvable by defining a Nix flake for your project, resulting in a repeatable, reproducible build every time:
Until they're not, at which point if you're not a nix+flake wizard you're completely at sea :)