CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Installation

[OpenFOAM.com] Install v2006 on macOS Mojave failed

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 13, 2020, 05:17
Default Install v2006 on macOS Mojave failed
  #1
New Member
 
Join Date: Aug 2020
Posts: 1
Rep Power: 0
mderzhou is on a distinguished road
Hi,

I tried to install OpenFOAM v2006 from terminal on macOS Mojave. I followed the instruction https://develop.openfoam.com/Develop...p/doc/Build.md.

step1, source ~/OpenFOAM/OpenFOAM-v2006/etc/bashrc, it shows
Quote:
Darwin support is clang/llvm only
step2, foamSystemCheck, it shows
Quote:
Checking basic system...
-------------------------------------------------------------------------------
Shell: bash
Host: localhost
OS: Darwin version 18.6.0
User: yunong

System check: PASS
==================
Can continue to OpenFOAM installation.
step3, foam, it changes the directory to OpenFOAM;

step4, I got the trouble as shown below
Quote:
Compile OpenFOAM libraries

ln: OpenFOAM/lnInclude
ln: OSspecific/POSIX/lnInclude
wmake libo (POSIX)
clang++ -std=c++11 -m64 -pthread -ftrapping-math -DOPENFOAM=2006 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -Wno-undefined-var-template -Wno-unknown-warning-option -O3 -DNoRepository -ftemplate-depth-100 -iquote. -IlnInclude -I/Users/yunong/OpenFOAM/OpenFOAM-v2006/src/OpenFOAM/lnInclude -I/Users/yunong/OpenFOAM/OpenFOAM-v2006/src/OSspecific/POSIX/lnInclude -fPIC -c POSIX.C -o /Users/yunong/OpenFOAM/OpenFOAM-v2006/build/darwin64ClangDPInt32Opt/src/OSspecific/POSIX/POSIX.o
In file included from POSIX.C:37:
In file included from /Users/yunong/OpenFOAM/OpenFOAM-v2006/src/OpenFOAM/lnInclude/OSspecific.H:42:
In file included from /Users/yunong/OpenFOAM/OpenFOAM-v2006/src/OpenFOAM/lnInclude/fileNameList.H:49:
In file included from /Users/yunong/OpenFOAM/OpenFOAM-v2006/src/OpenFOAM/lnInclude/fileName.H:51:
In file included from /Users/yunong/OpenFOAM/OpenFOAM-v2006/src/OpenFOAM/lnInclude/word.H:46:
In file included from /Users/yunong/OpenFOAM/OpenFOAM-v2006/src/OpenFOAM/lnInclude/string.h:55:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:505:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string_view:176:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__string:57:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:642:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstring:70:9: error:
no member named 'memcpy' in the global namespace
using ::memcpy;
~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstring:71:9: error:
no member named 'memmove' in the global namespace
using ::memmove;
~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstring:72:9: error:
no member named 'strcpy' in the global namespace
using ::strcpy;
~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstring:73:9: error:
no member named 'strncpy' in the global namespace
using ::strncpy;
~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstring:74:9: error:
no member named 'strcat' in the global namespace
using ::strcat;
~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstring:75:9: error:
no member named 'strncat' in the global namespace
using ::strncat;
~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstring:76:9: error:
no member named 'memcmp' in the global namespace
using ::memcmp;
~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstring:77:9: error:
no member named 'strcmp' in the global namespace
using ::strcmp;
~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstring:78:9: error:
no member named 'strncmp' in the global namespace
using ::strncmp;
~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstring:79:9: error:
no member named 'strcoll' in the global namespace
using ::strcoll;
~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstring:80:9: error:
no member named 'strxfrm' in the global namespace
using ::strxfrm;
~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstring:81:9: error:
no member named 'memchr' in the global namespace
using ::memchr;
~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstring:82:9: error:
no member named 'strchr' in the global namespace
using ::strchr;
~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstring:83:9: error:
no member named 'strcspn' in the global namespace
using ::strcspn;
~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstring:84:9: error:
no member named 'strpbrk' in the global namespace
using ::strpbrk;
~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstring:85:9: error:
no member named 'strrchr' in the global namespace
using ::strrchr;
~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstring:86:9: error:
no member named 'strspn' in the global namespace
using ::strspn;
~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstring:87:9: error:
no member named 'strstr' in the global namespace
using ::strstr;
~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstring:89:9: error:
no member named 'strtok' in the global namespace
using ::strtok;
~~^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
I tried to find out the solution, and I think the problem is the string.H in the src/OpenFOAM/lnInclude folder due to the conflict with the standard c header file.

Then I tried to change the string.H to another name, but it doesn't work. Any help or suggestion on this issue would be greatly appreciated.

Best regards
Attached Files
File Type: txt darwin64ClangDPInt32Opt.darwin64ClangDPInt32Opt.txt (9.0 KB, 1 views)
mderzhou is offline   Reply With Quote

Old   August 13, 2020, 18:28
Default
  #2
HPE
Senior Member
 
HPE's Avatar
 
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 931
Rep Power: 13
HPE is on a distinguished road
Would you mind to report the issue to the GitLab? Thanks.
HPE is offline   Reply With Quote

Old   August 17, 2021, 05:42
Default
  #3
Member
 
Gang Wang
Join Date: Oct 2019
Location: China
Posts: 64
Rep Power: 8
Gang Wang is on a distinguished road
Quote:
Originally Posted by mderzhou View Post
Hi,

I tried to install OpenFOAM v2006 from terminal on macOS Mojave. I followed the instruction https://develop.openfoam.com/Develop...p/doc/Build.md.

step1, source ~/OpenFOAM/OpenFOAM-v2006/etc/bashrc, it shows

step2, foamSystemCheck, it shows

step3, foam, it changes the directory to OpenFOAM;

step4, I got the trouble as shown below

I tried to find out the solution, and I think the problem is the string.H in the src/OpenFOAM/lnInclude folder due to the conflict with the standard c header file.

Then I tried to change the string.H to another name, but it doesn't work. Any help or suggestion on this issue would be greatly appreciated.

Best regards
Hi!

Did you solve this issue? I'm also bothered by this issue while installing OpenFOAM v2106 on the macOS bigsur.

Best regards,
Gang
Gang Wang is offline   Reply With Quote

Old   September 13, 2021, 10:35
Default
  #4
Member
 
Miguel Hernandez
Join Date: Feb 2021
Location: En mi casa
Posts: 56
Rep Power: 5
Miguel Hernandez is on a distinguished road
Quote:
Originally Posted by Gang Wang View Post
Hi!



Did you solve this issue? I'm also bothered by this issue while installing OpenFOAM v2106 on the macOS bigsur.



Best regards,

Gang


Hi!

I have problems too... I can not figure out how to compile OpenFOAM (9) on Bug Sur -Apple m1, compiling from source code...

Is there a guide to do it?

Thanks
Miguel Hernandez is offline   Reply With Quote

Old   September 13, 2021, 10:51
Default
  #5
Member
 
Gang Wang
Join Date: Oct 2019
Location: China
Posts: 64
Rep Power: 8
Gang Wang is on a distinguished road
Quote:
Originally Posted by Miguel Hernandez View Post
Hi!

I have problems too... I can not figure out how to compile OpenFOAM (9) on Bug Sur -Apple m1, compiling from source code...

Is there a guide to do it?

Thanks
Hi!

I've successfully installed the OpenFOAM v2106 on Big-sur. I think you need to create a virtual volume, by following the guidance here: https://github.com/mrklein/openfoam-os-x

Best regards,
Gang Wang
Gang Wang is offline   Reply With Quote

Old   September 13, 2021, 11:34
Default
  #6
Member
 
Gang Wang
Join Date: Oct 2019
Location: China
Posts: 64
Rep Power: 8
Gang Wang is on a distinguished road
Quote:
Originally Posted by Miguel Hernandez View Post
Hi!

I have problems too... I can not figure out how to compile OpenFOAM (9) on Bug Sur -Apple m1, compiling from source code...

Is there a guide to do it?

Thanks
BTW, I didn't run the test on the M1 arm platform, so then you might try by urself. Good luck!

Best regards,
Gang
Gang Wang is offline   Reply With Quote

Old   September 16, 2021, 06:55
Default Same problem here
  #7
New Member
 
Federico Carminati
Join Date: Sep 2021
Posts: 10
Rep Power: 5
federico.carminati is on a distinguished road
Hello,
is there any update on this? I have exactly the same problem even after applying the patch. Thanks for the help. Best regards

Federico Carminati
federico.carminati is offline   Reply With Quote

Old   September 17, 2021, 10:26
Default
  #8
New Member
 
Federico Carminati
Join Date: Sep 2021
Posts: 10
Rep Power: 5
federico.carminati is on a distinguished road
I believe the problem is due to the fact that in the OpenFoam files there are some files that are distinguishable only by their case. While this is perfectly file in most Linux systems, on the Mac by default the filesystem is case preserving but not distinguishing. This means that if you create a file, say “hello.dat”, it will be indistinguishable from a file “Hello.dat” in another directory. This probably causes some confusions in the include directives that pick up the wrong file and compilation fails. I found the (admittedly baroque) solution of creating a virtual file system on my Mac that is case discriminating and to compile OpenFoam there. The instructions (that I will post in the forum), are the following:

hdiutil create -size 5g -fs 'Case-sensitive Journaled HFS+' -volname openfoam openfoam
sudo hdiutil attach -mountpoint /usr/local/openfoam openfoam.dmg

cd /usr/local/openfoam

and there one can deploy the normal installation instructions. To increase portability of the openfoam project it would perhaps be worth considering to disambiguate files not only via their case, but by using different combinations of letters.
federico.carminati is offline   Reply With Quote

Old   September 17, 2021, 14:53
Default
  #9
Member
 
Miguel Hernandez
Join Date: Feb 2021
Location: En mi casa
Posts: 56
Rep Power: 5
Miguel Hernandez is on a distinguished road
Quote:
Originally Posted by federico.carminati View Post
I believe the problem is due to the fact that in the OpenFoam files there are some files that are distinguishable only by their case. While this is perfectly file in most Linux systems, on the Mac by default the filesystem is case preserving but not distinguishing. This means that if you create a file, say “hello.dat”, it will be indistinguishable from a file “Hello.dat” in another directory. This probably causes some confusions in the include directives that pick up the wrong file and compilation fails. I found the (admittedly baroque) solution of creating a virtual file system on my Mac that is case discriminating and to compile OpenFoam there. The instructions (that I will post in the forum), are the following:



hdiutil create -size 5g -fs 'Case-sensitive Journaled HFS+' -volname openfoam openfoam

sudo hdiutil attach -mountpoint /usr/local/openfoam openfoam.dmg



cd /usr/local/openfoam



and there one can deploy the normal installation instructions. To increase portability of the openfoam project it would perhaps be worth considering to disambiguate files not only via their case, but by using different combinations of letters.


Thank you Federico!

Where can I find the normal installation instructions?
Miguel Hernandez is offline   Reply With Quote

Old   September 17, 2021, 16:49
Default
  #10
New Member
 
Federico Carminati
Join Date: Sep 2021
Posts: 10
Rep Power: 5
federico.carminati is on a distinguished road
I used these instructions

https://develop.openfoam.com/Develop...p/doc/Build.md

Best,
federico.carminati is offline   Reply With Quote

Old   September 18, 2021, 08:39
Default
  #11
Member
 
Miguel Hernandez
Join Date: Feb 2021
Location: En mi casa
Posts: 56
Rep Power: 5
Miguel Hernandez is on a distinguished road
Quote:
Originally Posted by federico.carminati View Post


Thank you! To be honest, is too difficult to me... i’ve tried several times, but nothing....

I found that docker for M1 SoC works, but openFoam image is always emulated, and so is very very slow...

I don’t know what to do....
Miguel Hernandez is offline   Reply With Quote

Old   September 18, 2021, 08:40
Default
  #12
New Member
 
Federico Carminati
Join Date: Sep 2021
Posts: 10
Rep Power: 5
federico.carminati is on a distinguished road
I am really new to OF, but I have *a lot* of experience installing "stuff". Mind posting your problems? Might be I can be of help. Best,
federico.carminati is offline   Reply With Quote

Old   September 19, 2021, 11:18
Default
  #13
Member
 
Miguel Hernandez
Join Date: Feb 2021
Location: En mi casa
Posts: 56
Rep Power: 5
Miguel Hernandez is on a distinguished road
Quote:
Originally Posted by federico.carminati View Post
I am really new to OF, but I have *a lot* of experience installing "stuff". Mind posting your problems? Might be I can be of help. Best,
I'm sorry Federico but I think I need a lot of help
First: I create and mount an image disk as you suggested --> No problem with this.

And then?

I'm sorry but I'm new to install from terminal all this things, I'm getting confused in all the instruction reported in the guide you linked before.

Are the preliminaries necessary?

Maybe I need, if exist, a noob guide to do it...
Miguel Hernandez is offline   Reply With Quote

Old   September 19, 2021, 11:50
Default
  #14
New Member
 
Federico Carminati
Join Date: Sep 2021
Posts: 10
Rep Power: 5
federico.carminati is on a distinguished road
Can you mount it on /usr/local/openfoam?

if yes do

cd /usr/local/openfoam
df -k .

and you should see "something" like

Filesystem 1024-blocks Used Available Capacity iused ifree %iused Mounted on
/dev/disk9s2 4382680 3621640 761040 83% 203807 4294763472 0% /usr/local/openfoam
federico.carminati is offline   Reply With Quote

Old   September 19, 2021, 12:28
Default
  #15
Member
 
Miguel Hernandez
Join Date: Feb 2021
Location: En mi casa
Posts: 56
Rep Power: 5
Miguel Hernandez is on a distinguished road
Quote:
Originally Posted by federico.carminati View Post
Can you mount it on /usr/local/openfoam?

if yes do

cd /usr/local/openfoam
df -k .

and you should see "something" like

Filesystem 1024-blocks Used Available Capacity iused ifree %iused Mounted on
/dev/disk9s2 4382680 3621640 761040 83% 203807 4294763472 0% /usr/local/openfoam
I a see a lot of disk... the last one is:

/dev/disk4s2 4906968 28840 4878128 1% 6 4294967273 0% /usr/local/openfoam
Miguel Hernandez is offline   Reply With Quote

Old   September 19, 2021, 13:57
Default
  #16
New Member
 
Federico Carminati
Join Date: Sep 2021
Posts: 10
Rep Power: 5
federico.carminati is on a distinguished road
good, now download the two tar files here

Source: https://dl.openfoam.com/source/v2106/OpenFOAM-v2106.tgz

ThirdParty: https://dl.openfoam.com/source/v2106...arty-v2106.tgz

and untar them into

/usr/local/openfoam

if you do not know how to do that, download the files and let me know. Best,
federico.carminati is offline   Reply With Quote

Old   September 19, 2021, 14:22
Default
  #17
Member
 
Miguel Hernandez
Join Date: Feb 2021
Location: En mi casa
Posts: 56
Rep Power: 5
Miguel Hernandez is on a distinguished road
Thank you, you are very kind!

I think I've done it, I "untarned" both files... under /usr/local/openfoam I see (ls command):

OpenFOAM-v2106 ThirdParty-v2106
Miguel Hernandez is offline   Reply With Quote

Old   September 19, 2021, 15:07
Default
  #18
New Member
 
Federico Carminati
Join Date: Sep 2021
Posts: 10
Rep Power: 5
federico.carminati is on a distinguished road
you are almost there!!

$ source /usr/local/openfoam/OpenFOAM-v2106/etc/bashrc
$ cd /usr/local/openfoam/OpenFOAM-v2106
$ foamSystemCheck
$ ./Allwmake -s -l

and go for a coffee ;-)
federico.carminati is offline   Reply With Quote

Old   September 19, 2021, 15:57
Default
  #19
Member
 
Miguel Hernandez
Join Date: Feb 2021
Location: En mi casa
Posts: 56
Rep Power: 5
Miguel Hernandez is on a distinguished road
Unfortunately it doesn't work...
Maybe with all the tries before, I messed up something...

A lot of warning in the log file, e.g.:

warning: overriding currently unsupported use of floating point exceptions on this target [-Wunsupported-floating-point-opt]

and errors, e.g.:

signals/feexceptErsatz.H:39:24: error: no member named '__control' in 'fenv_t'
old_excepts = fenv.__control & FE_ALL_EXCEPT;
~~~~ ^
Miguel Hernandez is offline   Reply With Quote

Old   September 20, 2021, 04:13
Default
  #20
New Member
 
Federico Carminati
Join Date: Sep 2021
Posts: 10
Rep Power: 5
federico.carminati is on a distinguished road
Did you delete all your previous tries from disk? Best
federico.carminati is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Foam::error::printStack(Foam::Ostream&) with simpleFoam -parallel U.Golling OpenFOAM Running, Solving & CFD 52 September 23, 2023 04:35
Initial conditions for uniform flow andreas OpenFOAM 5 November 16, 2012 16:00
[OpenFOAM] ParaView/Parafoam error when making animation Disco_Caine ParaView 6 September 28, 2010 10:54
user subroutine error CFDUSER CFX 2 December 9, 2006 07:31
user defined function cfduser CFX 0 April 29, 2006 11:58


All times are GMT -4. The time now is 23:48.