|
[Sponsors] |
OpenFoam-1.5 on Solaris -- compilation problem calling octreeDataPoint(.) constructor |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 2, 2009, 05:09 |
OpenFoam-1.5 on Solaris -- compilation problem calling octreeDataPoint(.) constructor
|
#1 |
New Member
Verdi March
Join Date: Jun 2009
Posts: 2
Rep Power: 0 |
Hi,
Using gcc-4.4, there's a compilation error with the following errors: Code:
triSurface/surfaceFeatures/surfaceFeatures.C:770: error: conflicting declaration 'Foam::octreeDataPoint samples' triSurface/surfaceFeatures/surfaceFeatures.C:769: error: 'samples' has a previous declaration as 'Foam::treeBoundBox samples' triSurface/surfaceFeatures/surfaceFeatures.C: In member function 'Foam::Map<int> Foam::surfaceFeatures::nearestSamples(const Foam::labelList&, const Foam::pointField&, const Foam::scalarField&, const Foam::scalarField&, Foam::scalar) const': triSurface/surfaceFeatures/surfaceFeatures.C:871: error: conflicting declaration 'Foam::octreeDataPoint samples' triSurface/surfaceFeatures/surfaceFeatures.C:870: error: 'samples' has a previous declaration as 'Foam::treeBoundBox samples' |
|
June 3, 2009, 07:32 |
|
#2 |
New Member
Verdi March
Join Date: Jun 2009
Posts: 2
Rep Power: 0 |
I found the problem.
Basically, the compiler picks the wrong treeBoundBox's constructor. The triSurface/surfaceFeatures/surfaceFeatures.C calls a 1-parameter constructor treeBoundBox(UList<...>). However, due to some reason, gcc-4.4 resolves this to the inlined treeBoundBox(boundBox) -- also a 1-parameter constructor. My quick-n-dirty solution is to dynamic cast the PointField samples into its ancestor (UList). That is, from Code:
octree<octreeDataPoint> ppTree ( treeBoundBox(samples), ... ); Code:
octree<octreeDataPoint> ppTree ( treeBoundBox(dynamic_cast<const UList<point>&>(samples)), ... ); |
|
June 26, 2009, 19:04 |
OpenFOAM-1.5-dev on Fedora 11
|
#3 |
Senior Member
Dragos
Join Date: Mar 2009
Posts: 648
Rep Power: 20 |
Hello everybody,
I just want to say that the 'dirty work around' suggested by Verdi helped me to compile OpenFOAM-1.5-dev on a newly installed Fedora 11. Due to the fact that it comes with gcc 4.4.0 I ended up with the same problem, but of course with the same solution. One extra problem was that I had to add Code:
#include "stdint.h" I hope this is helpful, Dragos |
|
August 26, 2009, 07:59 |
|
#4 |
New Member
Join Date: Aug 2009
Posts: 4
Rep Power: 17 |
Hi, I was able to get OF-1.6 compiled on Ubuntu and gcc-4.4 using your solution. I was able to find out meshTools had some problem but your post really helped fixing the issue. Thanks .
|
|
September 4, 2009, 22:41 |
|
#5 |
Senior Member
Hua Zen
Join Date: Mar 2009
Posts: 138
Rep Power: 17 |
I have both problems mentioned above with OF 1.5.x on Fedora 11,gcc 4.4.1. I suggest the developers check those and commit it if it is necessary.
|
|
September 18, 2009, 16:45 |
OpenFOAM-1.6_gcc4.4.patch
|
#6 |
Member
Oliver Borm
Join Date: Mar 2009
Posts: 60
Rep Power: 17 |
On gentoo linux with gcc-4.4.1 you will need also to include
Code:
#include <stdio.h> You will find the complete patch at: http://sources.gentoo.org/viewcvs.py...ch?view=markup |
|
December 22, 2009, 16:21 |
|
#7 | ||
Senior Member
|
On Ubuntu 9.10 with OpenFOAM-1.5-dev svn 1562 I managed to compile using the system compile (4.4.x) after making two changes proposed above.
Namely, Quote:
and, in meshTools, replacing the two occurances of Quote:
|
|||
January 11, 2010, 06:24 |
|
#8 |
New Member
Join Date: Jan 2010
Posts: 28
Rep Power: 16 |
Hi guys and girls
I have just replied to this thread and the comments by wyldckat: http://www.cfd-online.com/Forums/ope...tml#post242123 He guides us here and I see that b_k has got openfoam 1.6 installed and working on Ubuntu..although, what version isn't mentioned. I am on Ubuntu Karmic! Can someone give some help with this ....PLEASE! i have also started this thread at the Ubuntu Forum explaining what I have done so far: http://ubuntuforums.org/showthread.p...60#post8645960 Thanks a bunch folks! bookie56 |
|
January 11, 2010, 07:21 |
|
#9 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Greetings bookie56,
Well, by what I remember you'll be needing posts number 2, 3 and 6. I used (K)Ubuntu 9.04 32 and 64 bit. Haven't tried in Ubuntu 9.10, but there is a thread (this one) that is giving some support on how to build OpenFOAM 1.6.x in Ubuntu 9.04 and 9.10 (32 ad 64bit). I would suggest that you follow that thread and use Mads script, because the other choice I see for you is taking a step back to Ubuntu 9.04 and use the pre-built binaries of OpenFOAM In case you still want to be with the recent Ubuntu and older OpenFOAM, and can't figure out how to implement post 2,3 and 6, than I suggest you follow the chapter 5 (here), only points 1 and 2, of the wiki page I posted a while back (for cross-compiling OpenFOAM in Linux for Windows). Than you should be able to follow the user manual. Those patches shouldn't disable the capability of building the Linux version of OpenFOAM. Best regards, Bruno |
|
January 11, 2010, 07:37 |
|
#10 |
New Member
Join Date: Jan 2010
Posts: 28
Rep Power: 16 |
Hi wyldckat
I really appreciate your prompt reply and I will have a look at your info and let you know how I get on a bit later.... Thanks again! bookie56 |
|
Tags |
solaris |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
!!! UDF - Compilation problem !!! | Everest | FLUENT | 1 | January 12, 2009 18:56 |
Can I use OpenFOAM to solve unsteady diffusion problem | yongshenglian | OpenFOAM Running, Solving & CFD | 1 | September 17, 2008 13:03 |
[Commercial meshers] Problem importing mesh in openfoam from fluent | alessandr0 | OpenFOAM Meshing & Mesh Conversion | 3 | September 4, 2008 14:41 |
OpenFOAM 14 compilation problem | zaferleylek | OpenFOAM Installation | 4 | May 8, 2007 15:52 |
OpenFOAM installation problem on Linux 32bit | kumar | OpenFOAM Installation | 0 | April 27, 2007 06:41 |