mrklein / openfoam-os-x

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

-v2012 on Mac-m2-Ventura #89

Closed cloner0110 closed 1 year ago

cloner0110 commented 1 year ago

Hi and thanks for your efforts on this, I followed your instruction carefully, and in the last step (Allwmake) I face the following error regarding sigFpe.C, I attached the log file to this aswell, so could you guide me with this ?

2023-08-07 01:07:59 +0330
Starting compile OpenFOAM-v2012 Allwmake
  Clang system compiler
  darwin64ClangDPInt32Opt, with SYSTEMOPENMPI sys-openmpi
========================================

built wmake-bin (darwin64Clang)
Skip ThirdParty (no directory)
========================================
Compile OpenFOAM libraries

    ln: OpenFOAM/lnInclude
    ln: OSspecific/POSIX/lnInclude
wmake libo (POSIX)
    Ctoo: sigFpe.C
In file included from signals/sigFpe.C:48:
signals/feexceptErsatz.H:39:24: error: no member named '__control' in 'fenv_t'
    old_excepts = fenv.__control & FE_ALL_EXCEPT;
                  ~~~~ ^
signals/feexceptErsatz.H:42:10: error: no member named '__control' in 'fenv_t'
    fenv.__control &= ~new_excepts;
    ~~~~ ^
signals/feexceptErsatz.H:43:10: error: no member named '__mxcsr' in 'fenv_t'
    fenv.__mxcsr   &= ~(new_excepts << 7);
    ~~~~ ^
signals/feexceptErsatz.H:60:24: error: no member named '__control' in 'fenv_t'
    old_excepts = fenv.__control & FE_ALL_EXCEPT;
                  ~~~~ ^
signals/feexceptErsatz.H:63:10: error: no member named '__control' in 'fenv_t'
    fenv.__control |= new_excepts;
    ~~~~ ^
signals/feexceptErsatz.H:64:10: error: no member named '__mxcsr' in 'fenv_t'
    fenv.__mxcsr   |= new_excepts << 7;
    ~~~~ ^
6 errors generated.
make: *** [/Volumes/OpenFOAMs/OpenFOAM-v2012/build/darwin64ClangDPInt32Opt/src/OSspecific/POSIX/signals/sigFpe.o] Error 1
Done logging to 'log.darwin64ClangDPInt32Opt'

Allwmake.log

cloner0110 commented 1 year ago

Update : replacing the builtin **feexceptErsatz.H** in v2012 with the one provided in here, solved my problem. Hope this helps.