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
  • #2146
Closed
Open
Issue created Jul 01, 2021 by Philip Cardiff@philipc

Compilation of meshTools/searchableSurfaces/searchableSphere/searchableSphere.C needs "#include <array>" with clang 12.0.5 (macOS)

Summary

On OpenFOAM-v2012, ${FOAM_SRC}/meshTools/searchableSurfaces/searchableSphere/searchableSphere.C requires that the "#include <array>" header is added to the top of the file when compiling with clang 12.0.5 (macOS 11.4, arm).

Steps to reproduce

Try compile OpenFOAM-v2012 on a case-sensitive partition on macOS 11.4 (arm) using Clang, Apple clang version 12.0.5 (clang-1205.0.22.9).

Example case

N/A

What is the current bug behaviour?

Compilation error.

What is the expected correct behavior?

It compiles :)

Relevant logs and/or images

N/A

Environment information

  • OpenFOAM version : v2012
  • Operating system : macOS 11.4 (arm)
  • Hardware info : Apple m1 arm CPU
  • Compiler : Apple clang version 12.0.5 (clang-1205.0.22.9), with target arm64-apple-darwin20.5.0

Possible fixes

Line 528 in searchableSphere.C causes the error:

std::array<uint8_t, 3> idx{0, 1, 2};

A quick fix is to add the array header at the top of the file:

#include "searchableSphere.H"
#include "addToRunTimeSelectionTable.H"
#include <array>
Assignee
Assign to
Time tracking