CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Installation (
-   -   Problem: Openfoam 2.1 installation from git repo (

fertinaz March 1, 2012 12:40

Problem: Openfoam 2.1 installation from git repo
Hi all,

I follow the instructions to install OF21 from git, however it fails at step:
/usr/bin/ld: cannot find -lfiniteVolume

There might be a build order problem in the allwmake. Has anyone experienced the same problem, or completed the installation successfully?

os: Centos 5.x
gcc: 4.4

Any help is appreciated,

wyldckat March 2, 2012 08:38

Greetings Fatih,

Save yourself several headaches and use CentFOAM:

The instructions seem a bit outdated, but perhaps the scripts can handle OpenFOAM 2.1.x as well.

If you still want to proceed with your own methods, then to figure things out, do it like this:

./Allwmake > make.log 2>&1

Where 4 is the number of cores available on your machine, so it will build faster.
Then look for the first one or two occurrences of "Error ", including the space after the word Error.

Best regards,

fertinaz March 2, 2012 10:12

Hi Bruno,

thanks for the advice but I don't need the compiled version. Also I have successfully installed all the software mentioned at step 1 in the manual install of your link.

I did not want to provide the output messages in details since they are in German, however I can put them with a possible translation

/usr/bin/ld: cannot find -lfiniteVolume
collect2: ld gab 1 als Ende-Status zurück - Final signal is 1
make[2]: *** [/home/fatihe/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/bin/solidEquilibriumDisplacementFoam] Error 1
make[2]: Leaving directory `/home/fatihe/OpenFOAM/OpenFOAM-2.1.x/applications/solvers/stressAnalysis/solidEquilibriumDisplacementFoam'
make[1]: *** [solidEquilibriumDisplacementFoam] Error 2
make[1]: Target »application« cannot be updated due to the errors
make[1]: Leaving directory `/home/fatihe/OpenFOAM/OpenFOAM-2.1.x/applications/solvers/stressAnalysis'
make: *** [stressAnalysis] Error 2
make: Target »application« cannot be updated due to the errors

wyldckat March 2, 2012 10:52

Hi Fatih,

Shoot, I should have stressed that you should look for the first errors in the newly created file "make.log", because the error you are describing only happens a lot further in time... probably one of the last errors, which pretty much is useless for figuring out what is going wrong.

I usually also suggest that people pack said "make.log" file and post here on the forum:

tar -czf make.log.tar.gz make.log
Best regards,

fertinaz March 2, 2012 11:05

1 Attachment(s)
Ok I have attached the log for the allwake output.

Thanks a lot for your help.

wyldckat March 2, 2012 11:27

OK, the first error is this line, #880:

make: *** [Make/linux64GccDPOpt/polyMeshTetDecomposition.o] Fehler 1
So the keyword to look for in German is "Fehler " :D
Looking at the lines above it reveals a problem with overload mismatches. This can be due to either one of two reasons:
  • Bad gcc version, probably too old.
  • A problem in one of the latest git commits made by the SGI/OpenCFD team.
So, to confirm what might be the source of the problem:
  • What is the specific gcc version:

    gcc -v
    gcc --version

  • What is the latest commit you are using of 2.1.x:

    git log -n1
Another question: is this the first build of 2.1.x you are doing on that machine, or is it an update of a previous build of 2.1.x?

fertinaz March 2, 2012 11:43

gcc --version:
gcc (GCC) 4.4.4 20100726 (Red Hat 4.4.4-13)

And the latest commit of the repo is:
commit c8d08ce2098d8cb0f696c28b87e7bbd3fdb11b77
Author: andy <andy>
Date: Thu Mar 1 10:39:46 2012 +0000

STYLE: Updated warning message re: mantis #442

This is the first time that I try to build OF2.1.x on this machine. Normally I still use 1.6.x

wyldckat March 2, 2012 11:57

OK, there is another possibility I've just remembered. Since OpenFOAM started adapting Gcc 4.5 and 4.6, things have become more and more different from Gcc 4.3 and 4.4. But backwards compatibility is still preserved, at the very least by using a different set of rules.
Said set would be "WM_COMPILER=Gcc44", which you can change in either one of two ways:
  • Edit the file "$WM_PROJECT_DIR/etc/bashrc" and change the line:


  • Or add it to the sourcing line:

    source $HOME/OpenFOAM/OpenFOAM-2.1.x/etc/bashrc WM_COMPILER=Gcc44
Either way, start a new terminal, to be certain the changes take effect. In the mean time, if this fails, I'm going to see if I can try building OpenFOAM 2.1.x in an old Ubuntu virtual machine that has gcc 4.4.5 or 4.4.4.

fertinaz March 2, 2012 12:23

Well I have linked gcc to gcc44 so gcc44 is used anyway even though the compiler is set as gcc in bashrc. But now I am trying your suggestion it is worth to try.

Thanks a lot so far, I will let you know.

wyldckat March 2, 2012 12:25

Hold on! Did you do the same linking to "g++"?
edit: What does g++ version return?

g++ --version

fertinaz March 2, 2012 12:26

hmm I guess we found something :)

All times are GMT -4. The time now is 17:45.