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

[OpenFOAM.org] Installing OpenFOAM 3.0.x on Mac OS X with Homebrew

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 9, 2015, 11:18
Default
  #1
Member
 
Mattia de\' Michieli Vitturi
Join Date: Mar 2009
Posts: 50
Rep Power: 17
demichie is on a distinguished road
Quote:
Originally Posted by o.kotsur View Post
That's all right, thank you, alexey!
I am sure, there is a stupid explanation, because substitution libOpenFOAM.dylib by yours really seems to work. So that is enough for me

Еще раз большое спасибо!

Hi,
Unfortunately I have the same problem with libOpenFOAM.dylib.
It is in my lib folder but it seems that the solvers do not see it, producing the "dyld: Symbol not found" error.
Is there any solution?

Thank you
Mattia

P.S. I am compiling OpeFOAM.3.0.x with latest patch on OSX El Capitan
demichie is offline   Reply With Quote

Old   December 9, 2015, 11:38
Default
  #2
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,932
Rep Power: 38
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

You need to decide whether you have the same problem: __ZN4FoamlsERNS_7OstreamEl somehow is suppressed from libOpenFOAM.dylib during compilation; or another problem: libOpenFOAM.dylib can not be found.

Could you post output of the following commands:

Code:
1. sw_vers
2. clang++ --version
3. export | grep -E '(FOAM_|WM_|LD_)'
4. which icoFoam
5. otool -L $(which icoFoam)
6. shasum OpenFOAM-3.0.x-a07401d.patch
1-3 are standard commands for environment check; 4-5 to learn paths, where icoFoam expect to find libraries; the last to check your patch file.
alexeym is offline   Reply With Quote

Old   December 9, 2015, 11:48
Default
  #3
Member
 
Mattia de\' Michieli Vitturi
Join Date: Mar 2009
Posts: 50
Rep Power: 17
demichie is on a distinguished road
Quote:
Originally Posted by alexeym View Post
Hi,

You need to decide whether you have the same problem: __ZN4FoamlsERNS_7OstreamEl somehow is suppressed from libOpenFOAM.dylib during compilation; or another problem: libOpenFOAM.dylib can not be found.

Could you post output of the following commands:

Code:
1. sw_vers
2. clang++ --version
3. export | grep -E '(FOAM_|WM_|LD_)'
4. which icoFoam
5. otool -L $(which icoFoam)
6. shasum OpenFOAM-3.0.x-a07401d.patch
1-3 are standard commands for environment check; 4-5 to learn paths, where icoFoam expect to find libraries; the last to check your patch file.


1.
ProductName: Mac OS X
ProductVersion: 10.11.2
BuildVersion: 15C50

2.
Apple LLVM version 7.0.2 (clang-700.1.81)
Target: x86_64-apple-darwin15.2.0
Thread model: posix

3.

declare -x DYLD_LIBRARY_PATH="/usr/local/opt/boost/lib:/usr/local/opt/cgal/lib:/Users/demichie/OpenFOAM/OpenFOAM-3.0.x/platforms/darwin64ClangDPInt64Opt/lib/openmpi-system:/usr/local/Cellar/open-mpi/1.8.4/lib:/Users/demichie/OpenFOAM/demichie-3.0.x/platforms/darwin64ClangDPInt64Opt/lib:/Users/demichie/OpenFOAM/site/3.0.x/platforms/darwin64ClangDPInt64Opt/lib:/Users/demichie/OpenFOAM/OpenFOAM-3.0.x/platforms/darwin64ClangDPInt64Opt/lib:/Users/demichie/OpenFOAM/OpenFOAM-3.0.x/platforms/darwin64ClangDPInt64Opt/lib/dummy:/usr/local/xuggler/lib:/Users/demichie/Dakota/bin:/Users/demichie/Dakota/lib"
declare -x FOAM_APP="/Users/demichie/OpenFOAM/OpenFOAM-3.0.x/applications"
declare -x FOAM_APPBIN="/Users/demichie/OpenFOAM/OpenFOAM-3.0.x/platforms/darwin64ClangDPInt64Opt/bin"
declare -x FOAM_ETC="/Users/demichie/OpenFOAM/OpenFOAM-3.0.x/etc"
declare -x FOAM_INST_DIR="/Users/demichie/OpenFOAM"
declare -x FOAM_JOB_DIR="/Users/demichie/OpenFOAM/jobControl"
declare -x FOAM_LIBBIN="/Users/demichie/OpenFOAM/OpenFOAM-3.0.x/platforms/darwin64ClangDPInt64Opt/lib"
declare -x FOAM_MPI="openmpi-system"
declare -x FOAM_RUN="/Users/demichie/OpenFOAM/demichie-3.0.x/run"
declare -x FOAM_SETTINGS=""
declare -x FOAM_SIGFPE=""
declare -x FOAM_SITE_APPBIN="/Users/demichie/OpenFOAM/site/3.0.x/platforms/darwin64ClangDPInt64Opt/bin"
declare -x FOAM_SITE_LIBBIN="/Users/demichie/OpenFOAM/site/3.0.x/platforms/darwin64ClangDPInt64Opt/lib"
declare -x FOAM_SOLVERS="/Users/demichie/OpenFOAM/OpenFOAM-3.0.x/applications/solvers"
declare -x FOAM_SRC="/Users/demichie/OpenFOAM/OpenFOAM-3.0.x/src"
declare -x FOAM_TUTORIALS="/Users/demichie/OpenFOAM/OpenFOAM-3.0.x/tutorials"
declare -x FOAM_USER_APPBIN="/Users/demichie/OpenFOAM/demichie-3.0.x/platforms/darwin64ClangDPInt64Opt/bin"
declare -x FOAM_USER_LIBBIN="/Users/demichie/OpenFOAM/demichie-3.0.x/platforms/darwin64ClangDPInt64Opt/lib"
declare -x FOAM_UTILITIES="/Users/demichie/OpenFOAM/OpenFOAM-3.0.x/applications/utilities"
declare -x LD_LIBRARY_PATH="/usr/local/opt/boost/lib:/usr/local/opt/cgal/lib:/Users/demichie/OpenFOAM/OpenFOAM-3.0.x/platforms/darwin64ClangDPInt64Opt/lib/openmpi-system:/usr/local/Cellar/open-mpi/1.8.4/lib:/Users/demichie/OpenFOAM/demichie-3.0.x/platforms/darwin64ClangDPInt64Opt/lib:/Users/demichie/OpenFOAM/site/3.0.x/platforms/darwin64ClangDPInt64Opt/lib:/Users/demichie/OpenFOAM/OpenFOAM-3.0.x/platforms/darwin64ClangDPInt64Opt/lib:/Users/demichie/OpenFOAM/OpenFOAM-3.0.x/platforms/darwin64ClangDPInt64Opt/lib/dummy"
declare -x WM_ARCH="darwin64"
declare -x WM_ARCH_OPTION="64"
declare -x WM_CC="clang"
declare -x WM_COMPILER="Clang"
declare -x WM_COMPILER_LIB_ARCH="64"
declare -x WM_COMPILE_OPTION="Opt"
declare -x WM_CXX="clang++"
declare -x WM_DIR="/Users/demichie/OpenFOAM/OpenFOAM-3.0.x/wmake"
declare -x WM_LABEL_OPTION="Int64"
declare -x WM_LABEL_SIZE="64"
declare -x WM_LINK_LANGUAGE="c++"
declare -x WM_MPLIB="SYSTEMOPENMPI"
declare -x WM_OPTIONS="darwin64ClangDPInt64Opt"
declare -x WM_OSTYPE="POSIX"
declare -x WM_PRECISION_OPTION="DP"
declare -x WM_PROJECT="OpenFOAM"
declare -x WM_PROJECT_DIR="/Users/demichie/OpenFOAM/OpenFOAM-3.0.x"
declare -x WM_PROJECT_INST_DIR="/Users/demichie/OpenFOAM"
declare -x WM_PROJECT_USER_DIR="/Users/demichie/OpenFOAM/demichie-3.0.x"
declare -x WM_PROJECT_VERSION="3.0.x"

4.

/Users/demichie/OpenFOAM/OpenFOAM-3.0.x/platforms/darwin64ClangDPInt64Opt/bin/icoFoam

5.

/Users/demichie/OpenFOAM/OpenFOAM-3.0.x/platforms/darwin64ClangDPInt64Opt/bin/icoFoam:
/Users/demichie/OpenFOAM/OpenFOAM-3.0.x/platforms/darwin64ClangDPInt64Opt/lib/libfiniteVolume.dylib (compatibility version 0.0.0, current version 0.0.0)
/Users/demichie/OpenFOAM/OpenFOAM-3.0.x/platforms/darwin64ClangDPInt64Opt/lib/libmeshTools.dylib (compatibility version 0.0.0, current version 0.0.0)
/Users/demichie/OpenFOAM/OpenFOAM-3.0.x/platforms/darwin64ClangDPInt64Opt/lib/libOpenFOAM.dylib (compatibility version 0.0.0, current version 0.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.1.0)

6.

da4198af01ad3faa530c7db992a1b524e6003640 OpenFOAM-3.0.x-a07401d.patch



Thank you
Mattia
demichie is offline   Reply With Quote

Old   December 9, 2015, 12:18
Default
  #4
Member
 
Mattia de\' Michieli Vitturi
Join Date: Mar 2009
Posts: 50
Rep Power: 17
demichie is on a distinguished road
Quote:
Originally Posted by alexeym View Post
Hi,

You need to decide whether you have the same problem: __ZN4FoamlsERNS_7OstreamEl somehow is suppressed from libOpenFOAM.dylib during compilation; or another problem: libOpenFOAM.dylib can not be found.

This is the error message:

dyld: lazy symbol binding failed: Symbol not found: __ZN4FoamlsERNS_7OstreamEl
Referenced from: /Users/demichie/OpenFOAM/OpenFOAM-3.0.x/platforms/darwin64ClangDPInt64Opt/bin/icoFoam
Expected in: flat namespace

dyld: Symbol not found: __ZN4FoamlsERNS_7OstreamEl
Referenced from: /Users/demichie/OpenFOAM/OpenFOAM-3.0.x/platforms/darwin64ClangDPInt64Opt/bin/icoFoam
Expected in: flat namespace
demichie is offline   Reply With Quote

Old   December 9, 2015, 12:25
Default
  #5
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,932
Rep Power: 38
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
I will try to reproduce the error after update (I am using previous version of El Capitan and Xcode CLT).
alexeym is offline   Reply With Quote

Old   December 10, 2015, 09:03
Default
  #6
New Member
 
Oleg Kotsur
Join Date: Nov 2012
Posts: 16
Rep Power: 13
o.kotsur is on a distinguished road
@demichie:
Code:
dyld: lazy symbol binding failed: Symbol not found: __ZN4FoamlsERNS_7OstreamEl
Referenced from: /Users/demichie/OpenFOAM/OpenFOAM-3.0.x/platforms/darwin64ClangDPInt64Opt/bin/icoFoam
Expected in: flat namespace
Yes, I had exactly the same issue. I solved this only by replacing my "corrupted" libOpenFOAM.dylib with the alexey's one.
You can download it from here:
http://www.cfd-online.com/Forums/ope...tml#post573097

After this "cheat" I haven't had any problems so far.

Last edited by wyldckat; February 7, 2016 at 15:00. Reason: Updated the link
o.kotsur is offline   Reply With Quote

Old   December 10, 2015, 10:08
Default
  #7
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,932
Rep Power: 38
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
@ demichie:

Unfortunately I was not able to reproduce the error even with updated OS X and Xcode. So could you also post output of

1. xcode-select -p
2. xcrun --show-sdk-path
3. cd $FOAM_LIBBIN && nm libOpenFOAM.dylib | grep __ZN4FoamlsERNS_7OstreamEl && cd -

(if you need libOpenFOAM.dylib I could upload it on github, though I would prefer to find the reason for the problem)

@o.kotsur:

It is not there any more. Also it was for WM_LABEL_SIZE=32.
alexeym is offline   Reply With Quote

Old   December 19, 2015, 18:04
Default
  #8
Senior Member
 
Pierre-Olivier Dallaire
Join Date: Mar 2009
Location: Montreal, Quebec, Canada
Posts: 192
Rep Power: 17
podallaire is on a distinguished road
Hi !

I modified wmake/rules/darwin64Clang/c and "recycled" the settings suggested by Bernhard on a previous patch.

Cheers

PO
podallaire is offline   Reply With Quote

Old   December 20, 2015, 04:50
Default
  #9
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,932
Rep Power: 38
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

Rules from wmake/rules/darwin64Clang/c are used during compilation of C code, for C++ rules from wmake/rules/darwin64Clang/c++ are used. This part of change

Code:
-Xlinker -z -Xlinker nodefs
does not have meaning as ld on OS X does not have -z flag.

So basically it is unknown what helped you with compilation.
alexeym is offline   Reply With Quote

Old   December 20, 2015, 09:33
Default
  #10
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,932
Rep Power: 38
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

I have made alternative patch for 3.0.1 - https://raw.githubusercontent.com/mr...AM-3.0.1.patch. wmake rules in this patch do not rely on dynamic_lookup functionality and are more similar to the rules used in earlier versions of patches.

I have tested the patch on my laptops, though it seems this does not guarantee anything
alexeym is offline   Reply With Quote

Old   December 30, 2015, 12:36
Default
  #11
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,932
Rep Power: 38
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
@demichie and @o.kotsur:

Just to clarify (and for the future reference), finally by accident I was able to reproduce your error, and a reason for the error is in this part of $FOAM_SRC/OpenFOAM/Make/files:

Code:
#if defined(__APPLE__) && defined(__clang__)
$(ints)/long/long.C
$(ints)/long/longIO.C
$(ints)/ulong/ulong.C
$(ints)/ulong/ulongIO.C
#endif
So if __APPLE__ or __clang__ symbols are not defined during cpp run, source files are not added to compilation and as a result __ZN4FoamlsERNS_7OstreamEl symbol is undefined. I do not know why your cpp does not define either __APPLE__ or __clang__, mine does:

Code:
$ cpp -dM /dev/null | grep -E '(__APPLE__|__clang__)'
#define __APPLE__ 1
#define __clang__ 1
silva likes this.

Last edited by alexeym; December 30, 2015 at 16:24.
alexeym is offline   Reply With Quote

Old   December 30, 2015, 12:46
Default
  #12
Member
 
Mattia de\' Michieli Vitturi
Join Date: Mar 2009
Posts: 50
Rep Power: 17
demichie is on a distinguished road
Thank you for your efforts! This is the output on my computer:

cpp -dM /dev/null | grep -E '(__APPLE__|__clang__)'

#define __APPLE__ 1

As you see __APPLE__ seems to be defined, but not __clang__.
I will try to investigate.

Thank you
Mattia
demichie is offline   Reply With Quote

Old   December 30, 2015, 18:20
Default
  #13
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,932
Rep Power: 38
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

Surely you can investigate (and maybe find that you have installed cpp from somewhere else), one way to solve the problem is to remove __clang__ condition (since your cpp is from somewhere else), i.e. change above fragment to:

Code:
#if defined(__APPLE__)
$(ints)/long/long.C
$(ints)/long/longIO.C
$(ints)/ulong/ulong.C
$(ints)/ulong/ulongIO.C
#endif
or it would be more OpenFOAM like (to force instead of check):

Code:
#if defined(darwin64)
$(ints)/long/long.C
$(ints)/long/longIO.C
$(ints)/ulong/ulong.C
$(ints)/ulong/ulongIO.C
#endif
in the first case you just check if you are on Darwin (yet omit clang check, maybe cpp was just copied into /usr/bin from elsewhere). In the latter case you agree with definition passed through -D compiler flag (since any way you are using wmake and it uses flags from rules/darwin64Clang/c++, and they include -Ddarwin64 flag).
silva likes this.
alexeym is offline   Reply With Quote

Old   January 12, 2016, 10:22
Default
  #14
Member
 
Mattia de\' Michieli Vitturi
Join Date: Mar 2009
Posts: 50
Rep Power: 17
demichie is on a distinguished road
It worked! Now I finally have 3.0.1 compiled on my Macbook Pro.

Thank you!!!
demichie is offline   Reply With Quote

Old   February 17, 2016, 17:35
Default
  #15
New Member
 
Jonathan
Join Date: Jan 2015
Posts: 20
Rep Power: 11
jjstickel is on a distinguished road
I've modified the mrklein 3.0.1 patch for MacPorts installed libraries, but using apple clang for compilation. I am hopeful it should work, but I get this immediate error when trying to build:
Code:
$ ./Allwmake 2>&1 | tee build.log
dyld: Symbol not found: _CGLGetCurrentContext
  Referenced from: /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo
  Expected in: /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL
 in /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo
xcrun: error: unable to lookup item 'Path' in SDK '/'
xcrun cc -arch x86_64  -Wall -O3   -fPIC -isysroot  -Wno-unneeded-internal-declaration -Wno-unused-function dirToString.c -o /Users/jstickel/OpenFOAM/OpenFOAM-3.0.1/wmake/platforms/darwin64Clang/dirToString
clang: warning: no such sysroot directory: '-Wno-unneeded-internal-declaration'
dirToString.c:43:10: fatal error: 'stdio.h' file not found
#include <stdio.h>
         ^
1 error generated.
make: *** [/Users/jstickel/OpenFOAM/OpenFOAM-3.0.1/wmake/platforms/darwin64Clang/dirToString] Error 1
A bit of google indicates this may be related to xcode upgrade (now xcode 7.2 on OS X 10.10.5). Anyone else seen this problem? Do I need to setup xcode/clang somehow?
jjstickel is offline   Reply With Quote

Old   February 18, 2016, 02:50
Default
  #16
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,932
Rep Power: 38
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

Code:
xcrun cc -arch x86_64  -Wall -O3   -fPIC -isysroot ?
Your -isysroot (or OSX_SDK_PATH, which is equal to output of xcrun --show-sdk-path) is empty. Why it is empty? You could start by posting output of the following commands:

Code:
$ xcrun --show-sdk-path
$ xcrun cc --version
$ make --version
Though SDK could just be missing.
alexeym is offline   Reply With Quote

Old   February 18, 2016, 16:00
Default
  #17
New Member
 
Jonathan
Join Date: Jan 2015
Posts: 20
Rep Power: 11
jjstickel is on a distinguished road
Quote:
Originally Posted by alexeym View Post
Hi,

Code:
xcrun cc -arch x86_64  -Wall -O3   -fPIC -isysroot ?
Your -isysroot (or OSX_SDK_PATH, which is equal to output of xcrun --show-sdk-path) is empty. Why it is empty? You could start by posting output of the following commands:
Code:
$ xcrun --show-sdk-path
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk
 $ xcrun cc --version
Apple LLVM version 7.0.2 (clang-700.1.81)
Target: x86_64-apple-darwin14.5.0
Thread model: posix
 $ make --version
GNU Make 3.81
<snip>
Sot that's OK. But I am finding parts of xcode get broke after sourcing the openfoam bashrc:

Code:
 $ xcodebuild -version
Xcode 7.2.1
Build version 7C1002
 $ source etc/bashrc
clang: error: unsupported option '--showme:link'

Please download binary Paraview release from
http://paraview.org and install it in /Applications
folder.

 $ xcodebuild -version
dyld: Symbol not found: _CGLGetCurrentContext
  Referenced from: /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo
  Expected in: /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL
 in /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo
Trace/BPT trap: 5
Maybe a path issue. I'll try to hunt it down, but I will be grateful for any hints.
jjstickel is offline   Reply With Quote

Old   February 18, 2016, 16:24
Default
  #18
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,932
Rep Power: 38
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

To have more hints, one needs to know what modifications you have made.

This part is rather funny:

Code:
$ source etc/bashrc
clang: error: unsupported option '--showme:link'
For some reason mpicc wrapper passes flag directly to clang. [RANT]Macports openmpi package is something very strange, it pull gcc5 for gfortran and has no option to disable this, it installs man pages from mpich, it ignores installed gcc5 and uses clang and clang++ for mpicc and mpicxx. At this point I have decided that it was enough and uninstalled Macports.[/RANT]

This

Code:
$ xcodebuild -version
dyld: Symbol not found: _CGLGetCurrentContext
  Referenced from: /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo
  Expected in: /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL
 in /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo
Trace/BPT trap: 5
could be caused by wrong DYLD_LIBRARY_PATH variable content.

Again, since you have modified patch I do not have any more comments. I have Xcode 7.2.1 and OpenFOAM compiles smoothly with unmodified patch.
alexeym is offline   Reply With Quote

Old   February 18, 2016, 16:53
Default
  #19
New Member
 
Jonathan
Join Date: Jan 2015
Posts: 20
Rep Power: 11
jjstickel is on a distinguished road
Quote:
Originally Posted by alexeym View Post
Hi,

To have more hints, one needs to know what modifications you have made.

This part is rather funny:

<snip>

[RANT]Macports openmpi package is something very strange, it pull gcc5 for gfortran and has no option to disable this, it installs man pages from mpich, it ignores installed gcc5 and uses clang and clang++ for mpicc and mpicxx. At this point I have decided that it was enough and uninstalled Macports.[/RANT]

<snip>

Again, since you have modified patch I do not have any more comments. I have Xcode 7.2.1 and OpenFOAM compiles smoothly with unmodified patch.
I fixed the mpi error. I needed to specify MPICH rather SYSTEMOPENMPI in the bashrc (I am using macports mpich).

I've made some progress. Indeed, having "/opt/local/lib" in DYLD_LIBRARY_PATH is causing my xcode symbol error. I'll see if I can figure out why the entire path is being added. What I have changed from your patch is essentially just the modifications of CGAL.sh, metis.sh, and scotch.sh (i.e., the parts that specifically called out "brew"). I'll attach those sections.

Regarding your rant, my understanding is that (for the default variant) gcc5 is installed as dependency only to support fortran with mpich (or openmpi); clang is used for the c/c++ parts. It should not cause a problem for openfoam. BTW, previously I did successfully compile openfoam-2.4 with apple clang. Now I am trying to do the same with 3.0. I only mention this as a point of clarification, not to stir the homebrew vs macports waters!
Attached Files
File Type: txt mp_partial_patch.txt (3.6 KB, 5 views)
nishant.kumar likes this.
jjstickel is offline   Reply With Quote

Old   February 19, 2016, 07:14
Default
  #20
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,932
Rep Power: 38
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
DYLD_LIBRARY_PATH is filled by config/settings.sh and config/CGAL.sh (via _foamAddLib call). Since all your third-party libraries are in /opt/local/lib, it is added there.

In fact, since library paths are compiled into executables:

Code:
$ pwd
/Users/.../platforms/darwin64ClangDPInt64Opt/bin
daphne:bin$ otool -L mapFields
mapFields:
	/Users/.../lib/libsampling.dylib (compatibility version 0.0.0, current version 0.0.0)
	/Users/.../lib/libmeshTools.dylib (compatibility version 0.0.0, current version 0.0.0)
	/Users/.../lib/liblagrangian.dylib (compatibility version 0.0.0, current version 0.0.0)
	/Users/.../lib/libfiniteVolume.dylib (compatibility version 0.0.0, current version 0.0.0)
	/Users/.../lib/libgenericPatchFields.dylib (compatibility version 0.0.0, current version 0.0.0)
	/Users/..../lib/libOpenFOAM.dylib (compatibility version 0.0.0, current version 0.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.1.0)
These _foamAddLib calls could be skipped except one place:

Code:
_foamAddLib  $FOAM_USER_LIBBIN:$FOAM_SITE_LIBBIN:$FOAM_LIBBIN:$FOAM_LIBBIN/dummy
Adding $FOAM_LIBBIN before $FOAM_LIBBIN/dummy allows executables to find parallel libPStream.dylib instead of dummy one, since (man dyld):

Code:
DYLD_LIBRARY_PATH
       This  is  a  colon separated list of directories that contain libraries. The
       dynamic linker searches these directories before  it  searches  the  default
       locations  for  libraries.  It  allows  you to test new versions of existing
       libraries.
alexeym 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
How to contribute to the community of OpenFOAM users and to the OpenFOAM technology wyldckat OpenFOAM 17 November 10, 2017 15:54
[OpenFOAM.org] Installing OpenFOAM 4.1 on Mac OS Sierra spitchers OpenFOAM Installation 18 August 11, 2017 10:01
[OpenFOAM.org] -bash: fluentMeshToFoam: command not found, after installing OpenFoam 2.3.x on Mac jundong OpenFOAM Installation 1 July 1, 2015 13:31
[swak4Foam] Installing swak4Foam to OpenFOAM in mac Kaquesang OpenFOAM Community Contributions 22 January 21, 2013 11:51
Is it a good idea to use OpenFoam on a Mac (OS 10.7.5) or on Windows7? bzz77 OpenFOAM Installation 4 November 21, 2012 17:06


All times are GMT -4. The time now is 06:43.