Difference between revisions of "Installation/Mac OS/Outdated/Howto compile OpenFOAM 1.3 and 1.4 on Mac OS X"
From OpenFOAMWiki
< Installation | Mac OS | Outdated
m (→Compiling on 1.4) |
(→Compile with paraview 2.6) |
||
Line 46: | Line 46: | ||
* Go to PVReader/Make/darwinOpt | * Go to PVReader/Make/darwinOpt | ||
** Under that directory you will find (sorry I'm not at my Computer so I don't know the exact location) a file link.txt | ** Under that directory you will find (sorry I'm not at my Computer so I don't know the exact location) a file link.txt | ||
− | ** In link.txt append | + | ** In link.txt append <tt>-undefined dynamic_lookup</tt> |
*** This change will be lost with every subsequent call to cmake | *** This change will be lost with every subsequent call to cmake | ||
** Call make (in PVReader/Make/darwinOpt). It should link | ** Call make (in PVReader/Make/darwinOpt). It should link | ||
* now paraFoam should be usable | * now paraFoam should be usable | ||
− | + | ||
== Future plans == | == Future plans == | ||
Revision as of 11:30, 28 April 2007
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
- REMARK: It actually can. Open the Disk Utility, create a new image as usual, then in the "Erase"-tab select one of the case sensitive file systems from the "Volume Format" drop-down and click on "erase".
- 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 Compile with paraview 2.6
This is a bit messy.
- Compile Paraview according to http://www.paraview.org/Wiki/ParaView:FAQ#How_do_I_compile_ParaView_for_Mac_OS_X .3F (doesn't have to be on the case sensitve file system)
- install it
- Point apps/paraview/??rc to that installation
- You might have to copy the header file to the place where they are expected ($ParaView_Dir/include)
- Go to $FOAM_UTILITIES/postprocessing/graphics/PVReader
- Start the Allwmake there. It will fail at linking the libPVReader.so
- Go to PVReader/Make/darwinOpt
- Under that directory you will find (sorry I'm not at my Computer so I don't know the exact location) a file link.txt
- In link.txt append -undefined dynamic_lookup
- This change will be lost with every subsequent call to cmake
- Call make (in PVReader/Make/darwinOpt). It should link
- now paraFoam should be usable
1.6 Future plans
- Incorporate FoamX
1.7 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)