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 426
    • Issues 426
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 8
    • Merge requests 8
  • Deployments
    • Deployments
    • Releases
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Development
  • openfoamopenfoam
  • Issues
  • #2013
Closed
Open
Issue created Feb 24, 2021 by Guanyang Xue@xuegy

wmake-with-bear doesn't work with macOS properly

Summary

wmake-with-bear doesn't work with macOS properly

Steps to reproduce

Use the patch provided by https://github.com/mrklein/openfoam-os-x (tested with normal installation, no problem).

$ brew install bear
$ bear --version
bear 3.0.8
$ ./Allwmake -with-bear > log.Allwmake 2>&1

Example case

What is the current bug behaviour?

sed: 1: "1{ s/^[^0-9]*\([1-9]\)/ ...": bad flag in substitute command: '}'
Warning: bear not found
Stopping

This is caused by the macOS variant of sed.

Need to install gnu-sed in Homebrew and add PATH="/usr/local/opt/gnu-sed/libexec/gnubin:$PATH"

However installing too many conflicting packages is not a good idea.

What is the expected correct behavior?

Relevant logs and/or images

Environment information

  • OpenFOAM version : v2012
  • Operating system : macOS
  • Hardware info : x86
  • Compiler : Clang

Possible fixes

Implement a universal command (or consider awk) to extract the version number.

For example, removing the curly brackets {} works in macOS.

Edited Feb 24, 2021 by Guanyang Xue
Assignee
Assign to
Time tracking