Installation/Mac OS/Outdated/Howto compile OpenFOAM 1.3 and 1.4 on Mac OS X
From OpenFOAMWiki
This page is work in progress
Contents
1 Compiling on 1.4
This is just a sketch. More will come
1.1 Preparing for Compilation
- Install latest XCode
- Generate a disk-image with a Case-sensitive filesystem
- Using the command-line tool hdiutil (the GUI-tool can't do this as far as I remember). Details will follow
- Install additional Utilities via darwinports
- I think flex++, but I'm not sure
1.2 Preparing the sources
- Extract the sources into the disk-image
- Apply the patch Media:OpenFOAM1.4-forMac.v1.patch
1.3 Compilation
See the regular README
This should compile everything except for
- the Paraview-connection (paraFoam)
- FoamX-stuff
1.4 Comments on the patch
- the stuff in doubleFloat.H repairs the fact that the Apple-headers don't have prototypes for those functions (don't know if they exist in the Library)
- Should be guarded with a #ifdef darwin
- Most of the other stuff is described in the section about 1.3 below
- I compiled with the compiler Apple provides (gcc 4.0,1). If you get a newer one from darwinports some of the changes might not be needed
1.5 Future plans
- Compile with paraview 2.6
- Incorporate FoamX
1.6 Tested systems
This has only been tried on a PowerPC iBook yet.
2 Old Stuff: Verbose description on 1.3
Currently this page only gives a description which files have been modified to compile the vanilla-1.3-sources (this is basically a transcript of my notes). A more detailed description will be given when I have the time (plus I want to wait for 1.4 until I do that)
Stuff with a question mark are things I don't know without looking at the source what I have done
- basrc and cshrc in .OpenFOAM and paraview modified to recognize darwin
- applications//utilities/miscellaneous/foamFlex/flexdef.h: malloc.h is in different location
- OSSpecific/Unix/fileStat.C: sysmacros
- error.C: special case for darwin Darwin
- wmake/Makefile: rules for darwin-dylib
- .cshrc and .bashrc ?
- rusles/darwin (Changes on LINKEXE - there's got to be another way)
- TODO: DYLIB_PATH in normale Files
- sonicFoamAutoMotion: Addition in options (meshTools must be linked to it)
- moveMesh: ditto
- boxTurb: ditto
- mapFields: ditto
- financialFoam: finiteVolume
- icoErrorEstimate: detto
- momentScalarError: detto
- icoMomentError: detto
- in /applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/Make/darwinDPOpt CMakeFiles/PVFoamReader.dir/build.make for the linking command the option "-undefined dynamic_lookup" has to be added
--Bgschaid 14:36, 22 Mar 2007 (CET)