CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Installation

Gentoo Compilation woes on AMD64 with fluentMeshToFoamL

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 4, 2007, 19:38
Default Alright I have slogged through
  #1
connclark
Guest
 
Posts: n/a
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
  Reply With Quote

Old   June 14, 2007, 12:28
Default I found the problem. My versio
  #2
connclark
Guest
 
Posts: n/a
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.
  Reply With Quote

Old   June 14, 2007, 16:15
Default Thanks for reporting what solv
  #3
Senior Member
 
Srinath Madhavan (a.k.a pUl|)
Join Date: Mar 2009
Location: Edmonton, AB, Canada
Posts: 703
Rep Power: 21
msrinath80 is on a distinguished road
Thanks for reporting what solved your problem!
msrinath80 is offline   Reply With Quote

Old   February 27, 2008, 01:52
Default I put a space between "]]", bu
  #4
Senior Member
 
lakeat's Avatar
 
Daniel WEI (老魏)
Join Date: Mar 2009
Location: Beijing, China
Posts: 689
Blog Entries: 9
Rep Power: 21
lakeat is on a distinguished road
Send a message via Skype™ to lakeat
I put a space between "]]", but the results is still the same

+ 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.
__________________
~
Daniel WEI
-------------
Boeing Research & Technology - China
Beijing, China
Email
lakeat is offline   Reply With Quote

Old   February 27, 2008, 06:38
Default I suggest installing the sunri
  #5
New Member
 
Dewald Pieterse
Join Date: Mar 2009
Posts: 2
Rep Power: 0
dewaldpietersegmailcom is on a distinguished road
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
dewaldpietersegmailcom is offline   Reply With Quote

Old   February 28, 2008, 02:08
Default Thank you, Dewald. I am deter
  #6
Senior Member
 
lakeat's Avatar
 
Daniel WEI (老魏)
Join Date: Mar 2009
Location: Beijing, China
Posts: 689
Blog Entries: 9
Rep Power: 21
lakeat is on a distinguished road
Send a message via Skype™ to lakeat
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
__________________
~
Daniel WEI
-------------
Boeing Research & Technology - China
Beijing, China
Email
lakeat is offline   Reply With Quote

Old   February 28, 2008, 02:31
Default Honestly I don't know, the ans
  #7
New Member
 
Dewald Pieterse
Join Date: Mar 2009
Posts: 2
Rep Power: 0
dewaldpietersegmailcom is on a distinguished road
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
dewaldpietersegmailcom is offline   Reply With Quote

Old   February 28, 2008, 11:21
Default Daniel, Warnings don't pre
  #8
Senior Member
 
Michael Jaworski
Join Date: Mar 2009
Location: Champaign, IL, USA
Posts: 126
Rep Power: 17
mike_jaworski is on a distinguished road
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.
mike_jaworski is offline   Reply With Quote

Old   February 29, 2008, 14:18
Default Yup, the rest of the compilati
  #9
Senior Member
 
lakeat's Avatar
 
Daniel WEI (老魏)
Join Date: Mar 2009
Location: Beijing, China
Posts: 689
Blog Entries: 9
Rep Power: 21
lakeat is on a distinguished road
Send a message via Skype™ to lakeat
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
__________________
~
Daniel WEI
-------------
Boeing Research & Technology - China
Beijing, China
Email
lakeat is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Gentoo ebuild for OpenFOAM141 deepblue17 OpenFOAM Installation 3 July 29, 2010 09:27
OF141dev installation Woes chegdan OpenFOAM Installation 13 July 18, 2008 17:16
IcoFoam parallel woes msrinath80 OpenFOAM Running, Solving & CFD 9 July 22, 2007 02:58
SimpleFoam woes msrinath80 OpenFOAM Bugs 2 April 13, 2007 10:15
Sshd amp libelfso0 on gentoo box alfreed OpenFOAM Installation 2 June 15, 2006 10:05


All times are GMT -4. The time now is 14:13.