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

[OpenFOAM.org] OpenFoam2.2: recipe for target failed due to FlexLexer

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By wyldckat
  • 1 Post By kera

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 31, 2017, 07:05
Default OpenFoam2.2: recipe for target failed due to FlexLexer
  #1
Member
 
Ali Noaman Ibrahim
Join Date: Sep 2015
Location: US_Chicago
Posts: 97
Rep Power: 10
alinuman15 is on a distinguished road
Hi All:
Due to interface smearing in micro-Tube spontaneous imbibition problems in the recent OpenFOAM versions versus good simulation with OpenFoam2.2 and foam-extend3, I preferred to install OpenFoam2.2 in my home directory as addition to openfoam2.4, extend-4, 4.x and five. However, I got the ./Allwmake bug shown in the inserted file.
Any suggestion?
Thanks

https://www.cfd-online.com/Forums/ne...anageattach&p=
Attached Files
File Type: gz log.make.tar.gz (105.0 KB, 5 views)
alinuman15 is offline   Reply With Quote

Old   November 1, 2017, 15:37
Default
  #2
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
Quick note: Not knowing which Linux Distribution and version you are using, limits our ability to fully diagnose the issue.

Quick answer: The critical error was this:
Code:
/home/ali/OpenFOAM/OpenFOAM-2.2.2/platforms/linux64GccDPOpt/lib/libtriSurface.so: undefined reference to `yyFlexLexer::yywrap()'
Solution is provided for example at http://openfoamwiki.net/index.php/In...u#Ubuntu_16.04 - namely:
Quote:
11. Now, before we can build OpenFOAM, we need to do a few fixes:
Code:
#Go into OpenFOAM's main source folder
cd $WM_PROJECT_DIR

#Change how the flex version is checked
find src applications -name "*.L" -type f | xargs sed -i -e 's=\(YY\_FLEX\_SUBMINOR\_VERSION\)=YY_FLEX_MINOR_VERSION < 6 \&\& \1='
Run those commands and then run Allwmake once again.



Side note: Many thanks to roenby for reminding me of this in OpenFOAM 2.3.0 ubuntu 16.04 - post #5
alinuman15 likes this.
__________________
wyldckat is offline   Reply With Quote

Old   November 1, 2017, 15:48
Default
  #3
Member
 
Ali Noaman Ibrahim
Join Date: Sep 2015
Location: US_Chicago
Posts: 97
Rep Power: 10
alinuman15 is on a distinguished road
Thanks, genius. It worked!
alinuman15 is offline   Reply With Quote

Old   November 1, 2017, 19:28
Smile
  #4
Member
 
Ali Noaman Ibrahim
Join Date: Sep 2015
Location: US_Chicago
Posts: 97
Rep Power: 10
alinuman15 is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Quick note: Not knowing which Linux Distribution and version you are using, limits our ability to fully diagnose the issue.

Quick answer: The critical error was this:
Code:
/home/ali/OpenFOAM/OpenFOAM-2.2.2/platforms/linux64GccDPOpt/lib/libtriSurface.so: undefined reference to `yyFlexLexer::yywrap()'
Solution is provided for example at http://openfoamwiki.net/index.php/In...u#Ubuntu_16.04 - namely:

Run those commands and then run Allwmake once again.



Side note: Many thanks to roenby for reminding me of this in OpenFOAM 2.3.0 ubuntu 16.04 - post #5

Hi Bruno :-
I would like to mention that, although that is a successful way of installing OpenFOAM, the run file will not be created and will not be accessed from the terminal by "run"!
alinuman15 is offline   Reply With Quote

Old   November 2, 2017, 03:32
Default
  #5
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
Quote:
Originally Posted by alinuman15 View Post
the run file will not be created and will not be accessed from the terminal by "run"!
Quick answer: Not enough information to diagnose the problem. Please write the exact steps you've taken and what exact error messages you have gotten.
wyldckat is offline   Reply With Quote

Old   November 2, 2017, 10:33
Default
  #6
Member
 
Ali Noaman Ibrahim
Join Date: Sep 2015
Location: US_Chicago
Posts: 97
Rep Power: 10
alinuman15 is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Quick answer: Not enough information to diagnose the problem. Please write the exact steps you've taken and what exact error messages you have gotten.
Thanks Bruno for getting back quickly!
I have Ubuntu 16.04 and installed OpenFoam2.2 beginning from the article 2.7 of the link https://openfoamwiki.net/index.php/I...u#Ubuntu_15.10

After following your recommendation, I did:-

#Go into OpenFOAM's main source folder
cd $WM_PROJECT_DIR

#Change how the flex version is checked
find src applications -name "*.L" -type f | xargs sed -i -e 's=\(YY\_FLEX\_SUBMINOR\_VERSION\)=YY_FLEX_MINOR_V ERSION < 6 \&\& \1='


Then continued from step 9 of the aforementioned link. So, everything went fine until the successful installation to the last step. However, when I hit run in the terminal, it will not run due to not having an ali-2.2.0\run folder inside my home directory and instead, I have the folder OpenFOAM-2.2.2 inside my home directory as shown in the inserted picture.
Hope that makes sense.
Attached Images
File Type: jpg Screenshot_homeDirectory.jpg (52.2 KB, 3 views)
alinuman15 is offline   Reply With Quote

Old   November 2, 2017, 10:57
Default
  #7
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
Quick answer: https://openfoamwiki.net/index.php/T...he_first_steps

Quote:
For OpenFOAM 3.0 and older (including OpenFOAM+ and foam-extend):
Code:
echo $WM_PROJECT_DIR/doc/Guides-a4/UserGuide.pdf
Read the start of chapter 2 and follow the commands given there.

If it doesn't work, run:
Code:
echo $FOAM_RUN
echo $WM_PROJECT_DIR
and tell us what these two commands gave you.
wyldckat is offline   Reply With Quote

Old   November 2, 2017, 16:51
Default
  #8
Member
 
Ali Noaman Ibrahim
Join Date: Sep 2015
Location: US_Chicago
Posts: 97
Rep Power: 10
alinuman15 is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Quick answer: https://openfoamwiki.net/index.php/T...he_first_steps

Read the start of chapter 2 and follow the commands given there.

If it doesn't work, run:
Code:
echo $FOAM_RUN
echo $WM_PROJECT_DIR
and tell us what these two commands gave you.
Hi Bruno:-
I run your last two lines and got the following:-
ali@ali-HP-ENVY-TS-15-Notebook-PC:~$ echo $FOAM_RUN
/home/ali/OpenFOAM/ali-2.2.2/run
ali@ali-HP-ENVY-TS-15-Notebook-PC:~$ echo $WM_PROJECT_DIR
/home/ali/OpenFOAM/OpenFOAM-2.2.2
ali@ali-HP-ENVY-TS-15-Notebook-PC:~$ run
bash: cd: /home/ali/OpenFOAM/ali-2.2.2/run: No such file or directory
ali@ali-HP-ENVY-TS-15-Notebook-PC:~$
alinuman15 is offline   Reply With Quote

Old   November 3, 2017, 04:20
Default
  #9
Member
 
Ricky
Join Date: Jul 2014
Location: Germany
Posts: 78
Rep Power: 11
kera is on a distinguished road
Quote:
Originally Posted by alinuman15 View Post
Hi Bruno:-
I run your last two lines and got the following:-
ali@ali-HP-ENVY-TS-15-Notebook-PC:~$ echo $FOAM_RUN
/home/ali/OpenFOAM/ali-2.2.2/run
ali@ali-HP-ENVY-TS-15-Notebook-PC:~$ echo $WM_PROJECT_DIR
/home/ali/OpenFOAM/OpenFOAM-2.2.2
ali@ali-HP-ENVY-TS-15-Notebook-PC:~$ run
bash: cd: /home/ali/OpenFOAM/ali-2.2.2/run: No such file or directory
ali@ali-HP-ENVY-TS-15-Notebook-PC:~$

Hallo,

Did you create run directory using command?:

Code:
mkdir -p $FOAM_RUN
then "run" command will work just fine!

Regards,
Ricky
wyldckat likes this.
__________________
If it is easy, then something is fishy!
kera is offline   Reply With Quote

Old   November 3, 2017, 23:10
Default
  #10
Member
 
Ali Noaman Ibrahim
Join Date: Sep 2015
Location: US_Chicago
Posts: 97
Rep Power: 10
alinuman15 is on a distinguished road
Quote:
Originally Posted by kera View Post
Hallo,

Did you create run directory using command?:

Code:
mkdir -p $FOAM_RUN
then "run" command will work just fine!

Regards,
Ricky
Thank Ricky!
It worked right away.
alinuman15 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
Custom Thermophysical Properties wsmith02 OpenFOAM 4 June 1, 2023 14:30
[swak4Foam] funkyDoCalc with OF2.3 massflow NiFl OpenFOAM Community Contributions 14 November 25, 2020 03:30
[swak4Foam] Problem installing swak_2.x for OpenFoam-2.4.0 towanda OpenFOAM Community Contributions 6 September 5, 2015 21:03
[OpenFOAM] Paraview compilation failed due to not available files Tobi ParaView 2 July 5, 2014 15:39
grid check failed due to the merged zones biksham FLUENT 0 February 20, 2008 22:31


All times are GMT -4. The time now is 15:59.