I've tried to compile OpenFOAM-1.5 with all patches from git on ubuntu 8.10 Intrepid Ibex with the default installed system gcc-4.3.2 compiler. And I'm getting the error message, shown below. If I install gcc-4.2.4 the compilation is fine and evene on ubuntu 8.04, no problems occur with the same setup. So, all paths, etc. should be setup correctly.

Has anybody some experience in compiling OpenFOAM-1.5 with gcc>=4.3.2 and has maybe a patch for that problem or knows howto resolve it?

We (OpenCFD) use gcc-4.3.2 for all our development work and for compiling 1.5.x and have not encountered this problem.

H

deepblue17

February 5, 2009 05:55

Thanks for the reply. I want t

Thanks for the reply. I want to compile OpenFOAM-1.5 under gentoo Linux with gcc-4.3.2-r2 from portage (the gentoo package manager), but unfortunately it gives me a similar error. So actually I don't know what's the exact problem.

Can you tell me which distribution you are using? And if you are using the system wide gcc or a self compiled version, with some "fancy" compile flags? In the hope it will help me, to debug the problem a little bit further.

kian

February 6, 2009 11:36

Hi Oliver,
I've seen the sa

Hi Oliver,

I've seen the same problem with the system gcc-4.3.2 under Ubuntu.
Compiling gcc-4.3.2 solved the problem for me.

Kian Mehravaran

deepblue17

February 7, 2009 14:12

Hello Kian,
thank's for you

Hello Kian,

thank's for your reply, but I'm wondering, why it works on ubuntu with a self compiled gcc-4.3.2 and under gentoo it does not. Because on gentoo I've also compiled the gcc-4.3.2 on my own (that's the normal way on gentoo).

Just for completeness, I've to say, that with gcc-4.3.1 on gentoo, the compilation of OpenFOAM-1.5 works fine, without any problems. And compiling gcc at your own under ubuntu is not an option, if you think on automatic packaging OpenFOAM as a debian package.

I ran into the same issue, and it is because the IO-streams operators for Foam::wallPoint are not properly declared (i.e. they only show up in the friend function declarations of Foam::wallPoint. However, I couldn't reproduce the problem using a simple test case which is pretty strange.

The attached patch against OpenFOAM-1.5.x (commit 1c60464) solves the problem for me.

Thanks for the patch, I have pushed the change to 1.5.x. Please let us know if any more forward declarations are missing; we are not seeing problems with them here.

H

mwild

March 2, 2009 08:26

Thanks Henry
So far no othe

Thanks Henry

So far no other error cropped up. But as I said, I wasn't able to reproduce the error using a simple test case which I think is pretty strange.

Michael

henry

March 2, 2009 08:32

It seems most compilers are no

It seems most compilers are not good at spotting this deviation from the standard and the level of the checking depends on the context as you have found. We have been playing with CInt which is MUCH more sensitive to these inconsistencies and when it has evolved to a point that it can handle the whole of OpenFOAM we will be able to iron-out all of them.