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

OpenFOAM v2.0.0 installation error on Redhat 5

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 13, 2011, 21:27
Default OpenFOAM v2.0.0 installation error on Redhat 5
  #1
New Member
 
firelet
Join Date: Sep 2010
Posts: 3
Rep Power: 15
firelet is on a distinguished road
Today I install OpenFOAM v2.0.0 on Redhat Enterprise 5.0, there are some error as follows,

triSurface/interfaces/STL/readSTLASCII.L:59:25: error: no 'int yyFlexLexer::yywrap()' member function declared in class 'yyFlexLexer'
Make/linux64GccDPOpt/readSTLASCII.C: In member function 'int STLLexer::lex()':
Make/linux64GccDPOpt/readSTLASCII.C:5526:10: error: 'yy_buffer_stack' was not declared in this scope
Make/linux64GccDPOpt/readSTLASCII.C:5526:10: error: 'yy_buffer_stack_top' was not declared in this scope
Make/linux64GccDPOpt/readSTLASCII.C:5527:27: error: 'yyensure_buffer_stack' was not declared in this scope
Make/linux64GccDPOpt/readSTLASCII.C:5549:57: warning: use of old-style cast
Make/linux64GccDPOpt/readSTLASCII.C:5549:57: warning: use of old-style cast
Make/linux64GccDPOpt/readSTLASCII.C:5565:3: warning: use of old-style cast
Make/linux64GccDPOpt/readSTLASCII.C:5779:62: warning: use of old-style cast
Make/linux64GccDPOpt/readSTLASCII.C:5785:8: error: 'yy_buffer_stack' was not declared in this scope

How to solve this problem?
Thank you
firelet is offline   Reply With Quote

Old   July 14, 2011, 02:30
Default
  #2
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,685
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
Quote:
Originally Posted by firelet View Post
Today I install OpenFOAM v2.0.0 on Redhat Enterprise 5.0, there are some error as follows,

triSurface/interfaces/STL/readSTLASCII.L:59:25: error: no 'int yyFlexLexer::yywrap()' member function declared in class 'yyFlexLexer'
Make/linux64GccDPOpt/readSTLASCII.C: In member function 'int STLLexer::lex()':
Make/linux64GccDPOpt/readSTLASCII.C:5526:10: error: 'yy_buffer_stack' was not declared in this scope
Make/linux64GccDPOpt/readSTLASCII.C:5526:10: error: 'yy_buffer_stack_top' was not declared in this scope
Make/linux64GccDPOpt/readSTLASCII.C:5527:27: error: 'yyensure_buffer_stack' was not declared in this scope
Make/linux64GccDPOpt/readSTLASCII.C:5549:57: warning: use of old-style cast
Make/linux64GccDPOpt/readSTLASCII.C:5549:57: warning: use of old-style cast
Make/linux64GccDPOpt/readSTLASCII.C:5565:3: warning: use of old-style cast
Make/linux64GccDPOpt/readSTLASCII.C:5779:62: warning: use of old-style cast
Make/linux64GccDPOpt/readSTLASCII.C:5785:8: error: 'yy_buffer_stack' was not declared in this scope

How to solve this problem?
Thank you
You may need to upgrade flex on your machine and see if that helps. I remember some RH5 systems having flex 2.5.4.a installed. But this version was released in 1997! Check with "flex --version" or "rpm -qi flex" to see what you have. Also see http://flex.sourceforge.net/ for more information.
olesen is offline   Reply With Quote

Old   July 14, 2011, 03:01
Exclamation
  #3
New Member
 
firelet
Join Date: Sep 2010
Posts: 3
Rep Power: 15
firelet is on a distinguished road
Quote:
Originally Posted by olesen View Post
You may need to upgrade flex on your machine and see if that helps. I remember some RH5 systems having flex 2.5.4.a installed. But this version was released in 1997! Check with "flex --version" or "rpm -qi flex" to see what you have. Also see http://flex.sourceforge.net/ for more information.

Thank you for your reply.

I have installed the latest flex version 2.5.35, but the problem also exist.
firelet is offline   Reply With Quote

Old   July 14, 2011, 03:24
Default
  #4
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,685
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
Quote:
Originally Posted by firelet View Post
Thank you for your reply.

I have installed the latest flex version 2.5.35, but the problem also exist.
OK, you have the newest version, but did you also either retouch the *.L file (to force a remake), or wclean the directory first. Otherwise you'll still be using the C++ code generated with the older flex.
olesen is offline   Reply With Quote

Old   July 15, 2011, 07:58
Default
  #5
New Member
 
firelet
Join Date: Sep 2010
Posts: 3
Rep Power: 15
firelet is on a distinguished road
Quote:
Originally Posted by olesen View Post
OK, you have the newest version, but did you also either retouch the *.L file (to force a remake), or wclean the directory first. Otherwise you'll still be using the C++ code generated with the older flex.
Thank you~~~

The problem is solved. I figured out the resson. Gcc can't find the include directory of flex. To add the flex include path to the file "$HOME/.bashrc", such as:

export CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:$FLEX_INS/include

$FLEX_INS is the directory where flex install

Regards
firelet
firelet is offline   Reply With Quote

Old   July 21, 2011, 07:42
Default
  #6
New Member
 
pengfei han
Join Date: Jul 2011
Location: China
Posts: 6
Blog Entries: 3
Rep Power: 14
pfhan is on a distinguished road
Quote:
Originally Posted by firelet View Post
Thank you~~~

The problem is solved. I figured out the resson. Gcc can't find the include directory of flex. To add the flex include path to the file "$HOME/.bashrc", such as:

export CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:$FLEX_INS/include

$FLEX_INS is the directory where flex install

Regards
firelet
Thank you and dear Olesen! My problem is solved, too.
pfhan is offline   Reply With Quote

Old   July 30, 2011, 06:51
Default Linker error in RHEL 5
  #7
New Member
 
Join Date: Jul 2011
Location: Berlin, Germany
Posts: 8
Rep Power: 14
skynet4ever is on a distinguished road
Hi all,

I also have problems installing OF2.0.0 on RHEL 5. I get the famous linker error and some other stuff. I think it maybe is an openmp problem but I tried so much different settings already - I am out of ideas now.

I have done already:
Downloaded+extracted OF+ThirdPraty 2.0.0 and followed the instructions.
changed gcc/g++ to gcc44/g++44 in etc/config/settings.sh
updated flex to 2.5.35

I am using the system compiler because when I am trying to use the Thirdparty compiler (as suggested in other posts), I get the following warning and I don't know what to to about it:
Code:
...@bapf028dl ~/code/OpenFOAM-2.0.0 >source ~/.bashrc

Warning in /user/mars/.../code/OpenFOAM-2.0.0/etc/config/settings.sh:
    Cannot find /user/mars/.../code/ThirdParty-2.0.0/platforms/linux64/gcc-4.4.3 installation.
    Please install this compiler version or if you wish to use the system compiler,
    change the 'foamCompiler' setting to 'system'
The native compiler is 4.1.2 and the gcc44 is 4.4.4

I appended the make.log and my current bashrc+settings.sh and am now hoping for your ideas.
Thank you very much in advance.

Max
Attached Files
File Type: gz make.log_settings.tar.gz (25.3 KB, 4 views)
skynet4ever is offline   Reply With Quote

Old   July 31, 2011, 03:04
Default
  #8
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
There is centfoam for RHEL 5.x and CentOS: http://sourceforge.net/apps/mediawik...itle=Main_Page
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   July 31, 2011, 04:16
Default
  #9
New Member
 
Join Date: Jul 2011
Location: Berlin, Germany
Posts: 8
Rep Power: 14
skynet4ever is on a distinguished road
Quote:
Originally Posted by alberto View Post
There is centfoam for RHEL 5.x and CentOS: http://sourceforge.net/apps/mediawik...itle=Main_Page
Yes I heard about it - but somehow I thought they were stuck at OF1.7 which seems not to be true anymore. Anyway as this installation needs root permissions and my admin is not very cooperative I prefer to try it on my own first. Besides, I found a lot of posts where people managed to compile it on this system - so it seams possible.

Thanks for your reply.
Max
skynet4ever is offline   Reply With Quote

Old   July 31, 2011, 04:39
Default
  #10
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings to all!

Max, here are the questions I've got for you:
  • Where is your gcc 4.4.4 located?
    If it's located at the ThirdParty folder, then edit settings.sh once again and jump to this section of code:
    Code:
    case "${foamCompiler}" in
    OpenFOAM | ThirdParty)
        case "$WM_COMPILER" in
        Gcc | Gcc++0x)
            gcc_version=gcc-4.4.3
            gmp_version=gmp-5.0.1
            mpfr_version=mpfr-2.4.2
            ;;
    In bold is what you need to change, i.e. the version number. If you scroll down a bit further, you'll find this code:
    Code:
            gccDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$gcc_version
            gmpDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$gmp_version
            mpfrDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$mpfr_version
            mpcDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$mpc_version
    This is where settings.sh expects that gcc and company will be at.

    On the other hand, if gcc44 is already provided outside of OpenFOAM and it's visible simply by running gcc44, then go to bashrc and switch foamCompiler back to system.
  • As for flex, do you already have the latest one, namely flex 2.5.35? Is it already visible from the command line when you run:
    Code:
    flex -V
Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   July 31, 2011, 06:54
Default
  #11
New Member
 
Join Date: Jul 2011
Location: Berlin, Germany
Posts: 8
Rep Power: 14
skynet4ever is on a distinguished road
Hi Bruno,
yes flex,gcc44 are visible from everywhere in the comandline. (Can there be a problem because I am using bash, which is not my loginshell?)
Code:
 
...@bapf028dl ~/code/OpenFOAM-2.0.0 >gcc44 --version
gcc44 (GCC) 4.4.4 20100726 (Red Hat 4.4.4-13)
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

...@bapf028dl ~/code/OpenFOAM-2.0.0 >flex --version
flex 2.5.35
...@bapf028dl ~/code/OpenFOAM-2.0.0 >which gcc44
/usr/bin/gcc44
what baffles me is this error
Code:
blockMesh/blockMeshMerge.C:120: error: call of overloaded 'boundBox(Foam::pointField)' is ambiguous
and the fact that i still see so many calls to g++ instead of g++44. can it be that setting the compiler in settings.sh is not enough? And I also have to set it somewhere else. I already tried to work with alias (from g++ to g++44) but that didn't help either. In the configuration phase wmake shows the use of gcc44 alright...

Thank you for your help.
Max
skynet4ever is offline   Reply With Quote

Old   July 31, 2011, 07:34
Default
  #12
New Member
 
pengfei han
Join Date: Jul 2011
Location: China
Posts: 6
Blog Entries: 3
Rep Power: 14
pfhan is on a distinguished road
Quote:
Originally Posted by skynet4ever View Post
Yes I heard about it - but somehow I thought they were stuck at OF1.7 which seems not to be true anymore. Anyway as this installation needs root permissions and my admin is not very cooperative I prefer to try it on my own first. Besides, I found a lot of posts where people managed to compile it on this system - so it seams possible.

Thanks for your reply.
Max
Here is my installation procedure, hoping that it would be useful.
I am a newbie on linux OS and i don't know what to do, so I added all the
software lib path to PATH just in case for problems.
Noting --prefix won't work on all the gcc4.4.6files,so if you don't have root permissions, use -with-local-prefix to specify your own path.
Attached Files
File Type: txt install.txt (2.1 KB, 26 views)
pfhan is offline   Reply With Quote

Reply


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
OpenFOAM 1.7 installation on Redhat linux maxims OpenFOAM Installation 2 November 30, 2012 04:29
OpenFoam Installation in Redhat Enterprise linux 5 sahm OpenFOAM Installation 78 November 1, 2011 15:22
Problem installing OpenFOAM 1.5 installation on RHEL 4. vwsj84 OpenFOAM Installation 4 April 23, 2009 04:48
64bitrhel5 OF installation instructions mirko OpenFOAM Installation 2 August 12, 2008 18:07
Adventure of fisrst openfoam installation on Ubuntu 710 jussi OpenFOAM Installation 0 April 24, 2008 14:25


All times are GMT -4. The time now is 02:10.