|
[Sponsors] |
June 21, 2011, 14:01 |
2.0.x on Mac OSX
|
#1 |
Super Moderator
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 29 |
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 |
|
June 21, 2011, 16:59 |
|
#2 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Bernhard |
||
June 21, 2011, 21:16 |
|
#3 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
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 |
||
June 22, 2011, 11:39 |
|
#4 |
Senior Member
Pierre-Olivier Dallaire
Join Date: Mar 2009
Location: Montreal, Quebec, Canada
Posts: 192
Rep Power: 17 |
Thank you Bernhard,
tested the patches and used gcc-4.3 to compile it / worked perfectly ! Regards, PO |
|
June 22, 2011, 11:56 |
|
#5 |
Super Moderator
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 29 |
Yes, worked like a charm.
thanks for that, saved me lots of time (Im using gcc-mp-4.6) N |
|
June 22, 2011, 13:10 |
|
#6 |
Senior Member
Pierre-Olivier Dallaire
Join Date: Mar 2009
Location: Montreal, Quebec, Canada
Posts: 192
Rep Power: 17 |
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 Last edited by podallaire; June 22, 2011 at 13:25. Reason: missing one file |
|
July 5, 2011, 17:56 |
|
#7 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
I didn't port the dlLoaded-function (that would have been more work) because I found no code that uses that Bernhard |
||
July 15, 2011, 01:05 |
Perfect!
|
#8 |
Member
Join Date: Mar 2009
Location: Switzerland
Posts: 40
Rep Power: 17 |
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)
__________________
If you only have a hammer, you tend to see every problem as a nail. Last edited by sushant; July 15, 2011 at 01:07. Reason: mentioned gcc/system version |
|
July 25, 2011, 03:18 |
OF on Lion?
|
#9 |
New Member
Felipe
Join Date: Apr 2010
Posts: 13
Rep Power: 16 |
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 |
|
July 25, 2011, 09:18 |
|
#10 | |
Senior Member
Pierre-Olivier Dallaire
Join Date: Mar 2009
Location: Montreal, Quebec, Canada
Posts: 192
Rep Power: 17 |
Quote:
regards, PO |
||
July 25, 2011, 12:43 |
|
#11 |
New Member
Felipe Sanchez
Join Date: Jul 2009
Posts: 2
Rep Power: 0 |
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 |
|
July 26, 2011, 11:44 |
|
#12 |
New Member
Caleb Gingrich
Join Date: Jul 2011
Posts: 2
Rep Power: 0 |
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 Last edited by calebg; July 26, 2011 at 12:00. |
|
July 26, 2011, 12:40 |
|
#13 |
New Member
Caleb Gingrich
Join Date: Jul 2011
Posts: 2
Rep Power: 0 |
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 |
|
July 27, 2011, 10:55 |
|
#14 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
That is only a warning. If it was serious god would have created it as an error |
||
August 3, 2011, 17:20 |
|
#15 |
New Member
Join Date: Jul 2011
Posts: 19
Rep Power: 15 |
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 |
|
August 4, 2011, 07:23 |
|
#16 |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
||
August 4, 2011, 16:06 |
|
#17 | ||
New Member
Join Date: Jul 2011
Posts: 19
Rep Power: 15 |
i put "ThirdParty-2.0.0-Mac.patch" in thirdparty dictionary and tried to run it using:
Quote:
Quote:
Last edited by of_user_; August 4, 2011 at 16:35. |
|||
August 4, 2011, 17:01 |
|
#18 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,980
Blog Entries: 45
Rep Power: 128 |
Greetings to all!
@of_user_: Try this command instead: Code:
patch -p1 < ThirdParty-2.0.0-Mac.patch Code:
|--- a/Allwmake |+++ b/Allwmake Quote:
Best regards, Bruno
__________________
|
||
August 28, 2011, 02:59 |
For OS X 10.7+
|
#19 |
Member
Join Date: Mar 2009
Location: Switzerland
Posts: 40
Rep Power: 17 |
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)
__________________
If you only have a hammer, you tend to see every problem as a nail. Last edited by sushant; August 28, 2011 at 03:16. Reason: patch edits |
|
September 13, 2011, 21:41 |
|
#20 |
New Member
Nathan Woods
Join Date: Sep 2011
Posts: 2
Rep Power: 0 |
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? |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
fluent @ Mac OSx | ignazio | FLUENT | 12 | July 25, 2017 07:03 |
foamToTecplot360 on mac osx 10.6 SL | mohanamuraly | OpenFOAM | 0 | April 27, 2011 00:26 |
Mac OSX and Homebrew | egp | OpenFOAM Installation | 1 | February 15, 2011 10:21 |
OpenFOAM13 for Mac OSX Darwin 104 | hjasak | OpenFOAM Installation | 70 | September 24, 2010 05:06 |
OpenFOAM on mac OSX | Nick Colam | Main CFD Forum | 3 | January 27, 2009 00:06 |