2.0.x on Mac OSX
I'm trying to compile 2.0.x on Mac OS X (Snow Leopard) and in
src/OSspecific/POSIX/POSIX.C there is an include for "link.h" that I cant figure out which package it comes from. Commenting it out yields an POSIX.C:1216:47: error: 'dl_iterate_phdr' was not declared in this scope which is a clue, but i still cant find out if there is a macports package that supply this. Anyone know? N |
Quote:
Bernhard |
1 Attachment(s)
Quote:
In the attached tar you'll find three files: - patch to OpenFOAM itself. - patch to the thirdParty-directory - A file that goes to ~/OpenFOAM/site/2.0.x/ This tells OF that it should use the system-OpenMPI and gcc 4.5 from MacPorts (the Apple gcc 4.2 chockes on some SubField-stuff) An comments/improvements welcome Bernhard |
Thank you Bernhard,
tested the patches and used gcc-4.3 to compile it / worked perfectly ! Regards, PO |
Yes, worked like a charm.
thanks for that, saved me lots of time :) (Im using gcc-mp-4.6) N |
I'm wondering if files src/OpenFOAM/db/dynamicLibrary/dynamicCode/dynamicCode.C (line 337) and src/OSspecific/POSIX/POSIX.C (line 1118) should be modified for the *.so ?
It looks that loading the shared libs from the controlDcit using extension *.so does not work / I understand that dlLibraryTable.C cannot be anymore tweaked the way you did it for 1.7.x Thanks PO |
2 Attachment(s)
Quote:
I didn't port the dlLoaded-function (that would have been more work) because I found no code that uses that Bernhard |
Perfect!
Compiled *out of the box*. Couldn't have been more perfect. It'll hardly be any effort even for brand new users!
Still, if anyone needs the readymade binaries on a disk image, please see the link in my signature. More power to you, BG :) (gcc-mp-45, OS X 10.6.7) |
OF on Lion?
Hi guys.
Great work the one you have been doing here with these images. I would like to hear if any of you have tested these images of OF1.7 and OF2.0 on Lion OS X. I tried to used the images, but they don't work. Any suggestions? Best regards, Felipe |
Quote:
regards, PO |
Ok, I will try that.
Although I tried with gcc 4.5.3 and it did not work. I'll post the results later on. Thanks for your answer, Felipe |
Hi
I am also trying to compile OpenFOAM 2.0.x on Mac OS 10.7, and having difficulties. I am using GCC 4.4 from MacPorts, XCode 4.1, and OpenMPI compiled on my machine from the source code (as 10.7 no longer includes OpenMPI). I've applied the patches, after updating the OpenFOAM_V2 patch to use gcc-mp-4.4. When I compile, I get several errors, but the most common one is that header files cannot be opened when making dependency lists. Once the compile is done, I will upload the output of the terminal. Any suggestions would be most appreciated, as well as your patience as I am unfamiliar with compiling code. Thanks, Caleb |
Hi
So an update: I'm confused. After the compile completed, I ran the foamInstallationTest script. There were 2 critical errors, but the first was the OS. The second was the gcc version - it found 4.2.1. I set the patch to use gcc-mp-4.4. I can run blockMesh and icoFOAM, so maybe things installed correctly? Anyone know why I was getting the "could not open file *.H for source *.C" messages? Here is a sample of the messages: + wmake libso OpenFOAM wmakeLnInclude: linking include files to ./lnInclude Making dependency list for source file global/global.Cver Making dependency list for source file global/argList/argList.C Making dependency list for source file global/clock/clock.C Making dependency list for source file primitives/bools/bool/bool.C Making dependency list for source file primitives/bools/bool/boolIO.C Making dependency list for source file primitives/bools/Switch/Switch.C Making dependency list for source file primitives/bools/Switch/SwitchIO.C Making dependency list for source file primitives/bools/lists/boolList.C could not open file HashSet.H for source file global/global.Cver could not open file Map.H for source file global/global.Cver could not open file primitiveMeshI.H for source file global/global.Cver could not open file pointIOField.H for source file global/global.Cver could not open file faceIOList.H for source file global/global.Cver could not open file labelIOList.H for source file global/global.Cver could not open file polyBoundaryMesh.H for source file global/global.Cver could not open file boundBox.H for source file global/global.Cver could not open file pointZoneMesh.H for source file global/global.Cver could not open file faceZoneMesh.H for source file global/global.Cver could not open file cellZoneMesh.H for source file global/global.Cver I also got this message many times, early on: UPstream.C:266: warning: use of old-style cast Thanks, Caleb |
Quote:
Quote:
|
may i ask how to run this this .path file? i tired:
patch -p0 < ThirdParty-2.0.0-Mac.patch but it does not work |
Quote:
|
i put "ThirdParty-2.0.0-Mac.patch" in thirdparty dictionary and tried to run it using:
Quote:
Quote:
|
Greetings to all!
@of_user_: Try this command instead: Code:
patch -p1 < ThirdParty-2.0.0-Mac.patch Code:
|--- a/Allwmake Quote:
Best regards, Bruno |
For OS X 10.7+
For those who want to simply get it working on Lion:
(I had to do the last step twice; Pstream didn't compile on the first try) Use the new 10.7 ParaView 3.10.1 binary on Kitware's website. (yay!) Side note: Even though WM_COMPILER=Gcc46 in site/2.0.x/prefs.sh sometimes 'gcc' is invoked instead of 'gcc-mp-4.6'. Why is this so? This calls Apple's gcc or llvm-gcc 4.2 which spits out furious errors on some files. (to work around it, do 'sudo port select gcc mp-gcc46' then switch back when done) |
Perhaps unsurprisingly, the patch provided above doesn't work with ThirdParty-2.0.1, which is what's available now.
Is there a place I can find the old files? Is there a timeline for a new patch? |
All times are GMT -4. The time now is 00:06. |