Missing "make" causes misleading error about missing C++ compiler rule
In the event that wmake is installed but make is not (eg in the case of a binary installation on a very clean cloud server environment), RunFunctions incorrectly reports that there is no rule for C++ compilation. This is due to the code not validating the existence of "make".
Steps to reproduce
On an Ubuntu system that does not have make installed but does have the 2012 binaries installed and the proper PATH configuration, attempt to Allrun one of the tutorials.
The real cause can be seen if you
sh -x ./Allrun and note the "swallowed" error from wmake that is exposed.
What is the current bug behaviour?
"missing C++ rule, cannot compile" error
What is the expected correct behavior?
"No make command found ... cannot compile"
Relevant logs and/or images
- OpenFOAM version : v2012
- Operating system : ubuntu
- Hardware info : n/a
- Compiler : gcc
This can be fixed by adding the following at or about line 67 (that's the correct place as of when I'm submitting this) of RunFunctions:
if ! command -v make > /dev/null then echo "No make command found ... cannot compile" 1>&2 return 1 fi