CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   Building tutrial on SL6 (OF1.7.1) (http://www.cfd-online.com/Forums/openfoam/88785-building-tutrial-sl6-of1-7-1-a.html)

waku2005 May 25, 2011 23:51

Building tutrial on SL6 (OF1.7.1)
 
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

matthias May 26, 2011 03:00

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

linnemann May 26, 2011 03:04

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.

waku2005 May 26, 2011 04:42

Dear Linnemann

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

waku2005


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