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, 12:18
Default
  #21
Member
 
Mattia de\' Michieli Vitturi
Join Date: Mar 2009
Posts: 51
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, 12:38
Default
  #22
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,938
Rep Power: 39
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, 12:48
Default
  #23
Member
 
Mattia de\' Michieli Vitturi
Join Date: Mar 2009
Posts: 51
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, 13:18
Default
  #24
Member
 
Mattia de\' Michieli Vitturi
Join Date: Mar 2009
Posts: 51
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, 13:25
Default
  #25
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,938
Rep Power: 39
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, 10:03
Default
  #26
New Member
 
Oleg Kotsur
Join Date: Nov 2012
Posts: 16
Rep Power: 14
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 16:00. Reason: Updated the link
o.kotsur is offline   Reply With Quote

Old   December 10, 2015, 11:08
Default
  #27
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,938
Rep Power: 39
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 11, 2015, 05:57
Default
  #28
Member
 
Mattia de\' Michieli Vitturi
Join Date: Mar 2009
Posts: 51
Rep Power: 17
demichie is on a distinguished road
Today I have updated/upgraded everything with brew and now I am trying again to compile. I have noticed this warning during the compilation:

-L/usr/local/opt/libevent/lib -L/usr/local/Cellar/open-mpi/1.10.1/lib -lmpi -o /Users/demichie/OpenFOAM/OpenFOAM-3.0.x/platforms/darwin64ClangDPInt32Opt/lib/openmpi-system/libPstream.dylib

ld: warning: directory not found for option '-L/Users/demichie/OpenFOAM/OpenFOAM-3.0.x/platforms/darwin64ClangDPInt32OptSYSTEMOPENMPI/lib'

'/Users/demichie/OpenFOAM/OpenFOAM-3.0.x/platforms/darwin64ClangDPInt32Opt/lib/openmpi-system/libPstream.dylib' is up to date.



Do you think this could be related to the problem I have?

Thank you
Mattia
demichie is offline   Reply With Quote

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

No, this is not the source of the problem. The reason for the error is this

Code:
LINKLIBSO   = $(CC) $(c++FLAGS) -Xlinker -dylib \
                                -Xlinker -flat_namespace \
                                -Xlinker -undefined \
                                -Xlinker suppress
For the reason not known to yet in your case linker decided to delete symbol __ZN4FoamlsERNS_7OstreamEl, yet on my laptop it links libOpenFOAM.dylib without any induced problems.

Currently I am testing another way of linking libraries and applications, as soon as I finish tests, patches on Github will be updated.
alexeym is offline   Reply With Quote

Old   December 11, 2015, 09:00
Default
  #30
Member
 
Mattia de\' Michieli Vitturi
Join Date: Mar 2009
Posts: 51
Rep Power: 17
demichie is on a distinguished road
Thank you Alexey!!
demichie is offline   Reply With Quote

Old   December 14, 2015, 05:08
Default
  #31
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,938
Rep Power: 39
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
@demichie (and maybe @o.kotsur):

I have updated patches, could you test if missing symbol problem has gone?
alexeym is offline   Reply With Quote

Old   December 14, 2015, 05:32
Default
  #32
Member
 
Mattia de\' Michieli Vitturi
Join Date: Mar 2009
Posts: 51
Rep Power: 17
demichie is on a distinguished road
I am compiling it now. I will let you now!

Thanks
demichie is offline   Reply With Quote

Old   December 14, 2015, 07:19
Default
  #33
Member
 
Mattia de\' Michieli Vitturi
Join Date: Mar 2009
Posts: 51
Rep Power: 17
demichie is on a distinguished road
Compilation failed with the latest patch. I have several errors of this kind:


-lm -o /Users/demichie/OpenFOAM/OpenFOAM-3.0.x/platforms/darwin64ClangDPInt32Opt/bin/MPPICFoam
ld: library not found for -lfiniteVolume
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [/Users/demichie/OpenFOAM/OpenFOAM-3.0.x/platforms/darwin64ClangDPInt32Opt/bin/MPPICFoam] Error 1
make[1]: *** [DPMFoam] Error 2

I have attached a .zip of the log
Attached Files
File Type: zip log.Allwmake.zip (70.8 KB, 1 views)
demichie is offline   Reply With Quote

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

Mea culpa, while implementing "silent rules" removed a little bit more from Makefile, so libraries was not linked with "non-silent rules". Latest commit fixes the problem.

You have got rather interesting cpp, is it from gcc package?
alexeym is offline   Reply With Quote

Old   December 15, 2015, 12:26
Default
  #35
Member
 
Mattia de\' Michieli Vitturi
Join Date: Mar 2009
Posts: 51
Rep Power: 17
demichie is on a distinguished road
Hi,
with the fixed patch the compilation ends but I still have the "dyld: lazy symbol binding failed" problem when running a solver.
Regarding cpp, I have tried several version of the gcc package but always without success. Now I am using gcc version 5.3.0 (Homebrew gcc 5.3.0).
The latest compilation was with WM_LABEL_SIZE=32. Do you think I can try with your libOpenFOAM.dylib?

Thank you
Mattia
demichie is offline   Reply With Quote

Old   December 15, 2015, 16:41
Default
  #36
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,938
Rep Power: 39
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

Right now I do not have build with WM_LABEL_SIZE=32, only 64. I have uploaded archive (https://github.com/mrklein/openfoam-...bs.bins.tar.gz, sha256 is 4538f0fb9af999fe818cf7c20115f8bfd43feac593fe812ce6 f7450c2fd653e0) of bin and lib folders (with stripped library paths, so you won't need to use install_name_tool to correct them) that can be extracted into $WM_PROJECT_DIR (do not forget to backup your original platforms folder just in case, though since it contains non-working build, maybe it is not necessary).

To continue diagnostics. Since there is a problem during link phase, could you post output of (since gcc's cpp somehow is in your path, maybe you also try to link with ld from gcc):

1. which ld
2. $(which ld) -v
3. brew list --versions
4. export

It seems you have got something installed that prevents normal linking and hopefully output of the commands could shed more light of the problem.
alexeym is offline   Reply With Quote

Old   December 15, 2015, 17:38
Default
  #37
Member
 
Mattia de\' Michieli Vitturi
Join Date: Mar 2009
Posts: 51
Rep Power: 17
demichie is on a distinguished road
Thank you for your help, I will try with your tar.gz. You can find below the output you requested.

Mattia


Quote:
Originally Posted by alexeym View Post
Hi,

Right now I do not have build with WM_LABEL_SIZE=32, only 64. I have uploaded archive (https://github.com/mrklein/openfoam-...bs.bins.tar.gz, sha256 is 4538f0fb9af999fe818cf7c20115f8bfd43feac593fe812ce6 f7450c2fd653e0) of bin and lib folders (with stripped library paths, so you won't need to use install_name_tool to correct them) that can be extracted into $WM_PROJECT_DIR (do not forget to backup your original platforms folder just in case, though since it contains non-working build, maybe it is not necessary).

To continue diagnostics. Since there is a problem during link phase, could you post output of (since gcc's cpp somehow is in your path, maybe you also try to link with ld from gcc):

1. which ld
/usr/bin/ld

Quote:
Originally Posted by alexeym View Post

2. $(which ld) -v
@(#)PROGRAM:ld PROJECT:ld64-253.9
configured to support archs: armv6 armv7 armv7s arm64 i386 x86_64 x86_64h armv6m armv7k armv7m armv7em (tvOS)
LTO support using: Apple LLVM 7.0.2 (clang-700.1.81)

Quote:
Originally Posted by alexeym View Post

3. brew list --versions
autoconf 2.69
boost 1.59.0
cgal 4.5 4.6.3
cloog 0.18.1 0.18.4
cmake 3.1.0 3.4.1
fontconfig 2.11.1
freetype 2.5.4 2.6_1
gcc 4.9.2_1 5.3.0
gd 2.1.0_2 2.1.1
gmp 6.0.0a 6.1.0
isl 0.12.2 0.15
jasper 1.900.1
jpeg 8d
libevent 2.0.21_1 2.0.22
libgphoto2 2.5.5 2.5.9
libicns 0.8.1_1
libmpc 1.0.2 1.0.3
libpng 1.6.16 1.6.19
libtiff 4.0.3 4.0.6
libtool 2.4.4 2.4.6
libusb 1.0.19 1.0.20
libusb-compat 0.1.5
little-cms2 2.6 2.7
makedepend 1.0.5
metis 5.1.0
metis64 5.1.0
mpfr 3.1.2-p10 3.1.3
open-mpi 1.10.1 1.8.4
openssl 1.0.1j_1 1.0.2e
parmetis 4.0.3_3
parmgridgen 0.0.2
pkg-config 0.28 0.29
sane-backends 1.0.24_1
scotch 6.0.0 6.0.4_1
scotch64 6.0.4_1
wine 1.6.2 1.6.2_1
xz 5.0.7 5.2.2

Quote:
Originally Posted by alexeym View Post

4. export
declare -x Apple_PubSub_Socket_Render="/private/tmp/com.apple.launchd.CSZWgr2xdm/Render"
declare -x BOOST_ARCH_PATH="/usr/local/opt/boost"
declare -x CGAL_ARCH_PATH="/usr/local/opt/cgal"
declare -x CLAW="/Users/demichie/Codes/clawpack-4.5.0"
declare -x DISPLAY="/private/tmp/com.apple.launchd.YnHXD1E2Ee/org.macosforge.xquartz:0"
declare -x DYLD_LIBRARY_PATH="/usr/local/opt/boost/lib:/usr/local/opt/cgal/lib:/Users/demichie/OpenFOAM/OpenFOAM-3.0.x/platforms/darwin64ClangDPInt32Opt/lib/openmpi-system:/usr/local/Cellar/open-mpi/1.10.1/lib:/Users/demichie/OpenFOAM/demichie-3.0.x/platforms/darwin64ClangDPInt32Opt/lib:/Users/demichie/OpenFOAM/site/3.0.x/platforms/darwin64ClangDPInt32Opt/lib:/Users/demichie/OpenFOAM/OpenFOAM-3.0.x/platforms/darwin64ClangDPInt32Opt/lib:/Users/demichie/OpenFOAM/OpenFOAM-3.0.x/platforms/darwin64ClangDPInt32Opt/lib/dummy:/usr/local/xuggler/lib:/Users/demichie/Dakota/bin:/Users/demichie/Dakota/lib"
declare -x FC="gfortran"
declare -x FOAM_APP="/Users/demichie/OpenFOAM/OpenFOAM-3.0.x/applications"
declare -x FOAM_APPBIN="/Users/demichie/OpenFOAM/OpenFOAM-3.0.x/platforms/darwin64ClangDPInt32Opt/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/darwin64ClangDPInt32Opt/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/darwin64ClangDPInt32Opt/bin"
declare -x FOAM_SITE_LIBBIN="/Users/demichie/OpenFOAM/site/3.0.x/platforms/darwin64ClangDPInt32Opt/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/darwin64ClangDPInt32Opt/bin"
declare -x FOAM_USER_LIBBIN="/Users/demichie/OpenFOAM/demichie-3.0.x/platforms/darwin64ClangDPInt32Opt/lib"
declare -x FOAM_UTILITIES="/Users/demichie/OpenFOAM/OpenFOAM-3.0.x/applications/utilities"
declare -x GMP_ARCH_PATH="/usr/local/opt/gmp"
declare -x HOME="/Users/demichie"
declare -x IPYTHONDIR="/Users/demichie/Codes/clawpack-4.5.0/python/ipythondir"
declare -x LC_CTYPE="UTF-8"
declare -x LOGNAME="demichie"
declare -x MANPATH
declare -x MATLABPATH="/Users/demichie/Codes/clawpack-4.5.0/matlab"
declare -x MPFR_ARCH_PATH="/usr/local/opt/mpfr"
declare -x MPI_ARCH_PATH="/usr/local/Cellar/open-mpi/1.10.1"
declare -x MPI_BUFFER_SIZE="20000000"
declare -x OLDPWD="/Users/demichie/OpenFOAM/OpenFOAM-3.0.x"
declare -x PATH="/Users/demichie/OpenFOAM/demichie-3.0.x/platforms/darwin64ClangDPInt32Opt/bin:/Users/demichie/OpenFOAM/site/3.0.x/platforms/darwin64ClangDPInt32Opt/bin:/Users/demichie/OpenFOAM/OpenFOAM-3.0.x/platforms/darwin64ClangDPInt32Opt/bin:/Users/demichie/OpenFOAM/OpenFOAM-3.0.x/bin:/Users/demichie/OpenFOAM/OpenFOAM-3.0.x/wmake:/usr/local/sbin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/opt/local/bin:/opt/local/sbin:/Users/demichie/Dakota/bin:/Users/demichie/Dakota/test:/usr/local/bin:/usr/local/rappture/bin:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/git/bin:/usr/texbin"
declare -x PWD="/Users/demichie/OpenFOAM/OpenFOAM-3.0.x/tutorials/incompressible/icoFoam/cavity"
declare -x PYTHONPATH="/Users/demichie/Codes/clawpack-4.5.0/python"
declare -x SHELL="/bin/bash"
declare -x SHLVL="1"
declare -x SSH_AUTH_SOCK="/private/tmp/com.apple.launchd.bm7MDSRglm/Listeners"
declare -x TERM="xterm-256color"
declare -x TERM_PROGRAM="Apple_Terminal"
declare -x TERM_PROGRAM_VERSION="361.1"
declare -x TERM_SESSION_ID="8CDE57B0-DC5E-4C01-83FB-28EC1E2AE715"
declare -x TMPDIR="/var/folders/b7/x13r82z10fb7ywbys0yzpkwm0000gn/T/"
declare -x TRACKER_HOME="/usr/local/tracker"
declare -x USER="demichie"
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="Int32"
declare -x WM_LABEL_SIZE="32"
declare -x WM_LINK_LANGUAGE="c++"
declare -x WM_MPLIB="SYSTEMOPENMPI"
declare -x WM_NCOMPPROCS="2"
declare -x WM_OPTIONS="darwin64ClangDPInt32Opt"
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"
declare -x XPC_FLAGS="0x0"
declare -x XPC_SERVICE_NAME="0"
declare -x XUGGLE_HOME="/usr/local/xuggler"
declare -x __CF_USER_TEXT_ENCODING="0x1F5:0x0:0x0"

Quote:
Originally Posted by alexeym View Post


It seems you have got something installed that prevents normal linking and hopefully output of the commands could shed more light of the problem.
demichie is offline   Reply With Quote

Old   December 16, 2015, 03:19
Default
  #38
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,938
Rep Power: 39
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
This part of your output

Code:
/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin
suggests that you have (had?) Macports installed. Also somehow you have gcc's cpp in the path before Apple's, I do not know what else is there, yet already there two things could be the reason for lots of funny side-effects.

Maybe one day (though I doubt it) I will install all the software that is on your laptop (mix Macports and Homebrew, setup fancy PATH, etc) and will be able to reproduce the behavior but not this time.
alexeym is offline   Reply With Quote

Old   December 18, 2015, 22:18
Default
  #39
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 there,

I'm getting the exact same problem here when I try to run icoFoam:

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

dyld: Symbol not found: __ZN4FoamlsERNS_7OstreamEl
Referenced from: /Volumes/OpenFOAM/OpenFOAM-3.0.x/platforms/darwin64ClangDPInt32Opt/bin/icoFoam
Expected in: flat namespace

Trace/BPT trap: 5


I'm not using Macport or Brew, I compiled some of the required packages and installed those under /opt. I was able to run snappyHexMesh without a problem but the solvers are failing.

Thanks

PO

update: Using the following worked for me
LINKLIBSO = $(cc) -dynamiclib -flat_namespace -undefined suppress
LINKEXE = $(cc) -Xlinker -z -Xlinker nodefs

Last edited by podallaire; December 19, 2015 at 00:21. Reason: Update
podallaire is offline   Reply With Quote

Old   December 19, 2015, 10:42
Default
  #40
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,938
Rep Power: 39
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

As it is $(cc), seems you have edited wmake/rules/darwin64Clang/c? Or you put this line in wmake/rules/darwin64Clang/c++ (though in this case compilation should fail from the very beginning)?

Unfortunately I still can not reproduce the error. On two laptops everything builds and runs smoothly and I still do not have motivation to mess with OS X installation under VirtualBox to reproduce the error.
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 16:54
[OpenFOAM.org] Installing OpenFOAM 4.1 on Mac OS Sierra spitchers OpenFOAM Installation 18 August 11, 2017 11:01
[OpenFOAM.org] -bash: fluentMeshToFoam: command not found, after installing OpenFoam 2.3.x on Mac jundong OpenFOAM Installation 1 July 1, 2015 14:31
[swak4Foam] Installing swak4Foam to OpenFOAM in mac Kaquesang OpenFOAM Community Contributions 22 January 21, 2013 12: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 18:06


All times are GMT -4. The time now is 15:58.