CFD Online Logo CFD Online URL
Home > Forums > OpenFOAM Installation

Building OpenFOAM1.7.0 from source

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes

LinkBack Thread Tools Display Modes
Old   May 14, 2012, 17:47
Senior Member
Matthew Denno
Join Date: Feb 2010
Posts: 138
Rep Power: 8
mgdenno is on a distinguished road

I am trying to compile OF 1.7.1 in Kubuntu 11.10 and am getting errors. I am not sure if it is important but I already have OF 2.1.0 installed and working fine.

g++ (Ubuntu/Linaro 4.6.1-9ubuntu3) 4.6.1
gcc (Ubuntu/Linaro 4.6.1-9ubuntu3) 4.6.1
flex 2.5.35

I installed the additional dependencies as suggested above:
 sudo apt-get install binutils-dev flex bison git-core  build-essential python-dev libreadline5-dev wget zlib1g-dev cmake  libpng12-dev libxt-dev libxi-dev libxrender-dev libxrandr-dev  libxcursor-dev libxinerama-dev libfreetype6-dev libfontconfig1-dev  libglib2.0-dev freeglut3-dev libqt4-dev qt4-dev-tools
The only one that I couldn't install is libreadline5-dev because it is not available in 11.10. However, I do have libreadline-dev installed, I am not sure if this is ok or if libreadline5-dev specifically is needed.

After I run:
./Allwmake > make.log 2>&1
The log file looks okay until eventually:
+ wmake all solvers
make[1]: Entering directory `/home/mdenno/OpenFOAM/OpenFOAM-1.7.1/applications/solvers/DNS'
make[2]: Entering directory `/home/mdenno/OpenFOAM/OpenFOAM-1.7.1/applications/solvers/DNS/dnsFoam'
g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-40 -I/home/mdenno/OpenFOAM/OpenFOAM-1.7.1/src/finiteVolume/lnInclude     -I/home/mdenno/OpenFOAM/OpenFOAM-1.7.1/src/randomProcesses/lnInclude     -I/home/mdenno/OpenFOAM/OpenFOAM-1.7.1/src/sampling/lnInclude -IlnInclude -I. -I/home/mdenno/OpenFOAM/OpenFOAM-1.7.1/src/OpenFOAM/lnInclude -I/home/mdenno/OpenFOAM/OpenFOAM-1.7.1/src/OSspecific/POSIX/lnInclude   -fPIC Make/linux64GccDPOpt/dnsFoam.o -L/home/mdenno/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt \
	     -lfiniteVolume     -lrandomProcesses     -lsampling     -lmeshTools -lOpenFOAM -liberty -ldl   -lm -o /home/mdenno/OpenFOAM/OpenFOAM-1.7.1/applications/bin/linux64GccDPOpt/dnsFoam
/usr/bin/ld: Make/linux64GccDPOpt/dnsFoam.o: undefined reference to symbol 'Foam::OPstream::write(Foam::Pstream::commsTypes, int, char const*, long)'
/usr/bin/ld: note: 'Foam::OPstream::write(Foam::Pstream::commsTypes, int, char const*, long)' is defined in DSO /home/mdenno/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/openmpi-1.4.1/ so try adding it to the linker command line
/home/mdenno/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/openmpi-1.4.1/ could not read symbols: Invalid operation
collect2: ld returned 1 exit status
make[2]: *** [/home/mdenno/OpenFOAM/OpenFOAM-1.7.1/applications/bin/linux64GccDPOpt/dnsFoam] Error 1
make[2]: Leaving directory `/home/mdenno/OpenFOAM/OpenFOAM-1.7.1/applications/solvers/DNS/dnsFoam'
make[1]: *** [dnsFoam] Error 2
make[1]: Target `application' not remade because of errors.
make[1]: Leaving directory `/home/mdenno/OpenFOAM/OpenFOAM-1.7.1/applications/solvers/DNS'
make: *** [DNS] Error 2
And the errors keep going...

Any thoughts?

Last edited by mgdenno; May 14, 2012 at 17:51. Reason: md5sums do match
mgdenno is online now   Reply With Quote

Old   May 14, 2012, 18:39
Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 9,531
Blog Entries: 39
Rep Power: 97
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Greetings Matthew,

Well, OpenFOAM 1.7.1 isn't compatible with Gcc 4.6.1 See here:

You can either install Gcc 4.4.x that Ubuntu 11.10 has or make a custom build of Gcc 4.4.x or 4.5.x. For then using Gcc 4.4.x... there are a few explanations: GCC and other compiler issues with OpenFOAM - but the best one might be described here, "On how to use gcc44 in RHEL/CentOS/Rocks": OpenFOAM install on RHEL 5.5

Best regards,
wyldckat is offline   Reply With Quote

Old   May 14, 2012, 20:48
Senior Member
Matthew Denno
Join Date: Feb 2010
Posts: 138
Rep Power: 8
mgdenno is on a distinguished road

Thanks so much for the advice.

It is compiling now...

mgdenno is online now   Reply With Quote


Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
wmake compiling new solver mksca OpenFOAM Programming & Development 13 August 18, 2014 22:26
Compilation error OF1.5-dev on Suse10.3 darenyang OpenFOAM Installation 0 April 29, 2009 04:55
OpenFOAM on MinGW crosscompiler hosted on Linux allenzhao OpenFOAM Installation 127 January 30, 2009 20:08
DxFoam reader update hjasak OpenFOAM Post-Processing 69 April 24, 2008 01:24
DecomposePar links against liblamso0 with OpenMPI jens_klostermann OpenFOAM Bugs 11 June 28, 2007 17:51

All times are GMT -4. The time now is 14:34.