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

[OpenFOAM.org] OpenFOAM 2.3.x on Mac OS X 10.10.1 Installation Errors

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By windscion

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 4, 2015, 03:47
Default OpenFOAM 2.3.x on Mac OS X 10.10.1 Installation Errors
  #1
New Member
 
Paolo
Join Date: Feb 2015
Posts: 9
Rep Power: 11
Petru is on a distinguished road
Hi,
I'm new here, and I have no experiences with these kind of things.
I'm trying to install OpenFOAM 2.3.x on my Mac OS X 10.10.1 since some days without any result.
I also tried to run different installation process, but everytime there are still some errors.
Right now, I'm applying this process:

http://openfoamwiki.net/index.php/In...OpenFOAM_2.3.x

But I still can not install it, cause some errors.

First of all, I can not correctly set mp-llvm-3.5 for llvm:

Code:
port select --summary

Name     Selected               Options
====     ========               =======
db       db48                   db48 none
gcc      mp-gcc48               mp-gcc48 mp-gcc49 none
ipython  none                   none
llvm     none                   mp-llvm-3.5 none
mpi      openmpi-gcc48-fortran  openmpi-gcc48-fortran openmpi-mp-fortran none
python   python27               python26-apple python27 python27-apple none
When I try to set the llvm port with:

Code:
sudo port select --set llvm mp-llvm-3.5
I receive this message:

Code:
Selecting 'mp-llvm-3.5' for 'llvm' failed: symlink: /opt/local/etc/select/llvm/current -> mp-llvm-3.5: file already exists
I don't know if it could be the problem, however when I try to install OpenFOAM, I receive this error message (first part of the log.Allwake):

Code:
mpicc -m64 -fsignaling-nans  -ftrapping-math  -Wall -O2   -fPIC -Ddarwin dirToString.c -o /Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/wmake/platforms/darwinIntel64Gcc/dirToString
dyld: Library not loaded: /usr/local/lib/libopen-pal.6.dylib
  Referenced from: /usr/local/bin/mpicc
  Reason: Incompatible library version: mpicc requires version 9.0.0 or later, but libopen-pal.6.dylib provides version 8.0.0
make: *** [/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/wmake/platforms/darwinIntel64Gcc/dirToString] Trace/BPT trap: 5
no ThirdParty sources found - skipping
+ wmakePrintBuild -check
version changed from previous build
+ /bin/rm -f 'OpenFOAM/Make/*/global.?'
+ wmakeLnInclude OpenFOAM
wmakeLnInclude: linking include files to OpenFOAM/lnInclude
+ wmakeLnInclude OSspecific/POSIX
wmakeLnInclude: linking include files to OSspecific/POSIX/lnInclude
+ Pstream/Allwmake
+ wmake libso dummy
wmakeLnInclude: linking include files to ./lnInclude
/bin/sh: /Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/wmake/platforms/darwinIntel64Gcc/wmkdep: No such file or directory
/bin/sh: /Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/wmake/platforms/darwinIntel64Gcc/wmkdep: No such file or directory
/bin/sh: /Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/wmake/platforms/darwinIntel64Gcc/wmkdep: No such file or directory
SOURCE=UPstream.C ;  mpicxx -m64 -fsignaling-nans  -ftrapping-math -DdarwinIntel64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O2  -DNoRepository -ftemplate-depth-100  -IlnInclude -I. -I/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/src/OpenFOAM/lnInclude -I/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/src/OSspecific/POSIX/lnInclude   -fPIC -Ddarwin -c $SOURCE -o Make/darwinIntel64GccDPOpt/UPstream.o
dyld: Library not loaded: /usr/local/lib/libopen-pal.6.dylib
  Referenced from: /usr/local/bin/mpicxx
  Reason: Incompatible library version: mpicxx requires version 9.0.0 or later, but libopen-pal.6.dylib provides version 8.0.0
/bin/sh: line 1: 79047 Trace/BPT trap: 5       mpicxx -m64 -fsignaling-nans -ftrapping-math -DdarwinIntel64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O2 -DNoRepository -ftemplate-depth-100 -IlnInclude -I. -I/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/src/OpenFOAM/lnInclude -I/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/src/OSspecific/POSIX/lnInclude -fPIC -Ddarwin -c $SOURCE -o Make/darwinIntel64GccDPOpt/UPstream.o
make: *** [Make/darwinIntel64GccDPOpt/UPstream.o] Error 133
+ case "$WM_MPLIB" in
+ set +x

Note: ignore spurious warnings about missing mpicxx.h headers

wclean mpi
wmake libso mpi
wmakeLnInclude: linking include files to ./lnInclude
/bin/sh: /Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/wmake/platforms/darwinIntel64Gcc/wmkdep: No such file or directory
/bin/sh: /Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/wmake/platforms/darwinIntel64Gcc/wmkdep: No such file or directory
/bin/sh: /Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/wmake/platforms/darwinIntel64Gcc/wmkdep: No such file or directory
/bin/sh: /Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/wmake/platforms/darwinIntel64Gcc/wmkdep: No such file or directory
SOURCE=UOPwrite.C ;  mpicxx -m64 -fsignaling-nans  -ftrapping-math -DdarwinIntel64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O2  -DNoRepository -ftemplate-depth-100 -DOMPI_SKIP_MPICXX -I/opt/local/include/openmpi-mp -IlnInclude -I. -I/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/src/OpenFOAM/lnInclude -I/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/src/OSspecific/POSIX/lnInclude   -fPIC -Ddarwin -c $SOURCE -o Make/darwinIntel64GccDPOptMACPORTOPENMPI/UOPwrite.o
dyld: Library not loaded: /usr/local/lib/libopen-pal.6.dylib
  Referenced from: /usr/local/bin/mpicxx
  Reason: Incompatible library version: mpicxx requires version 9.0.0 or later, but libopen-pal.6.dylib provides version 8.0.0
/bin/sh: line 1: 79134 Trace/BPT trap: 5       mpicxx -m64 -fsignaling-nans -ftrapping-math -DdarwinIntel64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O2 -DNoRepository -ftemplate-depth-100 -DOMPI_SKIP_MPICXX -I/opt/local/include/openmpi-mp -IlnInclude -I. -I/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/src/OpenFOAM/lnInclude -I/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/src/OSspecific/POSIX/lnInclude -fPIC -Ddarwin -c $SOURCE -o Make/darwinIntel64GccDPOptMACPORTOPENMPI/UOPwrite.o
make: *** [Make/darwinIntel64GccDPOptMACPORTOPENMPI/UOPwrite.o] Error 133
+ OSspecific/POSIX/Allwmake
wmakeLnInclude: linking include files to ./lnInclude
/bin/sh: /Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/wmake/platforms/darwinIntel64Gcc/wmkdep: No such file or directory
/bin/sh: /Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/wmake/platforms/darwinIntel64Gcc/wmkdep: No such file or directory
/bin/sh: /Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/wmake/platforms/darwinIntel64Gcc/wmkdep: No such file or directory
/bin/sh: /Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/wmake/platforms/darwinIntel64Gcc/wmkdep: No such file or directory
/bin/sh: /Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/wmake/platforms/darwinIntel64Gcc/wmkdep: No such file or directory
/bin/sh: /Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/wmake/platforms/darwinIntel64Gcc/wmkdep: No such file or directory
/bin/sh: /Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/wmake/platforms/darwinIntel64Gcc/wmkdep: No such file or directory
/bin/sh: /Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/wmake/platforms/darwinIntel64Gcc/wmkdep: No such file or directory
/bin/sh: /Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/wmake/platforms/darwinIntel64Gcc/wmkdep: No such file or directory
/bin/sh: /Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/wmake/platforms/darwinIntel64Gcc/wmkdep: No such file or directory
/bin/sh: /Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/wmake/platforms/darwinIntel64Gcc/wmkdep: No such file or directory
/bin/sh: /Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/wmake/platforms/darwinIntel64Gcc/wmkdep: No such file or directory
/bin/sh: /Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/wmake/platforms/darwinIntel64Gcc/wmkdep: No such file or directory
/bin/sh: /Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/wmake/platforms/darwinIntel64Gcc/wmkdep: No such file or directory
/bin/sh: /Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/wmake/platforms/darwinIntel64Gcc/wmkdep: No such file or directory
SOURCE=signals/sigFpe.C ;  mpicxx -m64 -fsignaling-nans  -ftrapping-math -DdarwinIntel64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O2  -DNoRepository -ftemplate-depth-100  -IlnInclude -I. -I/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/src/OpenFOAM/lnInclude -I/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/src/OSspecific/POSIX/lnInclude   -fPIC -Ddarwin -c $SOURCE -o Make/darwinIntel64GccDPOpt/sigFpe.o
dyld: Library not loaded: /usr/local/lib/libopen-pal.6.dylib
  Referenced from: /usr/local/bin/mpicxx
  Reason: Incompatible library version: mpicxx requires version 9.0.0 or later, but libopen-pal.6.dylib provides version 8.0.0
/bin/sh: line 1: 79294 Trace/BPT trap: 5       mpicxx -m64 -fsignaling-nans -ftrapping-math -DdarwinIntel64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O2 -DNoRepository -ftemplate-depth-100 -IlnInclude -I. -I/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/src/OpenFOAM/lnInclude -I/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/src/OSspecific/POSIX/lnInclude -fPIC -Ddarwin -c $SOURCE -o Make/darwinIntel64GccDPOpt/sigFpe.o
make: *** [Make/darwinIntel64GccDPOpt/sigFpe.o] Error 133
I can not understand what is going on.
I hope that some of you can figure out where is the problem.

Thank you,
Paolo
Petru is offline   Reply With Quote

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

Quote:
Selecting 'mp-llvm-3.5' for 'llvm' failed: symlink: /opt/local/etc/select/llvm/current -> mp-llvm-3.5: file already exists
You can try to delete /opt/local/etc/select/llvm/current and run "port select ..." again.

To diagnose your error, please provide output of the following commands:
  1. which mpicc
  2. mpicc --version
  3. mpicc --showme
  4. export | grep -E '(FOAM_|WM_)'

The last command will expose certain information about OpenFOAM installation location, though according to initial message it is not a concern for you.
alexeym is offline   Reply With Quote

Old   March 4, 2015, 14:28
Default
  #3
New Member
 
Paolo
Join Date: Feb 2015
Posts: 9
Rep Power: 11
Petru is on a distinguished road
Hi,
Thank you very much!!
The first problem is solved, now mp-llvm-3.5 is selected.

This is the answer code for the OF installation:

Code:
MacBook-Pro-Petr:OpenFOAM-2.3.x Paolo$ which mpicc
/usr/local/bin/mpicc
MacBook-Pro-Petr:OpenFOAM-2.3.x Paolo$ mpicc --version
dyld: Library not loaded: /usr/local/lib/libopen-pal.6.dylib
  Referenced from: /usr/local/bin/mpicc
  Reason: Incompatible library version: mpicc requires version 9.0.0 or later, but libopen-pal.6.dylib provides version 8.0.0
Trace/BPT trap: 5
MacBook-Pro-Petr:OpenFOAM-2.3.x Paolo$ mpicc --showme
dyld: Library not loaded: /usr/local/lib/libopen-pal.6.dylib
  Referenced from: /usr/local/bin/mpicc
  Reason: Incompatible library version: mpicc requires version 9.0.0 or later, but libopen-pal.6.dylib provides version 8.0.0
Trace/BPT trap: 5
MacBook-Pro-Petr:OpenFOAM-2.3.x Paolo$ export | grep -E '(FOAM_|WM_)'
declare -x FOAM_APP="/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/applications"
declare -x FOAM_APPBIN="/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/platforms/darwinIntel64GccDPOpt/bin"
declare -x FOAM_EXT_LIBBIN="/Users/Paolo/OpenFOAM/ThirdParty-2.3.x/platforms/darwinIntel64GccDPOpt/lib"
declare -x FOAM_INST_DIR="/Users/Paolo/OpenFOAM"
declare -x FOAM_JOB_DIR="/Users/Paolo/OpenFOAM/jobControl"
declare -x FOAM_LIBBIN="/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/platforms/darwinIntel64GccDPOpt/lib"
declare -x FOAM_MPI="openmpi-macport-mp"
declare -x FOAM_RUN="/Users/Paolo/OpenFOAM/Paolo-2.3.x/run"
declare -x FOAM_SETTINGS=""
declare -x FOAM_SIGFPE=""
declare -x FOAM_SITE_APPBIN="/Users/Paolo/OpenFOAM/site/2.3.x/platforms/darwinIntel64GccDPOpt/bin"
declare -x FOAM_SITE_LIBBIN="/Users/Paolo/OpenFOAM/site/2.3.x/platforms/darwinIntel64GccDPOpt/lib"
declare -x FOAM_SOLVERS="/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/applications/solvers"
declare -x FOAM_SRC="/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/src"
declare -x FOAM_TUTORIALS="/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/tutorials"
declare -x FOAM_USER_APPBIN="/Users/Paolo/OpenFOAM/Paolo-2.3.x/platforms/darwinIntel64GccDPOpt/bin"
declare -x FOAM_USER_LIBBIN="/Users/Paolo/OpenFOAM/Paolo-2.3.x/platforms/darwinIntel64GccDPOpt/lib"
declare -x FOAM_UTILITIES="/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/applications/utilities"
declare -x WM_ARCH="darwinIntel64"
declare -x WM_ARCH_BASE="darwin"
declare -x WM_ARCH_OPTION="64"
declare -x WM_BASE_COMPILER="Gcc"
declare -x WM_CC="mpicc"
declare -x WM_CFLAGS="-m64 -fPIC"
declare -x WM_COMPILER="Gcc"
declare -x WM_COMPILER_LIB_ARCH="64"
declare -x WM_COMPILE_OPTION="Opt"
declare -x WM_CXX="mpicxx"
declare -x WM_CXXFLAGS="-m64 -fPIC"
declare -x WM_DIR="/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/wmake"
declare -x WM_LDFLAGS="-m64"
declare -x WM_LINK_LANGUAGE="c++"
declare -x WM_MACPORT_MPI_VERSION="mp"
declare -x WM_MACPORT_VERSION=""
declare -x WM_MPLIB="MACPORTOPENMPI"
declare -x WM_OPTIONS="darwinIntel64GccDPOpt"
declare -x WM_OSTYPE="POSIX"
declare -x WM_PRECISION_OPTION="DP"
declare -x WM_PROJECT="OpenFOAM"
declare -x WM_PROJECT_DIR="/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x"
declare -x WM_PROJECT_INST_DIR="/Users/Paolo/OpenFOAM"
declare -x WM_PROJECT_USER_DIR="/Users/Paolo/OpenFOAM/Paolo-2.3.x"
declare -x WM_PROJECT_VERSION="2.3.x"
declare -x WM_THIRD_PARTY_DIR="/Users/Paolo/OpenFOAM/ThirdParty-2.3.x"
declare -x WM_USE_MACPORT="1"
Thank you again,
Paolo
Petru is offline   Reply With Quote

Old   March 4, 2015, 15:07
Default
  #4
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,930
Rep Power: 38
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Something strange happened with OpenMPI installation (either it is Macports "feature", or you have got libopen-pal.6.dylib from elsewhere). Please, post output of

Code:
port contents openmpi-gcc48-fortran | grep /lib
Maybe again (like with llvm) Macports were not able to create correct symlinks cause certain files were already in /usr/local/lib.
alexeym is offline   Reply With Quote

Old   March 4, 2015, 15:38
Default
  #5
New Member
 
Paolo
Join Date: Feb 2015
Posts: 9
Rep Power: 11
Petru is on a distinguished road
There is no answer to the command:
Code:
port contents openmpi-gcc48-fortran | grep /lib
Petru is offline   Reply With Quote

Old   March 4, 2015, 20:07
Default
  #6
Member
 
Peter
Join Date: Feb 2015
Location: New York
Posts: 73
Rep Power: 11
opedrofunk is on a distinguished road
Looks like the "wrong" openmpi package is being selected? From your output:
Code:
declare -x FOAM_MPI="openmpi-macport-mp"
You might try:
1) Uninstalling the openmpi-mp-fortran package, ie
Code:
sudo port uninstall openmpi-mp-fortran
2) Remove and reset the symlinks, ie:
Code:
sudo port select --set mpi none
sudo port select --set mpi openmpi-gcc48-fortran
3) Try compiling again.
opedrofunk is offline   Reply With Quote

Old   March 5, 2015, 02:57
Default
  #7
New Member
 
Paolo
Join Date: Feb 2015
Posts: 9
Rep Power: 11
Petru is on a distinguished road
it can not be uninstalled:

Code:
MacBook-Pro-Petr:OpenFOAM-2.3.x Paolo$ sudo port uninstall openmpi-mp-fortran
Warning: no such port: openmpi-mp-fortran, skipping uninstall
Even if, the openmpi-mp-fortran port is present:

Code:
MacBook-Pro-Petr:OpenFOAM-2.3.x Paolo$ port select --summary
Name     Selected               Options
====     ========               =======
db       db48                   db48 none
gcc      mp-gcc48               mp-gcc48 mp-gcc49 none
ipython  none                   none
llvm     mp-llvm-3.5            mp-llvm-3.5 none
mpi      openmpi-gcc48-fortran  openmpi-gcc48-fortran openmpi-mp-fortran none
python   python27               python26-apple python27 python27-apple none
Moreover, I don't know if it could be the problem, but every time that I reset the terminal, it can not find the sudo port. In order to obtain the sudo port, I have to export the path with this command lines:

Code:
export PATH=$PATH:/opt/local/bin
export MANPATH=$MANPATH:/opt/local/share/man
export INFOPATH=$INFOPATH:/opt/local/share/info
Petru is offline   Reply With Quote

Old   March 9, 2015, 05:40
Default
  #8
New Member
 
Paolo
Join Date: Feb 2015
Posts: 9
Rep Power: 11
Petru is on a distinguished road
Hi,
There is the ports list necessary for OpenFOAM . Maybe it could help in the understanding process.

It is the output of this command:
Code:
port list | grep -E '(mpi|scotch|metis|cgal|boost|cmake)'
Thank you
Paolo


port.list.txt
Petru is offline   Reply With Quote

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

As it was my errorneous suggestion I post corrected command variant here also:

Code:
port installed | grep -E '(mpi|scotch|metis|cgal|boost|cmake)'
This time output should be much shorter.
alexeym is offline   Reply With Quote

Old   March 11, 2015, 10:05
Default
  #10
New Member
 
Paolo
Join Date: Feb 2015
Posts: 9
Rep Power: 11
Petru is on a distinguished road
Hello guys,
As Peter told me I have changed the path, in order to fix it.
Now the new path is:

Code:
MacBook-Pro-Petr:~ Paolo$ echo $PATH
/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin
I hope this is what is expected to be!

Whatever, I runned again the installation process.
And now it takes more time than before, and it gives to me different errors.
There is the first part of the log.Allwmake file.
I hope it can help us to find out the problem.

log.Allwmake.zip

Thanks again,
Paolo
Petru is offline   Reply With Quote

Old   December 22, 2015, 07:13
Default OpenFOAM-v.2.3.x installation for OSX 10.10 Yosmite
  #11
New Member
 
Kaan
Join Date: Dec 2015
Location: Boston MA
Posts: 1
Rep Power: 0
arikan is on a distinguished road
Hi guys,
I am trying to set OpenFOAM-v2.3.x on my Mac which is OS X 10.10.5 Yosemite. I am following openfoamwiki.net/index.php/Installation/Mac_OS/OpenFOAM_2.3.x these instructions.

I was trying to select db48.
Code:
sudo port select --set db db48
something went wrong and i got this massage
Code:
Selecting 'db48' for 'db' failed: The configuration file '/opt/local/etc/select/db/base' could not be opened.
I think i have similar problem to Petru's problem. How can i fix the problem.

Thank you.
Kaan
arikan is offline   Reply With Quote

Old   December 28, 2015, 10:37
Default Me three
  #12
New Member
 
Thomas Evans
Join Date: Dec 2015
Posts: 21
Rep Power: 10
windscion is on a distinguished road
OS = 10.10.5

Trying to build 2.3.x based on instructions elsewhere in this forum. This time
around I actually followed the directions as closely as possible. AFAICT I
patched the source correctly. Running in bash. Oh, and OpenFOAM is placed
on a disk with a journaled case-sensitive FS.

I failed to set db48 as default, failed with
"Selecting 'db48' for 'db' failed: The configuration file '/opt/local/etc/select/db/base' could not be opened."
but I am thinking that isn't the cause of my current difficulty.

port select --summary output:
Name Selected Options
==== ======== =======
cython none cython26 none
db none db46 db48 none
gcc mp-gcc48 mp-gcc47 mp-gcc48 mp-gcc49 mp-gcc5 none
llvm mp-llvm-3.5 mp-llvm-3.5 none
mpi openmpi-gcc48-fortran mpich-gcc49-fortran mpich-mp-fortran openmpi-gcc48-fortran openmpi-gcc49-fortran openmpi-mp-fortran none
nosetests none nosetests26 none
python python27 python26 python26-apple python27 python27-apple none
python2 none python26 python26-apple python27 python27-apple none
wxWidgets none wxWidgets-3.0 none


Current directory = OpenFOAM-2.3.x/applications/utilities/mesh/conversion/ansysToFoam
Command and result as follows:

mpicxx -m64 -fsignaling-nans -ftrapping-math -DdarwinIntel64 -DWM_DP -Wall \
-Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O2 \
-DNoRepository -ftemplate-depth-100 -IlnInclude -I. \
-I/Users/evans/OpenFOAM/OpenFOAM-2.3.x/src/OpenFOAM/lnInclude \
-I/Users/evans/OpenFOAM/OpenFOAM-2.3.x/src/OSspecific/POSIX/lnInclude -fPIC \
-Ddarwin -lpthread \
-L/Users/evans/OpenFOAM/OpenFOAM-2.3.x/platforms/darwinIntel64Gcc48DPOpt/lib/openmpi-macport-gcc48 \
-lPstream Make/darwinIntel64Gcc48DPOpt/ansysToFoam.o \
-L/Users/evans/OpenFOAM/OpenFOAM-2.3.x/platforms/darwinIntel64Gcc48DPOpt/lib \
-lOpenFOAM -ldl -lpthread -lm \
-o /Users/evans/OpenFOAM/OpenFOAM-2.3.x/platforms/darwinIntel64Gcc48DPOpt/bin/ansysToFoam

Undefined symbols for architecture x86_64:
"yyFlexLexer::yywrap()", referenced from:
vtable for yyFlexLexer in ansysToFoam.o
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status

I tried to force feed it /opt/local/lib/libfl.dylib, which contains _yywrap(), and
which has x86_64 architexture. This made no difference. Also "libfl_pic.dylib"

This error keeps me from building. It is the only error to show up, so I assume that it is the same error that prevents me from building some core elements like writeMeshObj and zipUpMesh.


EDIT: Oh, it looks like the code breaks for flex 2.6.0 because the minor version is less than 34. How quaint. I have brutally hacked it, seems to be compiling.
Attached Files
File Type: zip gcc48.zip (78.6 KB, 5 views)

Last edited by windscion; December 28, 2015 at 14:56.
windscion is offline   Reply With Quote

Old   December 28, 2015, 16:44
Default 2.3.x upgrade bison and flex
  #13
Member
 
Peter
Join Date: Feb 2015
Location: New York
Posts: 73
Rep Power: 11
opedrofunk is on a distinguished road
Hi,
OSX usually ships with pretty old versions of Bison and Flex (which is where the errors are coming from).

It seems to be a pretty common problem across other applications (not just OpenFOAM), so as a first try, I would suggest installing more up-to-date versions of bison and flex. i.e.:

$ sudo port install bison
$ sudo port install flex

and then sudo port select --set ... as normal for each so that they are used instead of the system versions.

You may need to use the macports installed version of python as well, if you are going to use the bindings.

Anyway, give it a try and let us know how it goes!

Good luck!
Peter
opedrofunk is offline   Reply With Quote

Old   December 29, 2015, 10:57
Default
  #14
New Member
 
Thomas Evans
Join Date: Dec 2015
Posts: 21
Rep Power: 10
windscion is on a distinguished road
Ironic, then, that it was a too recent version of flex that caused the problem.
windscion is offline   Reply With Quote

Old   December 29, 2015, 12:36
Default
  #15
Member
 
Peter
Join Date: Feb 2015
Location: New York
Posts: 73
Rep Power: 11
opedrofunk is on a distinguished road
Hi Thomas,
Glad it's working!
Would you mind elaborating just a bit on your fix?
Installing OpenFOAM on the Mac can be something of an adventure, so every problem/solution is helpful!
Thanks,
Peter
opedrofunk is offline   Reply With Quote

Old   December 29, 2015, 12:51
Default hack
  #16
New Member
 
Thomas Evans
Join Date: Dec 2015
Posts: 21
Rep Power: 10
windscion is on a distinguished road
% cd $WM_PROJECT_DIR
% find . -name '*.L' -print

Open all of the above in your fav editor (I use jEdit). Change all instances of
#if YY_FLEX_SUBMINOR_VERSION < 34
to
#if YY_FLEX_SUBMINOR_VERSION < 34 && YY_FLEX_SUBMINOR_VERSION > 0


I did say it was a hack, right? This gets around the SUBMINOR==0 problem with flex 2.6.0, but it's hardly a real solution. A real solution, however, would require knowing that YY_FLEX_MINOR_VERSION and YY_FLEX_MAJOR_VERSION are defined, which is beyond me since I do not have a clue about the build system in use here.
Pagoda likes this.
windscion 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
pimpleDyMFoam computation randomly stops babapeti OpenFOAM Running, Solving & CFD 5 January 24, 2018 05:28
[OpenFOAM.org] Installation of OpenFOAM on Mac: STLsurfaceFormatASCII.o error? APCoding OpenFOAM Installation 1 October 30, 2016 11:52
[OpenFOAM.org] Installation notes: OpenFOAM 2.3.x (git repo) on OSX 10.9 opedrofunk OpenFOAM Installation 7 July 1, 2015 13:51
Suggestion for a new sub-forum at OpenFOAM's Forum wyldckat Site Help, Feedback & Discussions 20 October 28, 2014 09:04
Critical errors gcc and icoFoam during installation of 15 quartzian OpenFOAM Installation 3 December 12, 2008 12:42


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