mrklein / openfoam-os-x

Patches for OpenFOAM(R) to build it on OS X
93 stars 33 forks source link

Encountered C++ import errors when making #79

Closed minhtriet closed 2 years ago

minhtriet commented 2 years ago

When running Allwmake, I received the following errors

In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/algorithm:641:
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/cstring:79:9: error: no member named 'strxfrm' in the global namespace
using ::strxfrm;
      ~~^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/cstring:80:9: error: no member named 'memchr' in the global namespace
using ::memchr;
      ~~^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/cstring:81:9: error: no member named 'strchr' in the global namespace
using ::strchr;
      ~~^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/cstring:82:9: error: no member named 'strcspn' in the global namespace
using ::strcspn;
      ~~^

What is the reason for this? Thank you

mrklein commented 2 years ago

Hi,

Thank you for the report, it would be nice to know:

minhtriet commented 2 years ago

Thank you for the swift answer. My config is

mrklein commented 2 years ago

It seems there is a problem with your installation. I have tried to reproduce the error and I was not able to.

OpenFOAM(R) 9 was successfully compiled on macOS 10.15.7 with clang 11.0.3. Though sw_vers output is a bit different

...
BuildVersion: 19H1715

Did you try updating you OS?

minhtriet commented 2 years ago

Hi, thank you. I ran everything again and was almost able to build OpenFoam.

The built finishes, but I received the error .../OpenFOAM/OpenFOAM-9/etc/config.sh/mpi: line 46: mpicc: command not found when trying to run cfMesh. I ran mpicc --version and the result is

Apple clang version 12.0.0 (clang-1200.0.32.29)
Target: x86_64-apple-darwin19.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

Rechecking my installation again, snappyHexMesh seems to work fine though

mrklein commented 2 years ago

Is this strange issue still relevant?

minhtriet commented 2 years ago

I gave up on it and used SimScale for my problem instead. Sorry.