|
[Sponsors] |
June 22, 2008, 14:48 |
Hi all,
I tried to compile
|
#1 |
Member
Matthias Walter
Join Date: Mar 2009
Location: Rostock, Germany
Posts: 63
Rep Power: 17 |
Hi all,
I tried to compile the newest SVN OF-1.4.1-dev version with the gcc-4.3.0. After some changes in the code, it worked well. For all having the same problems, here are the errors, appeared during compilation and my fixes: 1. there are some error messages concerning "memset" , like "is not found" or "is not available" -> in this case you have to add <cstdlib> to the header of the file 2. there are some error messages concerning "strcmp, strlen ..." , like "is not found" or "is not available" -> in this case you have to add <cstring> to the header of the file 3. i got an error: Undefined reference to `yyFlexLexer::yywrap()' So, I used the fix from "Elisabet Mas de les Valls" and I just substituted the line: extern "C" int yywrap() with int yyFlexLexer::yywrap() in 5 files: 1. $WM_PROJECT_DIR/src/triSurface/triSurface/interfaces/STL/readSTLASCII.L 2. $WM_PROJECT_DIR/applications/utilities/mesh/conversion/gambitToFoam/gambitToFoam .L 3. $WM_PROJECT_DIR/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent MeshToFoam.L 4. $WM_PROJECT_DIR/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMe shToFoam.L 5. $WM_PROJECT_DIR/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L 4. furthermore: error:»virtual const Foam::HashPtrTable<foam::sutherlandtransport<foam: :speciethermo<foam::janaftherm o<foam::perfectgas> > >, Foam::word, Foam::string::hash>& Foam::chemistryReader::specieThermo() const« error: changes meaning of »specieThermo« from »class Foam::specieThermo<foam::janafthermo<foam::perfect gas> >« ->there are two possibilities to fix the error: first, you can use the -fpermissive flag (but is only a temporary workaround) second, you add a qualified namespace in the file OpenFOAM/OpenFOAM-1.4.1-dev/src/thermophysicalModels/combustion/chemistryReaders /chemistryReader/chemistryReader.H: line 120 public: // Public data types typedef Foam::sutherlandTransport<foam::speciethermo<foam: :janafthermo<foam::perfectgas> > > reactionThermo; typedef Reaction<reactionthermo> reaction; __________________________________________________ _____ More information about the changes in gcc-4.3.0 you can find here: http://gcc.gnu.org/gcc-4.3/porting_to.html I hope this info is useful for all having same or similar problems. Maybe there are better fixes as I mentioned above, but as a first workaround they are working. mfg Matthias |
|
June 23, 2008, 03:56 |
Matthias,
You might conside
|
#2 |
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,715
Rep Power: 40 |
Matthias,
You might consider trying gcc-4.3.1 as well. There are a few useful bug-fixes in it. |
|
June 23, 2008, 10:43 |
Hello Mark,
I upgraded my s
|
#3 |
Member
Matthias Walter
Join Date: Mar 2009
Location: Rostock, Germany
Posts: 63
Rep Power: 17 |
Hello Mark,
I upgraded my system from Fedora 7 to Fedora 9. At the moment there is only gcc-4.3.0-8 RedHat available for Fedora 9 in the release update repository. If you want to use gcc-4.3.1, you must take other binaries or you have to compile the gcc4.3.1 from source. If you have positive experience with gcc-4.3.1 then you can post it, maybe. |
|
June 23, 2008, 10:54 |
Hello All,
I would be VERY
|
#4 |
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33 |
Hello All,
I would be VERY interested in including gcc-4.3.x porting changes into SVN - can someone give me the details or simply poste them here? Hrv
__________________
Hrvoje Jasak Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk |
|
June 23, 2008, 11:30 |
Servus Matthias,
I've been
|
#5 |
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,715
Rep Power: 40 |
Servus Matthias,
I've been fiddling about with a self-compiled gcc-4.3.1 and found that the compiler has gotten a fair bit smarter than the 4.2.X series in terms of catching "impossible to reach" bits of code and complaining about returning const primitives and other generally good pickiness that helps improve code quality. In 4.3.0 there were many spurious warnings about out of bounds on enum. Sorry that I cannot remember the exact error message, but these got fixed in 4.3.1 I still haven't done any benchmarks to see if the generated code is any faster than 4.2.X and I don't enough time for a while either, so someone else will need to do it. As to including the gcc-4.3.X porting changes into the SVN: I would personally rather wait a bit for the 1.5 version to be released - on the assumption that the OpenCFD guys will have already addressed the issue anyhow. /mark |
|
June 23, 2008, 14:39 |
Hello Hrv,
I guess you did
|
#6 |
Senior Member
Philippose Rajan
Join Date: Mar 2009
Location: Germany
Posts: 552
Rep Power: 25 |
Hello Hrv,
I guess you did not get the mail I sent to your ID about a month or so ago.... the mail contained a fairly detailed list of points with names of files and locations where changes have to be made, in order to obtain a successful compile with gcc-4.3.0 I have been running the SVN version of OpenFOAM-1.4.1-dev compiled with gcc-4.3.0 without any problems for quite a while now :-)! Basically, I thought I would hold back from posting on the forum till I got a reply from Hrv... since I was not sure if I had made all the corrections the "legally correct way" .... well.... :-)! And so it stayed! Have a nice day... :-)! Philippose |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
New AMG Solvers in OF141dev SVN | philippose | OpenFOAM Running, Solving & CFD | 8 | July 27, 2009 15:52 |
OF141dev undefined reference to METIS symbols on SUSE Enterprise | matthias | OpenFOAM Installation | 5 | August 29, 2008 11:55 |
OF141dev installation Woes | chegdan | OpenFOAM Installation | 13 | July 18, 2008 18:16 |
Installation of OF141dev on redhatEL 64bits problems with Allmake | young | OpenFOAM Installation | 3 | May 1, 2008 01:42 |
Compiling UDF | Rahul | FLUENT | 3 | March 23, 2003 06:12 |