CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (http://www.cfd-online.com/Forums/openfoam-installation/)
-   -   Compilation error OF 2.0.x (UIPstream) (http://www.cfd-online.com/Forums/openfoam-installation/90452-compilation-error-2-0-x-uipstream.html)

prapanj July 11, 2011 01:21

Compilation error OF 2.0.x (UIPstream)
 
I was trying to compile OF 2.0.x from source. I got all the dependent packages installed as per website. But in stressAnalysis/solidEquilibriumDisplacementFoam/ I am getting the following error:
undefined reference to `Foam::UIPstream::UIPstream(int, Foam::PstreamBuffers&)'
collect2: ld returned 1 exit status

I am on a 64 bit Ubuntu box. I installed posixthread development libraries from my package manager and tried again and it gave me the same error.

Please help.

prapanj July 12, 2011 05:17

It is to be noted that, I am able to compile OF 1.7.0 successfully on the same box. Are there any additional dependencies that come with OF 2.0, which are not mentioned in OF website?

wyldckat July 12, 2011 18:09

Greetings Prapanj,

When they released OpenFOAM 2.0.0, I was one of the guys that gave some feedback of what packages were needed in Ubuntu. I tested the options in a clean install on a new Ubuntu installation to verify which packages were needed, as well as keeping up with feedback from other forum users.
In other words, if you followed the instructions at www.openfoam.com for the specific installation you are trying to do, then you should have everything you need. You'll only lack packages it you try to build the git or source version, while only having installed the OpenFOAM packages for Ubuntu.

My advice is to do the following commands, similarly to what I suggested the other day on a nearby thread:
Code:

foam
git stash
git pull
git stash pop
wcleanAll
wcleanLnIncludeAll
./Allwmake > make.log 2>&1

The stash subcommand will store any changes you might have done to the local git repository (the one created with the clone subcommand). And stash pop will bring those changes back on top of the latest git version.

Good luck!
Bruno

prapanj July 14, 2011 13:24

Hi Wyldckat,

I am trying to install from source. And I am getting the above error for both OF 2.0.0 and 2.0.x . On 2.0.x, i tried the commands you mentioned, to no avail. Surprisingly OF 1.7 compiles on the same machine. I have installed all the packages as mentioned in the OF website. Any more suggestions?

wyldckat July 16, 2011 08:24

Hi Prapanj,

I've tried to reproduce the same issues you've had on an Ubuntu 10.04 x86_64 and I've only be able to do so replicate these issues if I:
  1. Download the two .gtgz files indicated at http://www.openfoam.com/download/source.php
  2. Unpack only OpenFOAM-2.0.0.gtgz.
  3. Install all packages indicated in the System Requirements chapter, i.e. the base packages + OpenMPI and Scotch.
  4. Initialize the environment and get things rolling.
This results in things not building properly, because in this scenario we are assuming that the ThirdParty package isn’t necessary since we installed OpenMPI and Scotch from the repos.

So, I'll need to know if this was what you did or not.
On the other hand, if you followed all of the instructions on that web page, I suggest that you attach the log from the build made with that last command I posted before. To generate a file small enough to be attached, run the following command:
Code:

tar -czf make.log.tar.gz make.log
Then attach the file make.log.tar.gz to your next post.

Otherwise, I would need a magical crystal ball :rolleyes:

Best regards,
Bruno

prapanj July 19, 2011 12:58

magic crystal ball
 
Often we find ourselves fantasize situations which can be handled only by magical crystal balls. We end up realizing that either a crystal ball is not needed or that nothing on earth can save us. :(
So here, you are right, spot on. I was trying to fiddle with the old third party folder that I had and assumed, like you mentioned, that the mpi and scotch installation would take care of everything. So all we need to do is follow the instruction step by step exactly. Thank you for the help and btw, you have an amazing insight into how things may go wrong (I know no one that can reproduce errors exactly!)

Thanks again.

wyldckat July 19, 2011 16:32

Hi Prapanj,

Quote:

Originally Posted by prapanj (Post 316640)
Often we find ourselves fantasize situations which can be handled only by magical crystal balls. We end up realizing that either a crystal ball is not needed or that nothing on earth can save us. :(

This reminds me of the novel "The Hitchhiker's Guide to the Galaxy", where a «race of "hyper-intelligent," "pan-dimensional" beings (...) had earlier built a supercomputer called Deep Thought to calculate the Answer to the Ultimate Question of Life, the Universe, and Everything. This computer, after seven and a half million years of calculation, had announced that the Answer is in fact 42
The story doesn't end there, it gets crazier and funnier :D But it pretty much sums up that no matter how smart/intelligent we think we are, only by asking the right questions will we be able to find at the very least good solutions ;)

Quote:

Originally Posted by prapanj (Post 316640)
Thank you for the help and btw, you have an amazing insight into how things may go wrong (I know no one that can reproduce errors exactly!)

Well, installing OpenFOAM is my strongest point when it comes to using it :rolleyes:. Lots of building and rebuilding and modifying it for working in Windows and such... so I got to know my way around with building it :)

Quote:

Originally Posted by prapanj (Post 316640)
Thanks again.

You're very welcome :) I'm glad I was able to help you! Only by combining my experience with me liking a good challenge, was I able to help you!

Best regards,
Bruno


All times are GMT -4. The time now is 03:25.