CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Installation on Windows, Mac and other Unsupported Platforms (http://www.cfd-online.com/Forums/openfoam-installation-windows-mac/)
-   -   Installing OF 1.6 on Mac OS X (http://www.cfd-online.com/Forums/openfoam-installation-windows-mac/66969-installing-1-6-mac-os-x.html)

gschaider July 29, 2009 19:58

Installing OF 1.6 on Mac OS X
 
Hi!

I managed to compile OF 1.6 on my MacBook. The necessary patches and some (very short) instructions can be found at:

http://openfoamwiki.net/index.php/Ho...enFOAM_v16_Mac

IMHO the instructions are sufficient for somebody who has already compiled OF (preferably on a Mac) but for someone who has never compiled OF they may be hard to understand. I therefor encourage everyone who finds an error (typo or otherwise) on that page or who finds the instructions on the page too short to extend the page. Maybe it will grow into something that is usable for everyone ;)

Bernhard

podallaire July 29, 2009 22:35

cool, will give it a try

Thanks

PO

gschaider July 30, 2009 04:54

Quote:

Originally Posted by podallaire (Post 224646)
cool, will give it a try

With it you mean augmenting the Wiki-page, I assume? Great. But first try the patches ;)

podallaire July 30, 2009 07:41

Hi !

The compiling was successful under 32 bit. I'm planning to try 64 bit later today. I might try ParaView later but I'm planning to stick to Takuya's reader.

For sure I will contribute to the wiki page !

Thanks

PO

gschaider July 30, 2009 08:31

Quote:

Originally Posted by podallaire (Post 224699)
The compiling was successful under 32 bit. I'm planning to try 64 bit later today. I might try ParaView later but I'm planning to stick to Takuya's reader.

In the vanilla compilation fails with an error message that the Carbon-Framework is not supported in 64 bit. I went to $Pareview_Dir and tried to change the configuration manually with "ccmake ." to use Cocoa instead and compile with make, but it seems like it still tries to compile with Carbon.

So I'm afraid Takuya's reader won't work in 64bit, too.

Quote:

Originally Posted by podallaire (Post 224699)
For sure I will contribute to the wiki page !

Looking forward to it

podallaire July 30, 2009 08:34

Did you recompile QT with Cocoa 64 bit ? That's the key !

podallaire July 30, 2009 09:06

Hi Bernhard,

for darwinIntel64, I think the patches will need very minor modifications for
the "if defined darwinPpc || defined darwinIntel" statements.

Regards,

PO

gschaider July 30, 2009 09:14

Quote:

Originally Posted by podallaire (Post 224705)
Did you recompile QT with Cocoa 64 bit ? That's the key !

No. I don't think so (I think I'm living off a binary downloaded from Trolltech)

gschaider July 30, 2009 09:59

Quote:

Originally Posted by podallaire (Post 224713)
for darwinIntel64, I think the patches will need very minor modifications for
the "if defined darwinPpc || defined darwinIntel" statements.

That would be in the ThirdParty-patch wouldn't it? I checked and for some reason it compiles anyway. Obviously because in the meantime there is a /usr/include/malloc.h (a symbolic link to /usr/include/sys/malloc.h which was what this condition was working around)

But WHAT I noticed during checking is that for 64 bit in wmake/Makefile the extension for shared libs is NOT set to dylib. But this should be only of cosmetic importance

andrewryan August 2, 2009 05:43

Patches for OpenFOAM 1.6 on OSX
 
Hi all

I found this instructions [1] however I'm unable to download the patches linked there (I just get some html files), does anybody here have this patches? Would be great if you could post them again.


[1] http://openfoamwiki.net/index.php/Ho...enFOAM_v16_Mac

podallaire August 2, 2009 08:01

Use Firefox instead of Safari to download the files

Cheers

PO

gschaider August 3, 2009 10:25

Quote:

Originally Posted by podallaire (Post 224983)
Use Firefox instead of Safari to download the files

I never noticed that problem (it is more often that I upload than download;) ). Does it happen for all files on the Wiki?

andrewryan August 3, 2009 11:13

I tried to compile OF as described in the wiki. I could apply the patches by using patch -p1 < patchfile. However it still didn't compile. I posted the build log [1] could anybody have a look at it? Also it complained that it could not find malloc.h which is in /usr/include/sys. As a workaround i created a symlink in /usr/include for malloc.h.

[1] http://emerging-patterns.com/tmp/compile.log

podallaire August 3, 2009 11:53

Bernhard,

I have applied minor modifs to your patches regarding the darwinIntel64 arch / should I send it you via email for your review ? We could add those files on the Wiki

Andrew - those modifs should help you

Thanks

PO

gschaider August 3, 2009 13:02

Quote:

Originally Posted by andrewryan (Post 225095)
I tried to compile OF as described in the wiki. I could apply the patches by using patch -p1 < patchfile. However it still didn't compile. I posted the build log [1] could anybody have a look at it? Also it complained that it could not find malloc.h which is in /usr/include/sys. As a workaround i created a symlink in /usr/include for malloc.h.

[1] http://emerging-patterns.com/tmp/compile.log

The line

could not open file PrimitivePatch.H for source file db/regIOobject/regIOobject.C
leads me to the question: you're compiling OF on a case-sensitive-filesystem, are you? Got to $FOAM_SRC/OpenFOAM/lnInclude and chack if there is a primitivePatch.H AND a PrimitivePatch.H. If not got back to the start (create a disk-image or a partition with a case-sensitve file-system and do the compilation there)

Bernhard

gschaider August 3, 2009 13:03

Quote:

Originally Posted by podallaire (Post 225100)
Bernhard,

I have applied minor modifs to your patches regarding the darwinIntel64 arch / should I send it you via email for your review ? We could add those files on the Wiki

Yes please. Send them to me

Quote:

Originally Posted by podallaire (Post 225100)
Andrew - those modifs should help you

They solve the malloc.h-problem, right?

podallaire August 3, 2009 13:12

just sent an email / yes, no malloc problem

andrewryan August 3, 2009 13:38

@gschaider: I was asking myself that too and checked it:

macbook:~ nils$ cd /Users/nils/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/
macbook:lnInclude nils$ ls [pP]rimitivePatch.H
PrimitivePatch.H primitivePatch.H

Otherwise I would already get trouble when trying to expand the archive, right? I also noticed the "could not open file" errors, but don't have an idea why they appear..

@podallaire What else problems does your new patch fix?

podallaire August 3, 2009 15:59

... just minor details which replicate the behavior of the patch for 32 bit (darwinIntel) for the 64 bit (darwinIntel64)

gschaider August 3, 2009 18:00

Quote:

Originally Posted by andrewryan (Post 225113)
@gschaider: I was asking myself that too and checked it:

macbook:~ nils$ cd /Users/nils/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/
macbook:lnInclude nils$ ls [pP]rimitivePatch.H
PrimitivePatch.H primitivePatch.H

OK. The case-sensitivity is not the problem
Quote:

Originally Posted by andrewryan (Post 225113)
Otherwise I would already get trouble when trying to expand the archive, right?

No. when untarring PrimitivePatch.H would overwrite primitivePatch.H (or the other way round. whoever comes last)
Quote:

Originally Posted by andrewryan (Post 225113)
I also noticed the "could not open file" errors, but don't have an idea why they appear..

Either because they are not there or some script 'thinks' they are not there ;) . Check with

find $FOAM_SRC -name missingFile.C

whether these files are there. Maybe something happened during untarring


All times are GMT -4. The time now is 20:50.