Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • openfoam openfoam
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 420
    • Issues 420
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 7
    • Merge requests 7
  • Deployments
    • Deployments
    • Releases
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Development
  • openfoamopenfoam
  • Issues
  • #2077
Closed
Open
Issue created Apr 28, 2021 by Michael Bazarewsky@MikeBaz

Missing "make" causes misleading error about missing C++ compiler rule

Summary

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.

Example case

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

Environment information

  • OpenFOAM version : v2012
  • Operating system : ubuntu
  • Hardware info : n/a
  • Compiler : gcc

Possible fixes

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
Assignee
Assign to
Time tracking