|
[Sponsors] |
June 24, 2012, 12:45 |
[Solved] Compiling OF with clang
|
#1 |
New Member
Andrew Lowe
Join Date: Mar 2010
Location: Perth, Australia
Posts: 8
Rep Power: 16 |
Hi all,
I have both OpenFOAM and clang on my linux box so I decided to see if I could compile OF. Lo & behold, there is an option in the build config file for clang, so I set it and kicked off the compile. Has anyone managed to get the build process to fully compile OF? I get the build failing after about an hour, in solidEquilibriumDisplacementFoam, and also get lots and lots of warnings, along the lines of: Code:
/home/agl/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude/GeometricBoundaryField.C:553:34: warning: equality comparison result unused [-Wunused-comparison] this->operator[](patchI) == t; ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~ /home/agl/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude/GeometricField.C:1180:21: note: in instantiation of member function 'Foam::GeometricField<Foam::Vector<double>, fvPatchField, Foam::volMesh>::GeometricBoundaryField::operator==' requested here boundaryField() == dt.value(); ^ ./kineticEnergyLimiter.H:17:15: note: in instantiation of member function 'Foam::GeometricField<Foam::Vector<double>, fvPatchField, Foam::volMesh>::operator==' requested here Dcorr == dimensionedVector("0", Dcorr.dimensions(), vector::zero); ^ /home/agl/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude/GeometricBoundaryField.C:553:34: note: use '=' to turn this equality comparison into an assignment this->operator[](patchI) == t; ^~ = Any thoughts greatly appreciated, Andrew Last edited by BlueyTheDog; June 24, 2012 at 14:53. Reason: It's solved |
|
June 24, 2012, 14:32 |
|
#2 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128 |
Greetings Andrew,
This was asked/reported some time ago: http://www.openfoam.org/mantisbt/view.php?id=510 Best regards, Bruno
__________________
|
|
June 24, 2012, 14:52 |
|
#3 |
New Member
Andrew Lowe
Join Date: Mar 2010
Location: Perth, Australia
Posts: 8
Rep Power: 16 |
Bruno,
Thanks for that, didn't even think to look in the bugs db. Had a search in the forum and nothing came up hence the post. I do agree with the comment in the bug about the error reporting in clang - it is spectacular in comparison to gcc/VC/etc. Even if clang is slower, and I have a feeling by the end of the year it will be as fast as gcc, it's worth keeping for the error reporting alone. My unscientific view at the moment is that it also compiles code much quicker than gcc. Andrew |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
compiling icoStructFoam error using OF1.7 | mhassani | OpenFOAM Installation | 7 | June 11, 2012 09:22 |
Linux vs PC Compiling | Rhyno466 | Fluent UDF and Scheme Programming | 10 | May 11, 2012 17:01 |
Help with KIVA4 source code compiling | geothokar | Main CFD Forum | 0 | September 3, 2010 05:40 |
error msg when compiling user fortran | Ollimarc | CFX | 0 | March 13, 2008 18:16 |
Discussing UDF and C++ Compiling | Big Stone | FLUENT | 9 | April 12, 2004 15:07 |