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

[OpenFOAM.org] Patches to compile OpenFOAM 2.2 on Mac OS X

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree20Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 7, 2013, 19:57
Default Patches to compile OpenFOAM 2.2 on Mac OS X
  #1
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Those of you using OpenSource for their CFD-needs, working with a Unix-like operating system but who were tempted by the slick hardware to the dubious corporation with the fruit in the logo may be interested in these patches for the latest version of OpenFOAM that allow compiling it on Mac OS X.

Those who say "How dare you use this fine OpenSource-program on these evil machines" are of course right, I feel ashamed and mumble "But they look so good, they work so fine and as long as it is not in the AppStore Apple will not profit from this"

Anyway. To the point. The patch has the same functionality as the last one for 2.1 posted here:
http://www.cfd-online.com/Forums/ope...tml#post412411
It is installed in the same way as the 2.1-patch described here: http://openfoamwiki.net/index.php/Ho...enFOAM_v21_Mac

One note: the patch is supposed to create some symbolic links in wmake/rules but instead only creates files. So replace the file darwinIntel64Gcc4X (X from {2..8}) with a symbolic link to darwinIntel64Gcc

For thirdparty-software I rely on MacPorts. For the compilation I used from MacPorts

- OpenMPI
- gcc46 (gcc47 doesn't work for me, but your milage may vary)
- boost and cgal (these are optional. If found they will be used for surfaceExtractFeatures). Usage of these is new for this patch
- ccache (optional but highly recomended)

Contents of my ../site/2.2.x/prefs.sh are:
Code:
export WM_COMPILER=Gcc46
export WM_SCHEDULER=ccache
Feel free to experiment with other compilers

The only thing used/compiled from the original OpenFOAM-Thirdparty-software currently is scotch/ptscotch (as MacPorts uses an older version here)

Have fun and put your MacBooks into brown paper bags when you go outside so that the OpenSource-police won't spot you

ThirdParty-2.2_Mac-20130307.patchOpenFOAM-2.2.x_Mac-20130307.patch
egp, norman1981, wyldckat and 8 others like this.
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   March 9, 2013, 01:01
Default Patches to compile OpenFOAM 2.2 on Mac OS X
  #2
New Member
 
Brent Craven
Join Date: Mar 2009
Location: University Park, PA, USA
Posts: 21
Rep Power: 17
brent_craven is on a distinguished road
Thanks, Bernhard!

Two questions for you on this:

1.) In etc/config/settings I see that, if someone has MacPorts installed, you are resetting WM_MPLIB=MACPORTOPENMPI. This caused a hiccup in compiling for me because I have MacPorts installed, but I want to use my SYSTEMOPENMPI installed elsewhere. Perhaps there is a reason for doing this, though?

2.) Did you have any problems compiling scotch in ThirdParty? I cannot get around the following error: ld: library not found for -lrt. I am using Gcc46.

Thanks again!

Brent
brent_craven is offline   Reply With Quote

Old   March 9, 2013, 07:05
Default
  #3
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by brent_craven View Post
Thanks, Bernhard!

Two questions for you on this:

1.) In etc/config/settings I see that, if someone has MacPorts installed, you are resetting WM_MPLIB=MACPORTOPENMPI. This caused a hiccup in compiling for me because I have MacPorts installed, but I want to use my SYSTEMOPENMPI installed elsewhere. Perhaps there is a reason for doing this, though?
No special reason. I used to use the openmpi provided by Apple as I figured that this is the easiest way for people to install it. Then Apple stopped shipping it (I think starting with 10.7) and I figured "next easiest way to install it is with MacPorts" and as the number of machines I can test the patch on is rather limited (basically only my laptop) I only supported this option. I'll modify the patch so that it is more flexible in that respect. For the time being comment it out

Quote:
Originally Posted by brent_craven View Post
2.) Did you have any problems compiling scotch in ThirdParty? I cannot get around the following error: ld: library not found for -lrt. I am using Gcc46.
No. It worked for me the first time around. This looks like scotch diagnosed it to be a linux-machine (-lrt is typical for that).

Looked at the patch and it seems like I forgot to include a include for the Makefile for scotch and therefor the compilation doesn't find out that this is a Mac (I thought scotch now supports the Mac out of the box, but it seems that I applied the 2.1-patch and forgot about that one file)

Will upload modified patches ASAP
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   March 9, 2013, 08:23
Default
  #4
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by gschaider View Post
Will upload modified patches ASAP
Here they come:

ThirdParty-2.2_Mac-20130309.patchOpenFOAM-2.2.x_Mac-20130309.patch

The Third-Party-Patch now creates etc/wmakeFiles/scotch/Makefile.inc.i686_mac_darwin.shlib-OpenFOAM that is needed for scotch to compile correctly.

The other patch now adds two things if your setup differs from mine (if you don't use Macports for everything):
- if macports is not found it tells you so and which file to modify for your setup. It would be nice if people provided me with their modification. Then I can add them to the patch
- if MacPorts is used but no openmpi is found in MacPorts it defaults to OPENMPI and prints a variable that can be used to modify that behaviour.

Note: the thirdparty-patch assumes for the compilation of scotch that mpicc is called openmpicc
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   March 9, 2013, 10:20
Default
  #5
Super Moderator
 
niklas's Avatar
 
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 29
niklas will become famous soon enoughniklas will become famous soon enough
Great job, saves me alot of work again

I also feel a bit ashamed to use openfoam on mac, but only a little
niklas is offline   Reply With Quote

Old   March 9, 2013, 12:43
Default
  #6
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by niklas View Post
Great job, saves me alot of work again

I also feel a bit ashamed to use openfoam on mac, but only a little
I try to take the catholic approach about it: confess my sins, get absolved, try to sin less, but know that I eventually will again
egp and cesarcg like this.
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   March 14, 2013, 06:13
Wink
  #7
Member
 
sushant's Avatar
 
Join Date: Mar 2009
Location: Switzerland
Posts: 40
Rep Power: 16
sushant is on a distinguished road
Or one could argue, ahem, that the patch is meant to get OpenFOAM working on Darwin, which is in theory open-source, and the hardware is thus irrelevant (read ignored).

Bernhard, fantastic job again!

P.S. Works fine with Gcc45 (it stubbornly came with openmpi from macports)

Last edited by sushant; March 14, 2013 at 10:22.
sushant is offline   Reply With Quote

Old   March 15, 2013, 23:54
Default
  #8
New Member
 
Join Date: Mar 2011
Posts: 7
Rep Power: 15
marcojdressler is on a distinguished road
Hello!

Sourcing the bashrc gives the following output on my MacBook Pro (OS X 10.8.3)!

Code:
MacBook-Pro:~ md$ . OpenFOAM/OpenFOAM-2.2.x/etc/bashrc 
-bash: ulimit: −n: invalid number
Cannot open configuration file /usr/local/share/openmpi/openmpicc-wrapper-data.txt
Error parsing data file openmpicc: Not found
Using paraview in directory /Applications/paraview.app
MacBook-Pro:~ md$
Can anybody comment on this?

Best regards,
MD
marcojdressler is offline   Reply With Quote

Old   March 16, 2013, 07:02
Default
  #9
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by marcojdressler View Post
Hello!

Sourcing the bashrc gives the following output on my MacBook Pro (OS X 10.8.3)!

Code:
MacBook-Pro:~ md$ . OpenFOAM/OpenFOAM-2.2.x/etc/bashrc 
-bash: ulimit: −n: invalid number
Cannot open configuration file /usr/local/share/openmpi/openmpicc-wrapper-data.txt
Error parsing data file openmpicc: Not found
Using paraview in directory /Applications/paraview.app
MacBook-Pro:~ md$
Can anybody comment on this?
No.

No. Seriously: the /usr/local stuff is puzzling as the patch doesn't do anything there. Is it possible that in /usr/local you have an OpenMPI-installation (probably non-MacPorts)

About ulimit: is it possible that when adding it you entered 1O24 instead of 1024?
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   March 16, 2013, 09:03
Default
  #10
New Member
 
Join Date: Mar 2011
Posts: 7
Rep Power: 15
marcojdressler is on a distinguished road
Quote:
Originally Posted by gschaider View Post
No.

No. Seriously: the /usr/local stuff is puzzling as the patch doesn't do anything there. Is it possible that in /usr/local you have an OpenMPI-installation (probably non-MacPorts)

About ulimit: is it possible that when adding it you entered 1O24 instead of 1024?

Thanks for replying. This is very much appreciated.

It seems that I figured out the two issues: The "/usr/local stuff" disappeared after rebooting my system. The problem with "ulimit" was due to the fact that the line had been put into the file using copy&paste. I was able to compile OF22x

Next I went on to compile the Thirdpartys:

Doing ./makeParaView gives me the error message

Code:
-- The C compiler identification is unknown
-- The CXX compiler identification is GNU 4.6.3
-- Check for working C compiler: /Applications/paraview.app/Contents/bin/cc
-- Check for working C compiler: /Applications/paraview.app/Contents/bin/cc -- broken
CMake Error at /opt/local/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:61 (message):
  The C compiler "/Applications/paraview.app/Contents/bin/cc" is not able to
  compile a simple test program.
This error has been reported also in another Forum message in 2010 (http://www.cfd-online.com/Forums/ope...-paraview.html) but the solution proposed there (
Code:
export WM_CC='gcc-mp-4.6'
) does not work for me. It is strange that WM_CC is not mentioned in the makeParaView.

Could anyone please give me a hint to fix this?

Best,
MD

Last edited by marcojdressler; March 16, 2013 at 22:36. Reason: Further analysis done on the problem
marcojdressler is offline   Reply With Quote

Old   March 17, 2013, 08:01
Default
  #11
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by marcojdressler View Post
Thanks for replying. This is very much appreciated.

It seems that I figured out the two issues: The "/usr/local stuff" disappeared after rebooting my system.
Good. Maybe opening terminal might have helped as well, but it is too late to test that now (and purely academic as it works now)

Quote:
Originally Posted by marcojdressler View Post
The problem with "ulimit" was due to the fact that the line had been put into the file using copy&paste. I was able to compile OF22x
If the text on the Wiki is wrong, please correct it. If it was "only" an extra character that was introduced by the paste then there is nothing that can be done about it I'm afraid.

Quote:
Originally Posted by marcojdressler View Post
Next I went on to compile the Thirdpartys:

Doing ./makeParaView gives me the error message

Code:
-- The C compiler identification is unknown
-- The CXX compiler identification is GNU 4.6.3
-- Check for working C compiler: /Applications/paraview.app/Contents/bin/cc
-- Check for working C compiler: /Applications/paraview.app/Contents/bin/cc -- broken
CMake Error at /opt/local/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:61 (message):
  The C compiler "/Applications/paraview.app/Contents/bin/cc" is not able to
  compile a simple test program.
This error has been reported also in another Forum message in 2010 (http://www.cfd-online.com/Forums/ope...-paraview.html) but the solution proposed there (
Code:
export WM_CC='gcc-mp-4.6'
) does not work for me. It is strange that WM_CC is not mentioned in the makeParaView.

Could anyone please give me a hint to fix this?
I stopped building paraview on the Mac as I'm quite happy with the built in reader (it allows me to view decomposed cases without reconstructing them. Not sure whether PV3Reader supports that yet). That is why the patch "only" makes sure that a "official" binary that is found in the Applications-folder can be used from the command line.

If you want to compile Paraview anyway: the makeParaView-script supports you in that because it allows you to select phases:
- first run only the config-phase (which will fail as you showed above)
./makeParaView -config -no-make -no-install
- got to the directory that makeParaView created for building (somewhere in build) and start the CMake Text-Gui:
ccmake .
- the TUI will tell you about undefined stuff (like the compiler). Try to fix these until the TUI allows you to generate the necessary Makefiles (you're pretty much on your own here, but most of the problems have already been answered, usually on the Paraview-mailing-list. Google is your friend here)
- go back to the root of the ThirdParty-directory and no run the remaining phases:
./makeParaView -no-config -make -install
If you fail to specify -no-config it will overwrite all the work you did before, so be careful

I did all this (and rolled it into the patch) with older versions. I'd still do it if I had the time, but I think my time is better spent with other projects. So if you (or anyone else) fells like doing this and sharing it with the world I'd appreciate this
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   March 17, 2013, 22:10
Default
  #12
Senior Member
 
Matthew Denno
Join Date: Feb 2010
Posts: 138
Rep Power: 16
mgdenno is on a distinguished road
I am having a problem with compiling on 10.8.2

Steps I took:

1) I downloaded the lastest git version
2) applied the 20130309 patches,
3) changed the permissions on addr2line4Mac.py
4) fixed the sym links in wmake/rules
5) update site/2.1.x/prefs.sh for gcc46 and ccache
6) ./Allwmake 2>&1 | tee make.log

After trying to compile I also had to comment the changes in etc/config/settings.sh because I have macports installed for MPI and ccache but didn't install cgal or boost:

Code:
#if [ -n "$WM_USE_MACPORT" ]
#then
#    export BOOST_ARCH_PATH=/opt/local
#    export CGAL_ARCH_PATH=/opt/local
#    export MPFR_ARCH_PATH=/opt/local
#    export GMP_ARCH_PATH=/opt/local
#fi
Trying to recompile I get the following errors:

Code:
make[2]: `/Users/matt/OpenFOAM/OpenFOAM-2.2.x/platforms/darwinIntel64Gcc46DPOpt/bin/multiphaseEulerFoam' is up to date.
+ wmake libso multiphaseMixture
multiphaseMixture.dep:264: *** missing separator.  Stop.
+ wmake
g++-mp-4.6 -m64 -fsignaling-nans  -ftrapping-math -DdarwinIntel64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O2  -DNoRepository -ftemplate-depth-100 -I../interFoam -ImultiphaseMixture/lnInclude -I/Users/matt/OpenFOAM/OpenFOAM-2.2.x/src/transportModels -I/Users/matt/OpenFOAM/OpenFOAM-2.2.x/src/transportModels/incompressible/lnInclude -I/Users/matt/OpenFOAM/OpenFOAM-2.2.x/src/transportModels/interfaceProperties/lnInclude -I/Users/matt/OpenFOAM/OpenFOAM-2.2.x/src/turbulenceModels/incompressible/turbulenceModel -I/Users/matt/OpenFOAM/OpenFOAM-2.2.x/src/finiteVolume/lnInclude -IlnInclude -I. -I/Users/matt/OpenFOAM/OpenFOAM-2.2.x/src/OpenFOAM/lnInclude -I/Users/matt/OpenFOAM/OpenFOAM-2.2.x/src/OSspecific/POSIX/lnInclude   -fPIC -Ddarwin -lpthread -L/Users/matt/OpenFOAM/OpenFOAM-2.2.x/platforms/darwinIntel64Gcc46DPOpt/lib/openmpi-macport -lPstream Make/darwinIntel64Gcc46DPOpt/multiphaseInterFoam.o -L/Users/matt/OpenFOAM/OpenFOAM-2.2.x/platforms/darwinIntel64Gcc46DPOpt/lib \
	     -lmultiphaseInterFoam -linterfaceProperties -lincompressibleTransportModels -lincompressibleTurbulenceModel -lincompressibleRASModels -lincompressibleLESModels -lfiniteVolume -lOpenFOAM -ldl   -lpthread -lm -o /Users/matt/OpenFOAM/OpenFOAM-2.2.x/platforms/darwinIntel64Gcc46DPOpt/bin/multiphaseInterFoam
ld: library not found for -lmultiphaseInterFoam
collect2: ld returned 1 exit status
make[2]: *** [/Users/matt/OpenFOAM/OpenFOAM-2.2.x/platforms/darwinIntel64Gcc46DPOpt/bin/multiphaseInterFoam] Error 1
+ wmake MRFMultiphaseInterFoam
g++-mp-4.6 -m64 -fsignaling-nans  -ftrapping-math -DdarwinIntel64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O2  -DNoRepository -ftemplate-depth-100 -I.. -I../../interFoam -I../../interFoam/MRFInterFoam -I../multiphaseMixture/lnInclude -I/Users/matt/OpenFOAM/OpenFOAM-2.2.x/src/transportModels -I/Users/matt/OpenFOAM/OpenFOAM-2.2.x/src/transportModels/incompressible/lnInclude -I/Users/matt/OpenFOAM/OpenFOAM-2.2.x/src/transportModels/interfaceProperties/lnInclude -I/Users/matt/OpenFOAM/OpenFOAM-2.2.x/src/turbulenceModels/incompressible/turbulenceModel -I/Users/matt/OpenFOAM/OpenFOAM-2.2.x/src/finiteVolume/lnInclude -IlnInclude -I. -I/Users/matt/OpenFOAM/OpenFOAM-2.2.x/src/OpenFOAM/lnInclude -I/Users/matt/OpenFOAM/OpenFOAM-2.2.x/src/OSspecific/POSIX/lnInclude   -fPIC -Ddarwin -lpthread -L/Users/matt/OpenFOAM/OpenFOAM-2.2.x/platforms/darwinIntel64Gcc46DPOpt/lib/openmpi-macport -lPstream Make/darwinIntel64Gcc46DPOpt/MRFMultiphaseInterFoam.o -L/Users/matt/OpenFOAM/OpenFOAM-2.2.x/platforms/darwinIntel64Gcc46DPOpt/lib \
	     -lmultiphaseInterFoam -linterfaceProperties -lincompressibleTransportModels -lincompressibleTurbulenceModel -lincompressibleRASModels -lincompressibleLESModels -lfiniteVolume -lOpenFOAM -ldl   -lpthread -lm -o /Users/matt/OpenFOAM/OpenFOAM-2.2.x/platforms/darwinIntel64Gcc46DPOpt/bin/MRFMultiphaseInterFoam
ld: library not found for -lmultiphaseInterFoam
collect2: ld returned 1 exit status
make[2]: *** [/Users/matt/OpenFOAM/OpenFOAM-2.2.x/platforms/darwinIntel64Gcc46DPOpt/bin/MRFMultiphaseInterFoam] Error 1
make[1]: *** [multiphaseInterFoam] Error 2
make[2]: `/Users/matt/OpenFOAM/OpenFOAM-2.2.x/platforms/darwinIntel64Gcc46DPOpt/bin/settlingFoam' is up to date.
make[2]: `/Users/matt/OpenFOAM/OpenFOAM-2.2.x/platforms/darwinIntel64Gcc46DPOpt/bin/twoLiquidMixingFoam' is up to date.
+ wmake libso phaseModel
'/Users/matt/OpenFOAM/OpenFOAM-2.2.x/platforms/darwinIntel64Gcc46DPOpt/lib/libphaseModel.dylib' is up to date.
+ wmake libso interfacialModels
'/Users/matt/OpenFOAM/OpenFOAM-2.2.x/platforms/darwinIntel64Gcc46DPOpt/lib/libEulerianInterfacialModels.dylib' is up to date.
+ wmake libso kineticTheoryModels
'/Users/matt/OpenFOAM/OpenFOAM-2.2.x/platforms/darwinIntel64Gcc46DPOpt/lib/libkineticTheoryModel.dylib' is up to date.
+ wmake
make[2]: `/Users/matt/OpenFOAM/OpenFOAM-2.2.x/platforms/darwinIntel64Gcc46DPOpt/bin/twoPhaseEulerFoam' is up to date.
make[1]: Target `application' not remade because of errors.
make: *** [multiphase] Error 2
make[2]: `/Users/matt/OpenFOAM/OpenFOAM-2.2.x/platforms/darwinIntel64Gcc46DPOpt/bin/solidDisplacementFoam' is up to date.
make[2]: `/Users/matt/OpenFOAM/OpenFOAM-2.2.x/platforms/darwinIntel64Gcc46DPOpt/bin/solidEquilibriumDisplacementFoam' is up to date.
make: Target `application' not remade because of errors.
mgdenno is offline   Reply With Quote

Old   March 17, 2013, 22:25
Default
  #13
New Member
 
Join Date: Mar 2011
Posts: 7
Rep Power: 15
marcojdressler is on a distinguished road
Quote:
Originally Posted by gschaider View Post
Good. Maybe opening terminal might have helped as well, but it is too late to test that now (and purely academic as it works now)



If the text on the Wiki is wrong, please correct it. If it was "only" an extra character that was introduced by the paste then there is nothing that can be done about it I'm afraid.



I stopped building paraview on the Mac as I'm quite happy with the built in reader (it allows me to view decomposed cases without reconstructing them. Not sure whether PV3Reader supports that yet). That is why the patch "only" makes sure that a "official" binary that is found in the Applications-folder can be used from the command line.

I did all this (and rolled it into the patch) with older versions. I'd still do it if I had the time, but I think my time is better spent with other projects. So if you (or anyone else) fells like doing this and sharing it with the world I'd appreciate this
Dear Bernhard:

Thank you so much for your answer.

Opening new terminals did not work, I tried that out several times without success. I am all right, however I am still a bit unclear about the various installations of OpenMPI on my system (I used MacPorts as well as another site to download them and I am not sure how all this lives side-by-side).

I decided to postpone the compilation of Paraview at a later point since I have a working version of it in the Applications folder, too. I will let you know when I get back to this in the future.

Thanks also for clarifying that the patch for the Thirdparties
Quote:
makes sure that a "official" binary that is found in the Applications-folder can be used from the command line
. I was not aware about this and I though it would only care about the scotch and the OpenMPI libraries.


Best regards,
Marco.
marcojdressler is offline   Reply With Quote

Old   March 18, 2013, 07:57
Default
  #14
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by mgdenno View Post
I am having a problem with compiling on 10.8.2

Steps I took:

1) I downloaded the lastest git version
2) applied the 20130309 patches,
3) changed the permissions on addr2line4Mac.py
4) fixed the sym links in wmake/rules
5) update site/2.1.x/prefs.sh for gcc46 and ccache
6) ./Allwmake 2>&1 | tee make.log

After trying to compile I also had to comment the changes in etc/config/settings.sh because I have macports installed for MPI and ccache but didn't install cgal or boost:

Code:
#if [ -n "$WM_USE_MACPORT" ]
#then
#    export BOOST_ARCH_PATH=/opt/local
#    export CGAL_ARCH_PATH=/opt/local
#    export MPFR_ARCH_PATH=/opt/local
#    export GMP_ARCH_PATH=/opt/local
#fi
OK. I'll make the test more specific.

Quote:
Originally Posted by mgdenno View Post
Trying to recompile I get the following errors:

Code:
make[2]: `/Users/matt/OpenFOAM/OpenFOAM-2.2.x/platforms/darwinIntel64Gcc46DPOpt/bin/multiphaseEulerFoam' is up to date.
+ wmake libso multiphaseMixture
multiphaseMixture.dep:264: *** missing separator.  Stop.
+ wmake
g++-mp-4.6 -m64 -fsignaling-nans  -ftrapping-math -DdarwinIntel64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O2  -DNoRepository -ftemplate-depth-100 -I../interFoam -ImultiphaseMixture/lnInclude -I/Users/matt/OpenFOAM/OpenFOAM-2.2.x/src/transportModels -I/Users/matt/OpenFOAM/OpenFOAM-2.2.x/src/transportModels/incompressible/lnInclude -I/Users/matt/OpenFOAM/OpenFOAM-2.2.x/src/transportModels/interfaceProperties/lnInclude -I/Users/matt/OpenFOAM/OpenFOAM-2.2.x/src/turbulenceModels/incompressible/turbulenceModel -I/Users/matt/OpenFOAM/OpenFOAM-2.2.x/src/finiteVolume/lnInclude -IlnInclude -I. -I/Users/matt/OpenFOAM/OpenFOAM-2.2.x/src/OpenFOAM/lnInclude -I/Users/matt/OpenFOAM/OpenFOAM-2.2.x/src/OSspecific/POSIX/lnInclude   -fPIC -Ddarwin -lpthread -L/Users/matt/OpenFOAM/OpenFOAM-2.2.x/platforms/darwinIntel64Gcc46DPOpt/lib/openmpi-macport -lPstream Make/darwinIntel64Gcc46DPOpt/multiphaseInterFoam.o -L/Users/matt/OpenFOAM/OpenFOAM-2.2.x/platforms/darwinIntel64Gcc46DPOpt/lib \
	     -lmultiphaseInterFoam -linterfaceProperties -lincompressibleTransportModels -lincompressibleTurbulenceModel -lincompressibleRASModels -lincompressibleLESModels -lfiniteVolume -lOpenFOAM -ldl   -lpthread -lm -o /Users/matt/OpenFOAM/OpenFOAM-2.2.x/platforms/darwinIntel64Gcc46DPOpt/bin/multiphaseInterFoam
ld: library not found for -lmultiphaseInterFoam
collect2: ld returned 1 exit status
make[2]: *** [/Users/matt/OpenFOAM/OpenFOAM-2.2.x/platforms/darwinIntel64Gcc46DPOpt/bin/multiphaseInterFoam] Error 1
+ wmake MRFMultiphaseInterFoam
g++-mp-4.6 -m64 -fsignaling-nans  -ftrapping-math -DdarwinIntel64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O2  -DNoRepository -ftemplate-depth-100 -I.. -I../../interFoam -I../../interFoam/MRFInterFoam -I../multiphaseMixture/lnInclude -I/Users/matt/OpenFOAM/OpenFOAM-2.2.x/src/transportModels -I/Users/matt/OpenFOAM/OpenFOAM-2.2.x/src/transportModels/incompressible/lnInclude -I/Users/matt/OpenFOAM/OpenFOAM-2.2.x/src/transportModels/interfaceProperties/lnInclude -I/Users/matt/OpenFOAM/OpenFOAM-2.2.x/src/turbulenceModels/incompressible/turbulenceModel -I/Users/matt/OpenFOAM/OpenFOAM-2.2.x/src/finiteVolume/lnInclude -IlnInclude -I. -I/Users/matt/OpenFOAM/OpenFOAM-2.2.x/src/OpenFOAM/lnInclude -I/Users/matt/OpenFOAM/OpenFOAM-2.2.x/src/OSspecific/POSIX/lnInclude   -fPIC -Ddarwin -lpthread -L/Users/matt/OpenFOAM/OpenFOAM-2.2.x/platforms/darwinIntel64Gcc46DPOpt/lib/openmpi-macport -lPstream Make/darwinIntel64Gcc46DPOpt/MRFMultiphaseInterFoam.o -L/Users/matt/OpenFOAM/OpenFOAM-2.2.x/platforms/darwinIntel64Gcc46DPOpt/lib \
	     -lmultiphaseInterFoam -linterfaceProperties -lincompressibleTransportModels -lincompressibleTurbulenceModel -lincompressibleRASModels -lincompressibleLESModels -lfiniteVolume -lOpenFOAM -ldl   -lpthread -lm -o /Users/matt/OpenFOAM/OpenFOAM-2.2.x/platforms/darwinIntel64Gcc46DPOpt/bin/MRFMultiphaseInterFoam
ld: library not found for -lmultiphaseInterFoam
collect2: ld returned 1 exit status
make[2]: *** [/Users/matt/OpenFOAM/OpenFOAM-2.2.x/platforms/darwinIntel64Gcc46DPOpt/bin/MRFMultiphaseInterFoam] Error 1
make[1]: *** [multiphaseInterFoam] Error 2
make[2]: `/Users/matt/OpenFOAM/OpenFOAM-2.2.x/platforms/darwinIntel64Gcc46DPOpt/bin/settlingFoam' is up to date.
make[2]: `/Users/matt/OpenFOAM/OpenFOAM-2.2.x/platforms/darwinIntel64Gcc46DPOpt/bin/twoLiquidMixingFoam' is up to date.
+ wmake libso phaseModel
'/Users/matt/OpenFOAM/OpenFOAM-2.2.x/platforms/darwinIntel64Gcc46DPOpt/lib/libphaseModel.dylib' is up to date.
+ wmake libso interfacialModels
'/Users/matt/OpenFOAM/OpenFOAM-2.2.x/platforms/darwinIntel64Gcc46DPOpt/lib/libEulerianInterfacialModels.dylib' is up to date.
+ wmake libso kineticTheoryModels
'/Users/matt/OpenFOAM/OpenFOAM-2.2.x/platforms/darwinIntel64Gcc46DPOpt/lib/libkineticTheoryModel.dylib' is up to date.
+ wmake
make[2]: `/Users/matt/OpenFOAM/OpenFOAM-2.2.x/platforms/darwinIntel64Gcc46DPOpt/bin/twoPhaseEulerFoam' is up to date.
make[1]: Target `application' not remade because of errors.
make: *** [multiphase] Error 2
make[2]: `/Users/matt/OpenFOAM/OpenFOAM-2.2.x/platforms/darwinIntel64Gcc46DPOpt/bin/solidDisplacementFoam' is up to date.
make[2]: `/Users/matt/OpenFOAM/OpenFOAM-2.2.x/platforms/darwinIntel64Gcc46DPOpt/bin/solidEquilibriumDisplacementFoam' is up to date.
make: Target `application' not remade because of errors.
The problem is that multiphaseMixture.dep does not have the correct syntax and it all goes downhill from there. The file machine-generated so it is not the fault of the patch. Usually the cause for a corrupted dep-file is that during the generation of that file the compilation was interrupted (usually by the user pressing Ctrl-C) and the file was only partially written. Remove the file and try to compile again
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   March 18, 2013, 20:15
Default
  #15
Senior Member
 
Matthew Denno
Join Date: Feb 2010
Posts: 138
Rep Power: 16
mgdenno is on a distinguished road
It worked! Thanks!!
mgdenno is offline   Reply With Quote

Old   March 27, 2013, 23:57
Default
  #16
New Member
 
Join Date: Mar 2011
Posts: 7
Rep Power: 15
marcojdressler is on a distinguished road
Dear Forum members:

I try to maintain OF2.1.1 and OF2.2.x on a MacBookPro 10.8.3.

Loading OF21 works fine and it seems that I have a fully working installation

Code:
Last login: Wed Mar 27 22:09:58 on ttys001
You have mail.
MacBook-Pro:~ md$ which cp
/bin/cp
MacBook-Pro:~ md$ of21
MacBook-Pro:~ md$ which cp
/bin/cp
MacBook-Pro:~ md$ 

MacBook-Pro:~ md$ echo $PATH
/Users/md/OpenFOAM/ThirdParty-2.1.1/platforms/darwinIntel64Gcc46/paraview-3.12.0/bin:/Users/md/OpenFOAM/md-2.1.1/platforms/darwinIntel64Gcc46DPOpt/bin:/Users/md/OpenFOAM/site/2.1.1/platforms/darwinIntel64Gcc46DPOpt/bin:/Users/md/OpenFOAM/OpenFOAM-2.1.1/platforms/darwinIntel64Gcc46DPOpt/bin:/Users/md/OpenFOAM/OpenFOAM-2.1.1/bin:/Users/md/OpenFOAM/OpenFOAM-2.1.1/wmake:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin
MacBook-Pro:~ md$
Starting OF22 there is serious a problem and the cp command is not recognized!

Quote:
Last login: Wed Mar 27 22:10:40 on ttys000
You have mail.
MacBook-Pro:~ md$ which cp
/bin/cp
MacBook-Pro:~ md$ of22
Using paraview in directory /Applications/paraview.app
MacBook-Pro:~ md$ which cp
/Applications/paraview.app/Contents/bin/cp
MacBook-Pro:~ md$

MacBook-Pro:~ md$ echo $PATH
/Users/md/OpenFOAM/ThirdParty-2.2.x/platforms/darwinIntel64Gcc46/gperftools-svn/bin:/Applications/paraview.app/Contents/bin:/Users/md/OpenFOAM/ThirdParty-2.2.x/platforms/darwinIntel64Gcc46/paraview-3.12.0/bin:/Users/md/OpenFOAM/md-2.2.x/platforms/darwinIntel64Gcc46DPOpt/bin:/Users/md/OpenFOAM/site/2.2.x/platforms/darwinIntel64Gcc46DPOpt/bin:/Users/md/OpenFOAM/OpenFOAM-2.2.x/platforms/darwinIntel64Gcc46DPOpt/bin:/Users/md/OpenFOAM/OpenFOAM-2.2.x/bin:/Users/md/OpenFOAM/OpenFOAM-2.2.x/wmake:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin
So there is a issue with $PATH. This creates a problem when I compile the ThirdParty directory because Allwmake looks for cp in the paraview folder and will crash!

Can anyone comment on this, or give me a hint how to fix it?
Looking forward reading from you.
Regards,
MD
marcojdressler is offline   Reply With Quote

Old   March 28, 2013, 07:27
Default
  #17
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by marcojdressler View Post
Dear Forum members:

I try to maintain OF2.1.1 and OF2.2.x on a MacBookPro 10.8.3.

Loading OF21 works fine and it seems that I have a fully working installation

Code:
Last login: Wed Mar 27 22:09:58 on ttys001
You have mail.
MacBook-Pro:~ md$ which cp
/bin/cp
MacBook-Pro:~ md$ of21
MacBook-Pro:~ md$ which cp
/bin/cp
MacBook-Pro:~ md$ 

MacBook-Pro:~ md$ echo $PATH
/Users/md/OpenFOAM/ThirdParty-2.1.1/platforms/darwinIntel64Gcc46/paraview-3.12.0/bin:/Users/md/OpenFOAM/md-2.1.1/platforms/darwinIntel64Gcc46DPOpt/bin:/Users/md/OpenFOAM/site/2.1.1/platforms/darwinIntel64Gcc46DPOpt/bin:/Users/md/OpenFOAM/OpenFOAM-2.1.1/platforms/darwinIntel64Gcc46DPOpt/bin:/Users/md/OpenFOAM/OpenFOAM-2.1.1/bin:/Users/md/OpenFOAM/OpenFOAM-2.1.1/wmake:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin
MacBook-Pro:~ md$
Starting OF22 there is serious a problem and the cp command is not recognized!



So there is a issue with $PATH. This creates a problem when I compile the ThirdParty directory because Allwmake looks for cp in the paraview folder and will crash!

Can anyone comment on this, or give me a hint how to fix it?
Looking forward reading from you.
Regards,
MD
Problem seems to be that there is a cp in /Applications/paraview.app/Contents/bin ! I have no idea how it got there (I use the Kitware-binaries and thy have no cp in that folder). Is your paraview.app selfcompiled? (maybe a problem with the install-script). My installation has only 6 binaries in that folder. All starting with pv*

Usually I'd say standard-utilities in non-standard places is highly suspicious (smells like root-kit) but I guess in this case it is "just" a problem with the install scripts
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   March 28, 2013, 18:24
Default
  #18
New Member
 
Join Date: Mar 2011
Posts: 7
Rep Power: 15
marcojdressler is on a distinguished road
Quote:
Originally Posted by gschaider View Post
Problem seems to be that there is a cp in /Applications/paraview.app/Contents/bin ! I have no idea how it got there (I use the Kitware-binaries and thy have no cp in that folder). Is your paraview.app selfcompiled? (maybe a problem with the install-script). My installation has only 6 binaries in that folder. All starting with pv*

Usually I'd say standard-utilities in non-standard places is highly suspicious (smells like root-kit) but I guess in this case it is "just" a problem with the install scripts
Hi Bernhard:

Thanks for the post.
My paraview.app is not self-compiled and I checked three versions of ParaView on
HTML Code:
http://www.paraview.org/paraview/resources/software.php
This is what I found:
  • ParaView-3.98.0-Darwin-64bit has 6 files pv* in the /Applications/paraview.app/Contents/bin folder plus an additional 429 symbolic links, one of them named cp causing the problem.
  • ParaView-3.98.1-Darwin-64bit has 6 files pv*in the Contents/bin folder.
  • ParaView-3.14.1-Darwin-x86_64bit has 6 files pv* in the Contents/bin folder.

So I am going to delete my version of ParaView and replace it with one of the other two. … And this should resolve the problem. I hope that working with 3.98.1 is ok.

Thanks and regards,
MD
marcojdressler is offline   Reply With Quote

Old   March 29, 2013, 04:49
Default
  #19
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by marcojdressler View Post
Hi Bernhard:

Thanks for the post.
My paraview.app is not self-compiled and I checked three versions of ParaView on
HTML Code:
http://www.paraview.org/paraview/resources/software.php
This is what I found:
  • ParaView-3.98.0-Darwin-64bit has 6 files pv* in the /Applications/paraview.app/Contents/bin folder plus an additional 429 symbolic links, one of them named cp causing the problem.
  • ParaView-3.98.1-Darwin-64bit has 6 files pv*in the Contents/bin folder.
  • ParaView-3.14.1-Darwin-x86_64bit has 6 files pv* in the Contents/bin folder.

So I am going to delete my version of ParaView and replace it with one of the other two. … And this should resolve the problem. I hope that working with 3.98.1 is ok.

Thanks and regards,
MD
My guess is that the packager is very embarrassed about these links
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   March 29, 2013, 14:49
Default Use the git version, not the tarball download
  #20
New Member
 
Bryan Lewis
Join Date: Jul 2010
Posts: 5
Rep Power: 15
lewisb2 is on a distinguished road
For new people reading this forum, I found that it may be necessary to use the git repository version, rather than the tarball download. I was getting the following error with the download.

make: *** No rule to make target `matrices/lduMatrix/lduMatrix/lduMatrix.dep', needed by `Make/darwinIntel64Gcc46DPOpt/dependencies'. Stop.
make: *** Waiting for unfinished jobs....

But if I pulling the source from git, it worked without a problem.

OS X 10.8.
gcc-4.6, openmpi, flex, bison, ccache, cgal, and boost installed from macports

1) pull the latest git version
2) applied the 20130309 patches,
3) changed the permissions on addr2line4Mac.py
4) fixed the sym links in wmake/rules
5) update etc/bashrc for gcc46 and ccache
6) ./Allwmake 2>&1 | tee make.log
lewisb2 is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Getting Started with OpenFOAM wyldckat OpenFOAM 25 August 14, 2022 14:55
OpenFOAM course for beginners Jibran OpenFOAM Announcements from Other Sources 2 November 4, 2019 09:51
OpenFOAM v3.0+ ?? SBusch OpenFOAM 22 December 26, 2016 15:24
[OpenFOAM.org] A Mac OS X of23x Development Environment Using Docker rt08 OpenFOAM Installation 1 February 28, 2016 20:00
OpenFOAM Training, London, Chicago, Munich, Sep-Oct 2015 cfd.direct OpenFOAM Announcements from Other Sources 2 August 31, 2015 14:36


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