The "don't compile as root" argument is correct, that too is a bad idea. But that's exactly why traditional "./configure; make; sudo make install" instructions separate the initial build (using the default make target) from a the install target.
It's why binary packages for basically every platform are built using a controlled, non root-user environment, but installed using root-equivalent permissions.
Install software as root, eg by invoking sudo.
The "don't compile as root" argument is correct, that too is a bad idea. But that's exactly why traditional "./configure; make; sudo make install" instructions separate the initial build (using the default make target) from a the install target.
It's why binary packages for basically every platform are built using a controlled, non root-user environment, but installed using root-equivalent permissions.