mrklein / openfoam-os-x

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

OpenFOAM 10 #81

Closed matteoicardi closed 2 years ago

matteoicardi commented 2 years ago

anyone tried to compile OF10? is the dev patch enough?

matteoicardi commented 2 years ago

I tried with the -dev patch and it (almost) works. only this error appears /Volumes/OpenFOAM/OpenFOAM-10/platforms/darwin64ClangDPInt32Opt/src/surfMesh/surfaceFormats/stl/STLsurfaceFormatASCII.L.C:6007:18: error: out-of-line definition of 'LexerInput' does not match any declaration in 'yyFlexLexer' int yyFlexLexer::LexerInput( char* buf, int max_size ) ^~~~~~~~~~ which seems to be related to what mentioned here

I have flex and bison updated from homebrew and added to the correct paths and OF8 and OF9 compile without issues

mrklein commented 2 years ago

There were minor conflicts during dev patch application (which can be ignored).

Concerning your flex problem: I cannot reproduce it. With

$ flex --version
flex 2.6.4 Apple(flex-34)

Everything is built without any difficulties.

mrklein commented 2 years ago

I have added OpenFOAM 10 patch. It compiles without any problems on

$ sw_vers 
ProductName:    macOS
ProductVersion: 12.5
BuildVersion:   21G72

with

$ clang++ --version
Apple clang version 13.1.6 (clang-1316.0.21.2.5)
Target: x86_64-apple-darwin21.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
matteoicardi commented 2 years ago

Thanks @mrklein ! the problem with flex I had was because I was using the homebrew version. I switched back to the Apple version and it works fine.