One problem I see often with local builds are Makefiles that use modern GNU features in common commands like
tar. If the product only runs on Linux, writing backwards compatible versions for the older BSD-based commands on Macs may not be an effective use of time.
A simple fix is to
libexec/gnubin directory to your path as documented here: Install and Use GNU Command Line Tools on macOS. However this changes your active environment, which might break scripts expecting to run on macOS. Further, this isn’t a repeatable configuration that can be safely used by others.
A better way is to explicitly configure the GNU versions to ensure they are used during the build. Read More