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

Building tutrial on SL6 (OF1.7.1)

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

Reply
 
LinkBack Thread Tools Display Modes
Old   May 25, 2011, 22:51
Default Building tutrial on SL6 (OF1.7.1)
  #1
Member
 
Join Date: Nov 2009
Posts: 59
Rep Power: 7
waku2005 is on a distinguished road
Dear all,

Does anyone can build some solvers on Scientific Linux 6 ?
Of cource I know that SL6 is not tested for OF platfoam.

In my case, I've downloaded from centFOAM site and successfully run icoFoam of OF 1.7.1.
As a next step, go to the simpleWindFoam case and run 'wmake' in the solver folder.
Messages below were shown and failed to build.

Any comments are welcome and thanks in advance
waku2005

Quote:
[waku@ensisSL simpleWindFoam]$
[waku@ensisSL simpleWindFoam]$ wmake
SOURCE=simpleWindFoam.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-40 -I/home/waku/OpenFOAM/OpenFOAM-1.7.1/src/turbulenceModels -I/home/waku/OpenFOAM/OpenFOAM-1.7.1/src/turbulenceModels/incompressible/RAS/RASModel -I/home/waku/OpenFOAM/OpenFOAM-1.7.1/src/transportModels -I/home/waku/OpenFOAM/OpenFOAM-1.7.1/src/transportModels/incompressible/singlePhaseTransportModel -I/home/waku/OpenFOAM/OpenFOAM-1.7.1/src/finiteVolume/lnInclude -I/home/waku/OpenFOAM/OpenFOAM-1.7.1/src/meshTools/lnInclude -IlnInclude -I. -I/home/waku/OpenFOAM/OpenFOAM-1.7.1/src/OpenFOAM/lnInclude -I/home/waku/OpenFOAM/OpenFOAM-1.7.1/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/simpleWindFoam.o
In file included from /home/waku/OpenFOAM/ThirdParty-1.7.1/platforms/linux64/gcc-4.4.4/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.4.4/../../../../include/c++/4.4.4/bits/localefwd.h:42,
from /home/waku/OpenFOAM/ThirdParty-1.7.1/platforms/linux64/gcc-4.4.4/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.4.4/../../../../include/c++/4.4.4/string:45,
from /home/waku/OpenFOAM/OpenFOAM-1.7.1/src/OpenFOAM/lnInclude/string.H:51,
from /home/waku/OpenFOAM/OpenFOAM-1.7.1/src/OpenFOAM/lnInclude/word.H:43,
from /home/waku/OpenFOAM/OpenFOAM-1.7.1/src/OpenFOAM/lnInclude/int.H:39,
from /home/waku/OpenFOAM/OpenFOAM-1.7.1/src/OpenFOAM/lnInclude/label.H:58,
from /home/waku/OpenFOAM/OpenFOAM-1.7.1/src/OpenFOAM/lnInclude/labelList.H:35,
from /home/waku/OpenFOAM/OpenFOAM-1.7.1/src/OpenFOAM/lnInclude/Pstream.H:43,
from /home/waku/OpenFOAM/OpenFOAM-1.7.1/src/OpenFOAM/lnInclude/OPstream.H:35,
from /home/waku/OpenFOAM/OpenFOAM-1.7.1/src/OpenFOAM/lnInclude/parRun.H:35,
from /home/waku/OpenFOAM/OpenFOAM-1.7.1/src/finiteVolume/lnInclude/fvCFD.H:4,
from simpleWindFoam.C:33:
/home/waku/OpenFOAM/ThirdParty-1.7.1/platforms/linux64/gcc-4.4.4/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.4.4/../../../../include/c++/4.4.4/x86_64-unknown-linux-gnu/bits/c++locale.h:52: error: 'uselocale' was not declared in this scope
/home/waku/OpenFOAM/ThirdParty-1.7.1/platforms/linux64/gcc-4.4.4/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.4.4/../../../../include/c++/4.4.4/x86_64-unknown-linux-gnu/bits/c++locale.h:52: error: invalid type in declaration before ';' token
/home/waku/OpenFOAM/ThirdParty-1.7.1/platforms/linux64/gcc-4.4.4/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.4.4/../../../../include/c++/4.4.4/x86_64-unknown-linux-gnu/bits/c++locale.h: In function 'int std::__convert_from_v(__locale_struct* const&, char*, int, const char*, ...)':
/home/waku/OpenFOAM/ThirdParty-1.7.1/platforms/linux64/gcc-4.4.4/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.4.4/../../../../include/c++/4.4.4/x86_64-unknown-linux-gnu/bits/c++locale.h:72: error: '__gnu_cxx::__uselocale' cannot be used as a function
/home/waku/OpenFOAM/ThirdParty-1.7.1/platforms/linux64/gcc-4.4.4/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.4.4/../../../../include/c++/4.4.4/x86_64-unknown-linux-gnu/bits/c++locale.h:97: error: '__gnu_cxx::__uselocale' cannot be used as a function
/home/waku/OpenFOAM/OpenFOAM-1.7.1/src/finiteVolume/lnInclude/readSIMPLEControls.H: In function 'int main(int, char**)':
/home/waku/OpenFOAM/OpenFOAM-1.7.1/src/finiteVolume/lnInclude/readSIMPLEControls.H:6: warning: unused variable 'momentumPredictor'
/home/waku/OpenFOAM/OpenFOAM-1.7.1/src/finiteVolume/lnInclude/readSIMPLEControls.H:9: warning: unused variable 'transonic'
make: *** [Make/linux64GccDPOpt/simpleWindFoam.o] Error 1
waku2005 is offline   Reply With Quote

Old   May 26, 2011, 02:00
Default
  #2
Member
 
Matthias Walter
Join Date: Mar 2009
Location: Rostock, Germany
Posts: 59
Rep Power: 8
matthias is on a distinguished road
Hi,

I have got same error using CentOS5.5 some times ago. That's not a problem of SL6, it's a problem related to your gcc. It seems that the gcc included in Thirdparties was built using another version of c++locale.h from an older linux system.

Try to use the native gcc provided by your SL6 installation. That should do the job.

Good luck

Matthias

Last edited by matthias; May 26, 2011 at 04:42.
matthias is offline   Reply With Quote

Old   May 26, 2011, 02:04
Default
  #3
Senior Member
 
linnemann's Avatar
 
Niels Nielsen
Join Date: Mar 2009
Location: NJ - Denmark
Posts: 445
Rep Power: 14
linnemann will become famous soon enough
Hi

As Matthias states the centFOAM version of 1.7 was built on 5.x system which has an older glibc.

Similar discussion can be found here

http://comments.gmane.org/gmane.comp.gcc.help/35639

You need to compile OF yourself (using system gcc) until I get 1.7/1.6-ext built for 6.x systems and uploaded to the centFOAM page.
__________________
Linnemann

PS. I do not do personal support, so please post in the forums.
linnemann is offline   Reply With Quote

Old   May 26, 2011, 03:42
Default
  #4
Member
 
Join Date: Nov 2009
Posts: 59
Rep Power: 7
waku2005 is on a distinguished road
Dear Linnemann

Thank you very much for your information.
I'll try to use system compiler and rebuild it.

waku2005
waku2005 is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Solar Radiation in OpenFOAM plainstyle OpenFOAM Running, Solving & CFD 15 July 8, 2014 04:43
Error compiling OpenFOAM-1.6-ext Canesin OpenFOAM Installation 136 April 25, 2012 11:22
install OpenFoam 1.6 by building source: how? niudie OpenFOAM Installation 13 April 26, 2011 00:48
ParaView 3.8.0 problem on debian Unseen OpenFOAM Installation 4 August 16, 2010 10:26
Compilation error OF1.5-dev on Suse10.3 darenyang OpenFOAM Installation 0 April 29, 2009 04:55


All times are GMT -4. The time now is 19:51.