Alright I have slogged through
Alright I have slogged through a lot of compile issue so far but there is one I can't figure out.
The build dies with the following make[3]: Entering directory `/home/conn/OpenFOAM/OpenFOAM-1.4/applications/utilities/mesh/conversion/fluentM eshToFoam' SOURCE=fluentMeshToFoam.L ; flex++ -f $SOURCE ; mv lex.yy.cc Make/linux64Gcc4DPOpt/fluentMeshToFoam.C ; g++ -m64 -Dlinux64 -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -march=opteron -O3 -DNoRepository -ftemplate-depth-40 -I/home/conn/OpenFOAM/OpenFOAM-1.4/src/meshTools/lnInclude -I/home/conn/OpenFOAM/OpenFOAM-1.4/src/dynamicMesh/lnInclude -IlnInclude -I. -I/home/conn/OpenFOAM/OpenFOAM-1.4/src/OpenFOAM/lnInclude -fPIC -c Make/linux64Gcc4DPOpt/fluentMeshToFoam.C -o Make/linux64Gcc4DPOpt/fluentMeshToFoam.o /usr/bin/m4:stdin:14248: Warning: excess arguments to builtin `m4_ifdef' ignored lex.yy.cc: In member function 'virtual int yyFlexLexer::yylex()': lex.yy.cc:12090: warning: use of old-style cast lex.yy.cc:12090: warning: use of old-style cast lex.yy.cc:12106: warning: use of old-style cast lex.yy.cc:12945: warning: use of old-style cast lex.yy.cc: In member function 'int yyFlexLexer::yy_get_next_buffer()': lex.yy.cc:13193: warning: use of old-style cast lex.yy.cc:13216: warning: use of old-style cast lex.yy.cc:13229: warning: use of old-style cast lex.yy.cc:13229: warning: use of old-style cast lex.yy.cc:13250: warning: use of old-style cast lex.yy.cc: In member function 'yy_state_type yyFlexLexer::yy_get_previous_state()': lex.yy.cc:13297: warning: use of old-style cast lex.yy.cc:13297: warning: use of old-style cast lex.yy.cc: In member function 'void yyFlexLexer::yyunput(int, char*)': lex.yy.cc:13357: warning: use of old-style cast lex.yy.cc:13358: warning: use of old-style cast lex.yy.cc:13366: warning: use of old-style cast lex.yy.cc: In member function 'int yyFlexLexer::yyinput()': lex.yy.cc:13433: warning: use of old-style cast lex.yy.cc: In member function 'virtual yy_buffer_state* yyFlexLexer::yy_create_buffer(std::istream*, int)': lex.yy.cc:13511: warning: use of old-style cast lex.yy.cc:13520: warning: use of old-style cast lex.yy.cc: In member function 'virtual void yyFlexLexer::yy_delete_buffer(yy_buffer_state*)': lex.yy.cc:13542: warning: use of old-style cast lex.yy.cc:13545: warning: use of old-style cast lex.yy.cc:13547: warning: use of old-style cast lex.yy.cc: In member function 'void yyFlexLexer::yyensure_buffer_stack()': lex.yy.cc:13674: warning: use of old-style cast lex.yy.cc:13692: warning: use of old-style cast lex.yy.cc: In member function 'void yyFlexLexer::yy_push_state(int)': lex.yy.cc:13710: warning: use of old-style cast lex.yy.cc:13713: warning: use of old-style cast lex.yy.cc:13713: warning: use of old-style cast lex.yy.cc: In function 'void* yyalloc(yy_size_t)': lex.yy.cc:13793: warning: use of old-style cast lex.yy.cc: In function 'void* yyrealloc(void*, yy_size_t)': lex.yy.cc:13805: warning: use of old-style cast lex.yy.cc:13805: warning: use of old-style cast lex.yy.cc: In function 'void yyfree(void*)': lex.yy.cc:13810: warning: use of old-style cast fluentMeshToFoam.L: In function 'Foam::label findFace(const Foam::primitiveMesh&, const Foam::face&)': fluentMeshToFoam.L:842: error: expected `]' before ';' token fluentMeshToFoam.L:842: error: expected `]' before ';' token fluentMeshToFoam.L: In function 'int main(int, char**)': fluentMeshToFoam.L:884: warning: unused variable 'writeSets' fluentMeshToFoam.L:885: warning: unused variable 'writeZones' fluentMeshToFoam.L:903: error: expected `}' at end of input make[3]: *** [Make/linux64Gcc4DPOpt/fluentMeshToFoam.o] Error 1 make[3]: Leaving directory `/home/conn/OpenFOAM/OpenFOAM-1.4/applications/utilities/mesh/conversion/fluentM eshToFoam' make[2]: *** [fluentMeshToFoam] Error 2 make[2]: Leaving directory `/home/conn/OpenFOAM/OpenFOAM-1.4/applications/utilities/mesh/conversion' make[1]: *** [conversion] Error 2 make[1]: Leaving directory `/home/conn/OpenFOAM/OpenFOAM-1.4/applications/utilities/mesh' make: *** [mesh] Error 2 + '[' 0 = 1 -a '' = doc ']' I'm compiling in 64 bit mode on Gentoo 2007.0 with gcc-4.1.2 , flex-2.5.33-r2 , and m4-1.4.8 if thats relevant |
I found the problem. My versio
I found the problem. My version of flex doesn't like "]]" in the .L files . I needed to change all occurrences to "] ]" (just add a space in between them) and it worked fine. I needed to do this for several .L files.
|
Thanks for reporting what solv
Thanks for reporting what solved your problem!
|
I put a space between "]]", bu
I put a space between "]]", but the results is still the samehttp://www.cfd-online.com/OpenFOAM_D...lipart/sad.gif
+ wmake libso triSurface Making dependency list for source file triSurface/interfaces/STL/readSTLASCII.L SOURCE=triSurface/interfaces/STL/readSTLASCII.L ; foamFlex++ -f $SOURCE ; mv lex.yy.cc Make/linuxGccDPDebug/readSTLASCII.C ; g++ -m32 -Dlinux -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O0 -fdefault-inline -ggdb3 -DFULLDEBUG -DNoRepository -ftemplate-depth-40 -IlnInclude -I. -I/home/daniel/OpenFOAM/OpenFOAM-1.4.1-dev/src/OpenFOAM/lnInclude -fPIC -pthread -c Make/linuxGccDPDebug/readSTLASCII.C -o Make/linuxGccDPDebug/readSTLASCII.o lex.yy.cc: In member function 'int STLLexer::lex()': lex.yy.cc:5608: warning: use of old-style cast lex.yy.cc:5608: warning: use of old-style cast lex.yy.cc:5624: warning: use of old-style cast lex.yy.cc:5838: warning: use of old-style cast triSurface/interfaces/STL/readSTLASCII.L:204: warning: unused variable 'endPtr' lex.yy.cc: In member function 'int yyFlexLexer::yy_get_next_buffer()': lex.yy.cc:6087: warning: use of old-style cast lex.yy.cc:6114: warning: use of old-style cast lex.yy.cc:6127: warning: use of old-style cast lex.yy.cc:6128: warning: use of old-style cast lex.yy.cc:6149: warning: use of old-style cast lex.yy.cc: In member function 'yy_state_type yyFlexLexer::yy_get_previous_state()': lex.yy.cc:6197: warning: use of old-style cast lex.yy.cc:6197: warning: use of old-style cast lex.yy.cc: In member function 'void yyFlexLexer::yyunput(int, char*)': lex.yy.cc:6258: warning: use of old-style cast lex.yy.cc:6259: warning: use of old-style cast lex.yy.cc:6267: warning: use of old-style cast lex.yy.cc: In member function 'int yyFlexLexer::yyinput()': lex.yy.cc:6336: warning: use of old-style cast lex.yy.cc: In member function 'virtual yy_buffer_state* yyFlexLexer::yy_create_buffer(std::istream*, int)': lex.yy.cc:6393: warning: use of old-style cast lex.yy.cc:6402: warning: use of old-style cast lex.yy.cc: In member function 'virtual void yyFlexLexer::yy_delete_buffer(yy_buffer_state*)': lex.yy.cc:6420: warning: use of old-style cast lex.yy.cc:6423: warning: use of old-style cast lex.yy.cc:6425: warning: use of old-style cast lex.yy.cc: In member function 'void yyFlexLexer::yy_push_state(int)': lex.yy.cc:6489: warning: use of old-style cast lex.yy.cc:6493: warning: use of old-style cast lex.yy.cc:6493: warning: use of old-style cast lex.yy.cc: In function 'void* yy_flex_alloc(yy_size_t)': lex.yy.cc:6595: warning: use of old-style cast lex.yy.cc: In function 'void* yy_flex_realloc(void*, yy_size_t)': lex.yy.cc:6613: warning: use of old-style cast lex.yy.cc:6613: warning: use of old-style cast make: *** [/home/daniel/OpenFOAM/OpenFOAM-1.4.1-dev/lib/linuxGccDPDebug/libtriSurface.so] Interrupt And it doesn't work. |
I suggest installing the sunri
I suggest installing the sunrise overlay using layman and then emerge openfoam, it works, just be mindful of the openfoam env settings, it overwrites your clags, so only source the openfoam bashrc when using openfoam.
Dewald |
Thank you, Dewald.
I am deter
Thank you, Dewald.
I am determined to give up ubuntu, and turn back to OpenSUSE. However, "warning: use of old-style cast" is still there. How to fix it? Daniel |
Honestly I don't know, the ans
Honestly I don't know, the answer for that will have to come from more knowledgeable in terms of the code, however what version of gcc do you have? With openfoam I would suggest usign the latest available in the ~amd64 tree. Gentoo "unstable" is a bit of a misnomer, my complete system runs ~amd64.
I am running gcc 4.2.3. Dewald |
Daniel,
Warnings don't pre
Daniel,
Warnings don't prevent your compilation from proceeding. It's just the Errors that you have to worry about. I believe this particular warning came about with the transition from gcc 4.1.x to 4.2.x. I guess they were cleaning up the code and some old methods were altered such that it produces a warning. I'm not sure on this, however. Likely a google search of the warning text will give you a more satisfactory answer. Regards, Mike J. |
Yup, the rest of the compilati
Yup, the rest of the compilation is well though the warning during compiling src/trisurface *.L files is quite annoying.
And I will move on. Here's another problem I found in running liftDrag. Has anyone tried it already? ----------------------------------- Description: ...... Time = 0 Reading U Reading p Inlet velocity: (20.8601 0 0) Floating point exception Solver/Application: liftDrag Testcase: tutorials/icoFoam/cylinder Platform: openSUSE 10.3 x86_64 + gcc-4.2.3 built following OpenFOAM-1.4.1-dev/buildInstructions Version: OpenFOAM-1.4.1-dev revision 496 Debug Information: Inlet velocity: (20.8601 0 0) Program received signal SIGFPE, Arithmetic exception. [Switching to Thread 0xb620d6d0 (LWP 7432)] 0x08065594 in VectorSpaceOps<3,>::opVS<foam::vector<double>, Foam::VectorSpace<foam::vector<double>, double, 3>, double, Foam::divideOp3<double,> > (vs=@0xbfa6e210, vs1=@0xbfa6e240, s=@0xbfa6e198, o={<no>}) at /home/daniel/OpenFOAM/OpenFOAM-1.4.1-dev/src/OpenFOAM/lnInclude/VectorSpaceM.H:3 4 34 vs.v_[I] = o(vs1.v_[I], s); (gdb) Quit (gdb) bt #0 0x08065594 in VectorSpaceOps<3,>::opVS<foam::vector<double>, Foam::VectorSpace<foam::vector<double>, double, 3>, double, Foam::divideOp3<double,> > (vs=@0xbfa6e210, vs1=@0xbfa6e240, s=@0xbfa6e198, o={<no>}) at /home/daniel/OpenFOAM/OpenFOAM-1.4.1-dev/src/OpenFOAM/lnInclude/VectorSpaceM.H:3 4 #1 0x0806560a in Foam::operator/<foam::vector<double>, double, 3> (vs=@0xbfa6e240, s=0) at /home/daniel/OpenFOAM/OpenFOAM-1.4.1-dev/src/OpenFOAM/lnInclude/VectorSpaceI.H:5 55 #2 0xb7f22352 in Foam::liftDrag::momentCoefficient (U=@0xbfa6eec4, p=@0xbfa6ee28, nu=@0xbfa6f014, patchName=@0x817d2f4, Uinf=@0xbfa6f0f0, Aref=@0xbfa6f0e8, Lref=@0xbfa6f0e0) at liftDrag/liftDrag.C:619 #3 0x0806232c in main (argc=3, argv=0xbfa6f3a4) at liftDrag.C:163 (gdb) So, what was going wrong here? Best Regards, Daniel |
All times are GMT -4. The time now is 15:14. |