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
(→Compiling on 1.4) |
m (→Compile with paraview 2.6) |
||
Line 45: | Line 45: | ||
* Point apps/paraview/??rc to that installation | * 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) | ** 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 | + | * If you didn't apply the second patch (if you did: the patch will take care of it): |
− | * Start the Allwmake there. It will fail at linking the libPVReader.so | + | ** Go to $FOAM_UTILITIES/postprocessing/graphics/PVReader |
− | * | + | ** Start the Allwmake there. It will fail at linking the libPVReader.so |
− | ** 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 | + | ** Go to PVReader/Make/darwinOpt |
− | ** In link.txt append <tt>-undefined dynamic_lookup</tt> | + | *** 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 |
− | *** This change will be lost with every subsequent call to cmake | + | *** In link.txt append <tt>-undefined dynamic_lookup</tt> |
− | ** Call make (in PVReader/Make/darwinOpt). It should link | + | **** This change will be lost with every subsequent call to cmake |
− | * now paraFoam should be usable | + | *** Call make (in PVReader/Make/darwinOpt). It should link |
+ | ** now paraFoam should be usable | ||
== Future plans == | == Future plans == |
Revision as of 18:14, 2 May 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
- sudo port install mico to enable the compilation of FoamX
- the MPI-implementation of your choice (this is untested and unsupported by the patches)
1.2 Preparing the sources
- Extract the sources into the disk-image
- Apply the patch Media:OpenFOAM1.4-forMac.v1.patch
- Fix to readSTLASCII.L is already in more current versions of the Sources. The patch may fail here. Ignore it
- Untar Media:DarwinWmakeRules.1.4.v1.tgz to get compilation rules for darwin
- Apply a second patch Media:OpenFOAM1.4-forMac.v2.patch. This patch is not strictly necessary. It
- resets the MICO to the darwinPorts one (thus enabling the compilation of FoamX and patchTool)
- helps to compile the paraview-Filter without human intervention
- removes warnings about unsupported options for the head-command from some scripts
1.3 Compilation
See the regular README
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)
- If you didn't apply the second patch (if you did: the patch will take care of it):
- 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
- Support at least one MPI-implementation (propably OpenMPI)
1.7 Tested systems
This has only been tried on a PowerPC iBook yet.
1.8 Known issues
- right clicking (Ctrl+Click) does not work in FoamX on the trackpad of Apple-Notebooks. It works with a USB-Mouse. Propably a problem with the JVM
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)