|
[Sponsors] |
[OpenFOAM.org] Building OpenFOAM 3.0.1 on Ubuntu 16.04 - failed |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 14, 2016, 21:30 |
Building OpenFOAM 3.0.1 on Ubuntu 16.04 - failed
|
#1 |
New Member
e
Join Date: Apr 2016
Posts: 9
Rep Power: 10 |
Hello!
I followed the steps here, which is where I download the source too, my system is a 64-bit Ubuntu 16.04, 16 GB RAM. When I run ./Allwmake my build fails. It presents lots of errors instead of stopping on the first one, with the message : "undefined reference to `yyFlexLexer::yywrap" . I did: user@pc:~/OpenFOAM/OpenFOAM-3.0.1$ flex++ --version flex++ 2.6.0 user@pc:~/OpenFOAM/OpenFOAM-3.0.1$ which flex++ /usr/bin/flex++ What am I doing wrong here? Edit: also, is there a ppa available to install OpenFOAM without building on Ubuntu Xenial Xerus? |
|
April 15, 2016, 20:04 |
|
#2 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Quick answers:
__________________
Last edited by wyldckat; April 15, 2016 at 20:27. Reason: see "edit:" |
|
April 15, 2016, 20:54 |
|
#3 |
New Member
e
Join Date: Apr 2016
Posts: 9
Rep Power: 10 |
Thanks Bruno! Will try this as soon as possible!
I notice you answer most things here. I am still learning OpenFoam but been a linux USER for some time. How can one help with the OpenFoam project? |
|
April 15, 2016, 22:41 |
|
#4 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Quick answer: Good question! I didn't even remember that a forum sticky thread for this question big question was missing! I've quickly written it now and it's this one: http://www.cfd-online.com/Forums/ope...echnology.html
|
|
April 20, 2016, 05:23 |
|
#5 |
Senior Member
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19 |
Let me add something to this. If you are using wmakeScheduler to compile, you will get the following error:
Code:
wmakeScheduler: Could not find executable 'lockfile' Code:
sudo apt install procmail Solution found in this thread: http://www.cfd-online.com/Forums/ope...oam-2-3-x.html Best, Pablo |
|
April 27, 2016, 21:40 |
|
#6 |
New Member
e
Join Date: Apr 2016
Posts: 9
Rep Power: 10 |
Ok, using the code from Bruno it worked.
I used the same code on OpenFOAM 2.4.0 and could build it successfully on Ubuntu 16.04. Then I went to build Paraview, but build failed at 13% building object vtkXOpenGLRenderWindow.cxx.o . glxext.h 480:143 error: GLintptr has not been declared |
|
April 28, 2016, 09:48 |
|
#7 |
New Member
e
Join Date: Apr 2016
Posts: 9
Rep Power: 10 |
Tried to follow the instructions here instead:
https://openfoamwiki.net/index.php/I...u#Ubuntu_16.04 But on step 8, using `./Allwmake > make.log 2>&1` gives me errors I've attached the log. makelog.txt CMakeErrorlog.txt |
|
May 1, 2016, 07:16 |
|
#8 |
New Member
e
Join Date: Apr 2016
Posts: 9
Rep Power: 10 |
Does the variable WM_NCOMPPROCS=4 matter AFTER building? If I didn't use it, in the 3.0.1 install, will OpenFOAM use 4 cores when running?
|
|
May 1, 2016, 18:45 |
|
#9 | ||
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Quick answers:
Quote:
Quote:
Code:
cd ~/OpenFOAM tar -xzf ThirdParty-2.4.0.tgz "WM_NCOMPPROCS" is only used for building in parallel. It does not affect running cases in parallel or serial mode. |
|||
May 3, 2016, 03:52 |
|
#10 |
New Member
Luka Denies
Join Date: Oct 2014
Posts: 28
Rep Power: 12 |
I was missing the ptscotch.h file when trying to build OpenFOAM on Ubuntu 16.04, so I had to install an additional package:
Code:
apt-get install libptscotch-dev |
|
May 8, 2016, 11:19 |
|
#11 |
New Member
e
Join Date: Apr 2016
Posts: 9
Rep Power: 10 |
I still can't build, I created a script here called:
installOF240_sh.txt if someone could be kind enough to give me a script to just run and install Open FOAM 2.4.0 in Ubuntu 16.04 I would be very happy. Tried everything and it just doesn't build. I could build with no problems Open FOAM 3.0.1. If there is a .deb package that works or a PPA please, tell me!!! |
|
May 8, 2016, 15:18 |
|
#12 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
@erico: OK, the problem with CGAL can be ignored. I still don't understand what's going on wrong, but this can be ignored for now. I'll have to review the instructions to use the CGAL version that comes with Ubuntu 16.04, which should solve this problem.
If you still have OpenFOAM-2.4.0 in your build structure, then please simply try run the following commands and you should get at least most of OpenFOAM built and up and running, although foamyHexMesh won't be working (edit: see the next post as well): 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=' #Go into OpenFOAM's main source folder cd $WM_PROJECT_DIR #Still better be certain that the correct Qt version is being used export QT_SELECT=qt4 # This next command will take a while... somewhere between 30 minutes to 3-6 hours. ./Allwmake > log.make 2>&1 #Run it a second time for getting a summary of the installation ./Allwmake > log.make 2>&1 If you want the complete script, it's easier for me to post the code here (edit: updated script code based on findings shown in the next post): Code:
cd ~ mkdir OpenFOAM cd OpenFOAM wget "http://downloads.sourceforge.net/foam/OpenFOAM-2.4.0.tgz?use_mirror=mesh" -O OpenFOAM-2.4.0.tgz wget "http://downloads.sourceforge.net/foam/ThirdParty-2.4.0.tgz?use_mirror=mesh" -O ThirdParty-2.4.0.tgz tar -xzf OpenFOAM-2.4.0.tgz tar -xzf ThirdParty-2.4.0.tgz ln -s /usr/bin/mpicc.openmpi OpenFOAM-2.4.0/bin/mpicc ln -s /usr/bin/mpirun.openmpi OpenFOAM-2.4.0/bin/mpirun sed -i -e 's/^\(cgal_version=\).*/\1cgal-system/' OpenFOAM-2.4.0/etc/config/CGAL.sh source $HOME/OpenFOAM/OpenFOAM-2.4.0/etc/bashrc WM_NCOMPPROCS=4 echo "alias of240='source \$HOME/OpenFOAM/OpenFOAM-2.4.0/etc/bashrc $FOAM_SETTINGS'" >> $HOME/.bashrc cd $WM_THIRD_PARTY_DIR export QT_SELECT=qt4 sed -i -e 's=//#define GLX_GLXEXT_LEGACY=#define GLX_GLXEXT_LEGACY=' \ ParaView-4.1.0/VTK/Rendering/OpenGL/vtkXOpenGLRenderWindow.cxx cd $WM_THIRD_PARTY_DIR/ParaView-4.1.0 wget http://www.paraview.org/pipermail/paraview/attachments/20140210/464496cc/attachment.bin -O Fix.patch patch -p1 < Fix.patch cd VTK wget https://github.com/gladk/VTK/commit/ef22d3d69421581b33bc0cd94b647da73b61ba96.patch -O Fix2.patch patch -p1 < Fix2.patch cd ../.. #this will take a while... somewhere between 30 minutes to 2 hours or more ./makeParaView4 -python -mpi -python-lib /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0 > log.makePV 2>&1 wmSET $FOAM_SETTINGS #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=' #Create stub folders, so that they mark their presences mkdir -p $CGAL_ARCH_PATH mkdir -p $BOOST_ARCH_PATH #Go into OpenFOAM's main source folder cd $WM_PROJECT_DIR #Still better be certain that the correct Qt version is being used export QT_SELECT=qt4 # This next command will take a while... somewhere between 30 minutes to 3-6 hours. ./Allwmake > log.make 2>&1 #Run it a second time for getting a summary of the installation ./Allwmake > log.make 2>&1 gzip < log.make > log.make.gz Last edited by wyldckat; May 8, 2016 at 17:00. Reason: see "edit:" and next post |
|
May 8, 2016, 16:59 |
|
#13 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Sorry about the confusion. I've solved the problem with CGAL. Quoting myself from a few minutes ago:
Quote:
|
||
May 14, 2016, 23:04 |
|
#14 |
New Member
e
Join Date: Apr 2016
Posts: 9
Rep Power: 10 |
so wmSET didn't work.
I understand that using source $HOME/OpenFOAM/OpenFOAM-2.4.0/etc/bashrc WM_NCOMPPROCS=4 is ok - as alternative to the wmSET command that is inexistent on my system. Anyway, now I have a different problem. Damn, I really wish OpenFOAM was just packed somewhere, maybe as Snaps, or as debs or a ppa... user@pc:~/OpenFOAM/user-2.4.0/run/testes/parede_DxDy5$ of240 user@pc:~/OpenFOAM/user-2.4.0/run/testes/parede_DxDy5$ paraview --version paraview version 4.1.0 Inconsistency detected by ld.so: dl-close.c: 811: _dl_close: Assertion `map->l_init_called' failed! user@pc:~/OpenFOAM/user-2.4.0/run/testes/parede_DxDy5$ of301 user@pc:~/OpenFOAM/user-2.4.0/run/testes/parede_DxDy5$ paraview --version paraview version 4.4.0 Inconsistency detected by ld.so: dl-close.c: 811: _dl_close: Assertion `map->l_init_called' failed! I have zero results for this error in Google. --- EDIT: I am an idiot. The correct software is paraFoam. Nevermind, everything is working. It's perfect. |
|
September 11, 2016, 03:45 |
Unable to install OpenFOAM in ubuntu 16.04
|
#15 |
New Member
Rishabh Golchha
Join Date: Sep 2016
Posts: 12
Rep Power: 10 |
As per the instruction, I tried running
Code:
apt-get install build-essential binutils-dev cmake flex bison zlib1g-dev qt4-dev-tools libqt4-dev libqtwebkit-dev gnuplot \ libreadline-dev libncurses-dev libxt-dev libopenmpi-dev openmpi-bin libboost-system-dev libboost-thread-dev libgmp-dev \ libmpfr-dev python python-dev libcgal-dev Code:
Reading package lists... Done Building dependency tree Reading state information... Done Package libgmp-dev is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source Package gnuplot is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source Package zlib1g-dev is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source Package libxt-dev is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source Package libncurses-dev is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source Package qt4-dev-tools is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source However the following packages replace it: qtchooser Package libqt4-dev is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source However the following packages replace it: libqt4-dbus Package flex is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source Package bison is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source Package python-dev is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source However the following packages replace it: python Package cmake is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source E: Unable to locate package binutils-dev E: Package 'cmake' has no installation candidate E: Package 'flex' has no installation candidate E: Package 'bison' has no installation candidate E: Package 'zlib1g-dev' has no installation candidate E: Package 'qt4-dev-tools' has no installation candidate E: Package 'libqt4-dev' has no installation candidate E: Unable to locate package libqtwebkit-dev E: Package 'gnuplot' has no installation candidate E: Unable to locate package libreadline-dev E: Package 'libncurses-dev' has no installation candidate E: Package 'libxt-dev' has no installation candidate E: Unable to locate package libopenmpi-dev E: Unable to locate package openmpi-bin E: Unable to locate package libboost-system-dev E: Unable to locate package libboost-thread-dev E: Package 'libgmp-dev' has no installation candidate E: Unable to locate package libmpfr-dev E: Package 'python-dev' has no installation candidate E: Unable to locate package libcgal-dev Thanks Last edited by wyldckat; September 11, 2016 at 09:37. Reason: Added [CODE][/CODE] markers |
|
September 11, 2016, 09:46 |
|
#16 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Quick answer @RishabhG: Sorry, I completely forgot to add to the instructions on the wiki for updating the apt-get cache.
On the terminal, in root mode, please run the following command: Code:
apt-get update Code:
sudo apt-get update edit: I've updated all of the wiki pages I could remember about on this detail.
__________________
Last edited by wyldckat; September 11, 2016 at 10:44. Reason: see "edit:" |
|
September 12, 2016, 01:01 |
OpenFoam Tutorial
|
#17 |
New Member
Rishabh Golchha
Join Date: Sep 2016
Posts: 12
Rep Power: 10 |
Thanks a lot. I was able to successfully install
I was trying a tutorial given in http://cfd.direct/openfoam/user-guid...ty/#x5-40002.1 Code:
cd $FOAM_RUN cp -r $FOAM_TUTORIALS/incompressible/icoFoam/cavity/cavity . cd cavity Code:
cp: missing destination file operand after '/home/rishabh/OpenFOAM/OpenFOAM-3.0.1/tutorials/incompressible/icoFoam/cavity/cavity' Try 'cp --help' for more information. |
|
September 13, 2016, 16:58 |
|
#18 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Quick answer @RishabhG: I'm guessing that you started a new terminal window or tab. You need to run the respective alias command. In your situation, where you have OpenFOAM 3.0.1, run:
Code:
of301 If that gives you an error message, then something went wrong. Please let me/us know of what error message it gives you or check the installation instructions again, namely the step that uses the command "source", which at the current time of writing is step #8 here: http://openfoamwiki.net/index.php/In...u#Ubuntu_16.04 |
|
September 17, 2016, 05:35 |
|
#19 |
New Member
Rishabh Golchha
Join Date: Sep 2016
Posts: 12
Rep Power: 10 |
I did run the of301 command. The I ran
Code:
cd $FOAM_RUN Code:
cp -r $FOAM_TUTORIALS/incompressible/icoFoam/cavity/cavity Code:
cp: missing destination file operand after '/home/rishabh/OpenFOAM/OpenFOAM-3.0.1/tutorials/incompressible/icoFoam/cavity' Try 'cp --help' for more information. |
|
September 17, 2016, 07:47 |
|
#20 | |||
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Quote:
Code:
missing destination file operand Code:
cp -r origin target
Quote:
But on the post you made now: Quote:
Maybe this is easier to see: Code:
cp -r $FOAM_TUTORIALS/incompressible/icoFoam/cavity/cavity ./ Take a look at the following thread for more details: http://unix.stackexchange.com/questi...nd-directories |
||||
Tags |
3.0.1, xenial xerus |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[OpenFOAM.org] OpenFOAM 3.0.1 in Ubuntu 18.04 | jlr | OpenFOAM Installation | 4 | January 3, 2019 13:57 |
[OpenFOAM.org] OpenFOAM 5 source pack installation on Ubuntu 16.04 | CjjJoy | OpenFOAM Installation | 23 | June 6, 2018 11:55 |
[OpenFOAM.com] Installation of OpenFOAM 1.7.1 on Ubuntu 16.04 | MM_Khan | OpenFOAM Installation | 11 | September 3, 2017 10:22 |
[OpenFOAM.com] Problems building OF-1.7.x version, Ubuntu 16.04, Gcc-5.4.0 | wadekar | OpenFOAM Installation | 2 | February 22, 2017 12:11 |
Initial conditions for uniform flow | andreas | OpenFOAM | 5 | November 16, 2012 16:00 |