CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   [OpenFOAM.org] OpenFOAM 3.0.1 from source in Ubuntu 16.04 (https://www.cfd-online.com/Forums/openfoam-installation/173309-openfoam-3-0-1-source-ubuntu-16-04-a.html)

jandrey June 16, 2016 22:54

OpenFOAM 3.0.1 from source in Ubuntu 16.04
 
1 Attachment(s)
icoFoam: command not found

Dear all,

I am trying to install OpenFOAM from source on Ubuntu 16.04 LTS by following the instructions given here:

https://openfoamwiki.net/index.php/I...u#Ubuntu_14.04

The last command (icoFoam -help) does not work and so I am compressing and attaching the file log.make.gz as suggested to see if someone can please help me.

I am supposed to "edit the file log.make and check if there are any error messages. It's the first error message that matters."

I have spent 3 days trying to install OpenFOAM and nothing works. So I would truly appreciate your help.

hjasak June 17, 2016 20:42

You are missing flex++. Please check your packages

which flex++


/home/jimmy/OpenFOAM/OpenFOAM-3.0.0/platforms/linux64GccDPInt64Opt/lib/libtriSurface.so: undefined reference to `yyFlexLexer::yywrap()'

Hrv

jandrey June 17, 2016 22:32

Thank you so much for your response. Unfortunately, I am not sure what you mean by that... I am completely new to Ubuntu. According to another website all I have to do to address your comment is running this "sudo apt-get install flex"
But that didn't fix anything. Can you please be more specific?
Thank you!

wyldckat June 18, 2016 16:20

Quick answer @jandrey: OK, this is a bit confusing... you mentioned in the thread's title that you wanted to install OpenFOAM 3.0.1, but then you followed the instructions for 3.0.0 :confused:...

Instructions for OpenFOAM 3.0.1 and Ubuntu 16.04 have been up for sometime already and are present here: http://openfoamwiki.net/index.php/In...u#Ubuntu_16.04

If you still want to install OpenFOAM 3.0.0 in Ubuntu 16.04, please let me know, but the fix is simple (starting with the OpenFOAM environment ready):
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='

./Allwmake -j 4 > log.make 2>&1


@hjasak: This fix is also missing in foam-extend 3.2 and possibly in foam-extend 4.0. I'll send you the merge requests as soon as I can.

2bias April 10, 2017 04:28

The same fix was necessary for compiling OpenFOAM 2.3.x on Ubuntu 16.04. Thanks a lot!


All times are GMT -4. The time now is 18:28.