CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   Building Gcc 4.3 for compiling OpenFOAM 1.5-dev (https://www.cfd-online.com/Forums/openfoam-installation/117113-building-gcc-4-3-compiling-openfoam-1-5-dev.html)

fatemeh.sadeghpour April 16, 2013 14:48

Building Gcc 4.3 for compiling OpenFOAM 1.5-dev
 
Quote:

Originally Posted by gascortado (Post 318349)
Thanks Bruno.

I already solved the problem by modifying the "files" file in the Make folder. I added the path to each of the "missing" symbolic link to the actual file location. I did this manually for each file. It took a little bit of time but eventually it worked. So I was able to successfully compile the solver.

Thanks again

Hi
I have question,can you tell me how to modify files manually? what is the exact link and where and how to put?
thanks

wyldckat April 17, 2013 16:15

Greetings fatemeh.sadeghpour,

Quote:

Originally Posted by fatemeh.sadeghpour (Post 421024)
Hi
I have question,can you tell me how to modify files manually? what is the exact link and where and how to put?
thanks

Can you be a bit more specific about the problem you're having?
I ask this because it's been almost two years since I looked at that post, so I can't remember very well about what the problems were back then...

Best regards,
Bruno

fatemeh.sadeghpour May 2, 2013 00:13

sorry wyldckat
I did not know exactly what was the problem.but I know it know, my basic problem is i can't compile gcc-4.3.1 to compile opengoam-1.5-dev. I can't do ./Allwmake.
I have errors in compiling gcc-4.3.1,
hecking LIBRARY_PATH variable... contains current directory
configure: error:
*** LIBRARY_PATH shouldn't contain the current directory when
*** building gcc
. Please change the environment variable
*** and run configure again.
make[2]: *** [configure-stage1-gcc] Error 1

do you know anything about that, i put whole weel to solve it and search in cfd-online and google.but i can't solve it yet.

wyldckat May 2, 2013 09:03

Hi fatemeh.sadeghpour,

OK, I've moved your posts to a new thread, because this is a whole other complicated topic! ;)

A few questions:
  1. Which Linux Distribution are you using?
  2. Is it Ubuntu?
    1. If so, which version of Ubuntu?
  3. What steps have you taken for building Gcc 4.3.1?
Best regards,
Bruno

fatemeh.sadeghpour May 2, 2013 12:58

Hi
thanks for reply
ubuntu 12.04 LTs
I compiled gcc-4.3.1 for openfoam-1.5-dev,after hard try for a week.I can't sucess and switch to install openfoam-1.6-ext, ./Allwmake thirdparty.it is ok, when compile openfoam-1.6-ext,again,the problem is gcc,
my gcc --version is 4.6.4 and
gcc version does not match gcc supplied with this release of OpenFOAM
Supplied version: 4.3.3
User version : 4.6.4
Minimum required: 4.3.1
Base configuration ok.

The foam installation contains 1 critical error(s).

Review the output for warning messages and consult
the installation guide for trouble shooting.

I change
# compilerInstall = OpenFOAM | System
#
# We can override the value of compilerInstall from prefs.sh
#: ${compilerInstall:=System}

# Or we can force it right here
compilerInstall=OpenFOAM
#compilerInstall=System


I do'nt know this is good idea.
because i do'nt know i should install and compile gcc for Openfoam-1.6-ext or not?
if yes, i can't do that, because i do not have sucess in compiling gcc-4.3.1 for openfoam-1.5-dev.

please help me.
i should install openfoam for my project and put lot of time to install without any success an tired of it.

wyldckat May 2, 2013 14:02

Hi Fatemeh,

OK, then I just need to know two more details:
  • Where did you get OpenFOAM 1.5-dev, so that I can use the same snapshot for testing.
  • Do you want to have both 1.6-ext and 1.5-dev installed? Or just 1.5-dev?
Best regards,
Bruno

fatemeh.sadeghpour May 2, 2013 14:47

Hi again
steps to compile gcc-4.3.1 that i used:
http://www.tfd.chalmers.se/~hani/kur...sAndTricks.htm
If you don't have the correct version of gcc (4.3.1 or newer, see gcc.gnu.org), then do the following (for 32 bit, some minor changes are required for 64 bit, like linux64 instead of linux):
1. Install gcc 4.3.1. This requires that either any version of cc or gcc are available already. It also requires that two libraries, mpfr and gmp, are available, which is the reason to the lengthy installation procedure below:
cd $HOME/OpenFOAM/ThirdParty
mkdir gmp-4.3.2
mkdir mpfr-2.3.2
mv gcc-4.3.1 gcc-4.3.1_orig; mkdir -p gcc-4.3.1/platforms/linux
mkdir linuxSrc; cd linuxSrc
wget ftp://ftp.gmplib.org/pub/gmp-4.3.2/gmp-4.3.2.tar.gz
tar xzf gmp-4.3.2.tar.gz
.
.
.

./configure --prefix=$HOME/OpenFOAM/ThirdParty/gcc-4.3.1/platforms/linux -enable-languages=c,c++ --with-gmp=$HOME/OpenFOAM/ThirdParty/gmp-4.3.2 --with-mpfr=$HOME/OpenFOAM/ThirdParty/mpfr-2.3.2 2>&1 | tee log_configure
make 2>&1 | tee log_make #Check this file for error messages!
make install 2>&1 | tee log_make_install #Check this file for error messages! Before compiling OpenFOAM-1.5-dev we need to make sure that our freshly compiled gcc will be used, which is done by a change in $WM_PROJECT_DIR/etc/settings.h:
Change:
#compilerInstall=OpenFOAM
compilerInstall=System
to:
compilerInstall=OpenFOAM
#compilerInstall=System


and:

http://www.cfd-online.com/Forums/ope...c-trouble.html
  1. Install flex, binutils, binutils-dev, zlibs, and gmp-devel (libgmp2-dev apparently for Debian)
  2. Download gcc-4.3.1.tar.gz from here
  3. .
  4. .
  5. .
  6. make bootstrap
  7. Code:
    make install
  8. Change the compiler in lines 113-115 of $HOME/OpenFOAM/OpenFOAM-1.5-dev/etc/settings.sh (back) to the OpenFOAM compiler
  9. Start compiling OpenFOAM-1.5(-dev)
  10. sorry I do'nt know how to put the thread here,so i copy-paste here.
  11. thanks










wyldckat May 3, 2013 11:05

Hi Fatemeh,

The only thing left that I still need to know is: Which revision of OpenFOAM 1.5-dev are you using? And where did you get it from?

Best regards,
Bruno

fatemeh.sadeghpour May 3, 2013 11:33

Hi wyldckat
thanks a lot for answering.
No I remove rm -rf OpenFOAM-1.5 and I download the source code from link of cfd-online. users put the link in some thread. the link is for source.forage.
but i get openfoanm-1.6-ext almost nine months ago from git
http://www.extend-project.de/home/33...16-ext/article

git clone git://openfoam-extend.git.sourceforge.net/gitroot/openfoam-extend/OpenFOAMŪ-1.6-ext
and i think, it is complete. but during a year, i have openfoam-2.1.1 and i did'nt compile openfoam-1.6-ext until a week ago
i need to use Finite element matrices(for example, i need icofsifoam) do i need dev or ext version of openfoam not official.

thank wyldckat

wyldckat May 4, 2013 06:32

Hi Fatemeh,

OK, try following these instructions: http://openfoamwiki.net/index.php/In...u#Ubuntu_12.04

You might want to backup the folder "OpenFOAM-1.6-ext" you've got, before following those instructions, since they specify to download from one of the mirrors. But you can also try using the folder you currently have got!

Best regards,
Bruno

fatemeh.sadeghpour May 5, 2013 13:38

thanks a lot for reply.
I have finally installed openfoam-1.6-ext .i run cavity and result are good.
I have used the link you told me:
http://openfoamwiki.net/index.php/In...u#Ubuntu_12.04
I have 2 problems in downloading packages for third party, i downloaded seperateley and installed.then ./AllMake the openfaom-1.6-ext.
now i have 2 problems that i searched in google and in this forum.
1:
when i open a terminal, i have these lines:
Sourcing: /home/sadeghpour/OpenFOAM-1.6-ext/etc/settings.sh
Environment variables defined for OpenMPI:
OPENMPI_BIN_DIR : /usr/bin
OPENMPI_LIB_DIR : /usr/lib/openmpi/lib
OPENMPI_INCLUDE_DIR : /usr/
.
.
and you explain in
http://www.cfd-online.com/Forums/ope...ll-errors.html
there are no errors in memory.
seconde problem:
when i run icofoam in cavity and then parafoam:

created temporary 'cavity.foam'
/home/sadeghpour/OpenFOAM-1.6-ext/ThirdParty/packages/ParaView-3.12.0/platforms/linux64Gcc46DPOpt/lib/paraview-3.12/paraview: symbol lookup error: /home/sadeghpour/OpenFOAM-1.6-ext/ThirdParty/packages/ParaView-3.12.0/platforms/linux64Gcc46DPOpt/lib/paraview-3.12/libQVTK.so.pv3.12: undefined symbol: _ZN19QAbstractProxyModel11setItemDataERK11QModelIn dexRK4QMapIi8QVariantE

i install paraview again. but when i ./AllMake in
sadeghpour@sadeghpour-HP-Pavilion-dv6-Notebook-PC:~/OpenFOAM-1.6-ext/ThirdParty$
it said there is no directory, there is in ThirdParty/package/paraview-3.12.0
but ./AllMake does not work there too.

thanks again
sadeghpour

wyldckat May 5, 2013 13:48

Hi Sadeghpour,

Edit the file "~/.bashrc", go to the end of the file and check if this line is present:
Code:

source $HOME/OpenFOAM/OpenFOAM-1.6-ext/etc/bashrc
Then, do only the step #5 from http://openfoamwiki.net/index.php/In...u#Ubuntu_12.04 once again. Then start a new terminal window.

This is because the instructions were updated in the last 24h and the current instructions now suggest that you use Ubuntu's version of ParaView.
To install Ubuntu's ParaView version, run:
Code:

sudo apt-get install paraview
Best regards,
Bruno

fatemeh.sadeghpour May 6, 2013 08:44

Hi Bruno
my problem with parafoam is solved.but when i open new terminal,those lines repeat every time.
I want to appreciate your help during this week.
when i have problem,i always search in this forum and in almost of thread, you guide all the foamers.
thank you for your kindness.



All times are GMT -4. The time now is 22:09.