CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   Error installing OpenFOAM 2.2.0 on CentOS 6.4 (https://www.cfd-online.com/Forums/openfoam-installation/121996-error-installing-openfoam-2-2-0-centos-6-4-a.html)

CGMaioli August 9, 2013 15:30

Error installing OpenFOAM 2.2.0 on CentOS 6.4
 
Hi everyone,

I have tried to install OpenFOAM 2.2.0 on CentOS 6.4 following the tutorial in this link: http://openfoamwiki.net/index.php/In...CentOS_SL_RHEL
But when I get to step #6 to build the Gcc 4.5.2, I still get the error:

Warning in /home/lftc/OpenFOAM/OpenFOAM-2.2.0/etc/config/settings.sh:
Cannot find /home/lftc/OpenFOAM/ThirdParty-2.2.0/platforms/linux64/gcc-4.5.2 installation.
Please install this compiler version or if you wish to use the system compiler,
change the 'foamCompiler' setting to 'system'

Looking into the mkgcc.log file, it seems that it "could not find a working compiler".
The mkgcc.log file is shown below:

---------------
Starting build: gmp-5.0.1

+ /home/lftc/OpenFOAM/ThirdParty-2.2.0/gmp-5.0.1/configure ABI=64 --prefix=/home/lftc/OpenFOAM/ThirdParty-2.2.0/platforms/linux64/gmp-5.0.1 --enable-cxx
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking ABI=64
checking compiler icc ... no
configure: error: could not find a working compiler, see config.log for details
Error building: gmp-5.0.1


Can somebody help solve this problem?
Thanks,
Caio

r08n August 10, 2013 04:57

Quote:

Originally Posted by CGMaioli (Post 444773)

checking compiler icc ... no
configure: error: could not find a working compiler, see config.log for details

The installer tries to find the Intel compiler (icc) which is obviously not there. I would suggest to install a new gcc compiler (i.e., a newer version than that provided by CentOS) separately:
1) Check that you have a working gcc compiler: 'gcc --version', 'g++ --version'; if not, install it from repo: 'yum install gcc gcc-c++'
2) Download and compile a new version of gcc: see http://gcc.gnu.org; you'll also need mpc (www.multiprecision.org), mpfr (http://www.mpfr.org/), gmp (http://gmplib.org/).
3) After installing, make sure new versions of gcc/g++ are used: you may set aliases (e.g., 'alias gcc=/usr/bin/gcc-4.8.1') or smth;
4) Make sure 'OpenFOAM-2.2.0/etc/bashrc' says 'foamCompiler=system';
5) 'source OpenFOAM-2.2.0/etc/bashrc' and compile.

wyldckat August 21, 2013 12:58

Greetings to all, and Caio welcome to the forum!

In the defence of the wiki page: http://openfoamwiki.net/index.php/In...HEL#CentOS_6.4 - the reason for the error message is because something went very wrong when following the instructions for step #1, more specifically the execution of the command:
Code:

yum groupinstall 'Development Tools'
Best regards,
Bruno

borrbyper September 6, 2013 06:44

OF 2.2.x on RHEL 6.4 x86_64
 
Many thanks wyldckat for the excellent wiki page!

It worked fine for me with OpenFOAM 2.2.x on RHEL 6.4 x86_64.

Obviously I changed the directory names to 2.2.x.

I also had to
Code:

export PATH=$PATH:/usr/lib64/openmpi/bin

before
loading the openmpi module.

Best regards,
Per

wyldckat September 7, 2013 03:39

Greetings Per and many thanks for the feedback!

But I have one question: do you need to run that export command even after logging out?
Because these module-like systems usually only manage to do a refresh of the environment after a new terminal has been started or after the user has logged out and logged back in.

Best regards,
Bruno

borrbyper September 7, 2013 04:04

Hi!

Frankly, I don't know, so I will try to describe what I did. :o

First I followed the instructions and thus loaded the module without adding the path to the systems openmpi. Then I got problems; mpicc was not found and apparently it was looked for down the ThirdParty directory.

I did not manage to redirect the search to the systems openmpi location, not even by starting a new terminal. I also thought about "ejecting" and reloading the module again (because I thought that the path was included in the loaded module), but I did not now how to "eject" a module.

Therefore I exported the path to the systems openmpi as described.
(I also added this in my .bashrc.) Then I followed the instructions through again - and it worked!

Best regards,
Per

wyldckat September 7, 2013 04:40

Hi Per,

Thanks, I've added this information to the wiki page!

Best regards,
Bruno

Aurelien Thinat November 4, 2013 07:00

Hello everyone,

I had some problems with ParaFoam and centOS. So I re-installed a clean version of centOS 6.4 and I followed the wiki. Everything was good. I successfully installed OpenFoam, paraview and Parafoam. I launched a tutorial (motorbike).

And then I have restart the computer : no more solveurs available. So I'm running again the Allwmake command in OpenFoam-2.2.2 folder and I get some error outputs :

1st error :
Code:

primitives/triad/triad.C:36: error: expected initializer before '<'token
primitives/triad/triad.C:39: error: expected initializer before '<'token
make: *** [Make/linux64GccDPOpt/triad.o] Error 1

2nd error :
Code:

/usr/bin/ld: cannot find -lOpenFOAM
collect2: ld returned 1 exit status
make: *** [/home/trap/OpenFOAM/OpenFOAM-2.2.2/platforms/linux64GccDPOpt/lib/libfiniteVolume.so] Error 1

Does anybody have any idea ?

EDIT :
When I source OpenFoam I got this message : "bash: mpicc: command not found"
I switch to openmpi in the 3rdParty to avoid this last problem.

EDIT 2 :
After a reboot and a new compilation, everything is good...

wyldckat November 4, 2013 17:02

Hi Aurelien,

I'm glad you've finally managed to get it working properly!

My guess is that on step #4, the last 2 commands didn't work very well.

As for the "triad" problem, it was because the wrong Gcc version was being picked up, since CentOS 6.4 only provides Gcc 4.4 and OpenFOAM 2.2 needs at least Gcc 4.5.

Best regards,
Bruno

tladd January 10, 2014 15:46

Comments on installing OpenFOAM-2.2.2 with Centos 6
 
The website http://openfoamwiki.net/index.php/In...CentOS_SL_RHEL and Bruno's scripts have been very helpful to me in trying to install OpenFOAM-2.2.2 on my CentOS 6.5 platform.

I would like to add some comments to the instructions on the webpage and ask one or two questions

1) I think the sequence is a bit out of order. If you set the compiler to ThirdParty you cannot compile gcc since there is no working compiler at that point (I guess). So you need to source the bashrc to set the OF environment but leave the default foamCompiler setting (system) until after you gcc installed. At least this is what worked for me.

2) I think arguments to Bruno's scripts (getGcc, getBinutils, makeBinutils) are unnecessary - the packages are defined within each script. So just getGcc followed by makeGcc works; this is not a bug but I found it confusing. It is important to check the consistency of the package versions between the get and make scripts and also the gcc version in makeBinutils. OpenFOAM-2.2.2 seems to expect gcc-4.5.2 by default so its easiest to install that one.

3) I found it difficult to get OpenFOAM to use the right compiler. The instructions did not work for me. I found that after running Allwmake the key system variables had been reset to their default values: i.e.
foamCompiler= WM_COMPILER=Gcc WM_MPLIB=OPENMPI
So the compilation of triad.C still breaks.
I fixed this by editing the bashrc to set the correct values (perhaps I should have used prefs.sh) and I could then compile triad.C OK.

4) I followed the directions and used SYSTEMOPENMPI but the compilation of ptscotch was then broken. When trying to compile ptscotchDecomp.C it was apparently looking for the header file ptscotch.h in /usr/include/scotch which does not exist on my system. I recompiled with OPENMPI and this time everything worked.

5) I have one error remaining:
cp: cannot stat `../bin/[agm]*': No such file or directory
make: [install] Error 1 (ignored)
Am I correct in thinking this can be ignored (foamInstallationTest is good)

6) Can someone explain what FOAM_SETTINGS is. Whenever I check it seems to be empty.

A summary of my comments:

1) Package versions are defined in the scripts - check for consistency
2) Use the default OpenFoam settings while making gcc and binutils
3) Set the compiler options foamCompiler and WM_Compiler in prefs.sh (it needs to go in the etc directory) or in bashrc
3) Use the openmpi from ThirdParty tree

The web page and Bruno's scripts were enormously helpful. I don't think I could have got it working without. Thanks to everyone involved.

wyldckat January 10, 2014 18:08

Greetings Tony and many thanks for the feedback!

Let me see if I'm able to answer your comments and questions:
Quote:

Originally Posted by tladd (Post 469516)
1) I think the sequence is a bit out of order. If you set the compiler to ThirdParty you cannot compile gcc since there is no working compiler at that point (I guess). So you need to source the bashrc to set the OF environment but leave the default foamCompiler setting (system) until after you gcc installed. At least this is what worked for me.

Well, without a system compiler, you're not able to build the custom GCC ;) As I've written on the wiki page (I've emboldened the crucial sentence in the quote):
Quote:

Note: You probably will see a message similar to this one and it's meant to do so until we've built the custom Gcc version:
Quote:

Originally Posted by tladd (Post 469516)
2) I think arguments to Bruno's scripts (getGcc, getBinutils, makeBinutils) are unnecessary - the packages are defined within each script. So just getGcc followed by makeGcc works; this is not a bug but I found it confusing. It is important to check the consistency of the package versions between the get and make scripts and also the gcc version in makeBinutils. OpenFOAM-2.2.2 seems to expect gcc-4.5.2 by default so its easiest to install that one.

When in doubt, look at the source code ;): https://github.com/wyldckat/scripts4.../master/getGcc - this is what the script has defined by default:
Quote:

Code:

gmpPACKAGE=gmp-5.0.1
mpfrPACKAGE=mpfr-2.4.2
mpcPACKAGE=mpc-0.8.1
gccPACKAGE=gcc-4.5.1


Unfortunately, the "ThirdParty-2.2.x" folder doesn't have a git repository, so I can't post directly a link to it, but the settings I see on my installation for "ThirdParty-2.2.x/makeGcc" are these:
Code:

gmpPACKAGE=gmp-5.0.4
mpfrPACKAGE=mpfr-3.1.0
mpcPACKAGE=mpc-0.9
gccPACKAGE=gcc-4.6.2

If you look at the source code at "OpenFOAM-2.2.2/etc/config/settings.sh", for the "Gcc46" option: https://github.com/OpenFOAM/OpenFOAM...ttings.sh#L243
Quote:

Code:

gcc_version=gcc-4.6.1
gmp_version=gmp-5.0.4
mpfr_version=mpfr-3.1.0
mpc_version=mpc-0.9


Not very consistent, is it? ;)
That is why I indicated explicitly the versions in the arguments for each script.

As to why I wrote the instructions to use GCC 4.5? Well, it's inherited from old instructions and I decided to go along with what's known to always work.


Nonetheless, the makeBinutils script does need some serious revision :( At this point, it's probably completely unecessary to use it at all. I gotta find some time to double-check that.


Quote:

Originally Posted by tladd (Post 469516)
3) I found it difficult to get OpenFOAM to use the right compiler. The instructions did not work for me. I found that after running Allwmake the key system variables had been reset to their default values: i.e.
foamCompiler= WM_COMPILER=Gcc WM_MPLIB=OPENMPI
So the compilation of triad.C still breaks.
I fixed this by editing the bashrc to set the correct values (perhaps I should have used prefs.sh) and I could then compile triad.C OK.

I suspect that you didn't understand the "\" at the end of the first line here:
Code:

source $HOME/OpenFOAM/OpenFOAM-2.2.2/etc/bashrc WM_NCOMPPROCS=4 foamCompiler=ThirdParty \
WM_COMPILER=Gcc45 WM_MPLIB=SYSTEMOPENMPI

It's a line break, indicating that the code continues on the next line. This is because the wiki doesn't have a horizontal scroll for code, therefore I had to use the standard shell line break.
If you copy-paste the two lines in a single go and then run:
Code:

echo $WM_COMPILER
It should give you "Gcc45".

Quote:

Originally Posted by tladd (Post 469516)
4) I followed the directions and used SYSTEMOPENMPI but the compilation of ptscotch was then broken. When trying to compile ptscotchDecomp.C it was apparently looking for the header file ptscotch.h in /usr/include/scotch which does not exist on my system. I recompiled with OPENMPI and this time everything worked.

Mmm... that's strange. It worked well for me!? OK, not much of an excuse, but I would have liked to have seen the content of the "make.log" file, for when that happened.

Quote:

Originally Posted by tladd (Post 469516)
5) I have one error remaining:
cp: cannot stat `../bin/[agm]*': No such file or directory
make: [install] Error 1 (ignored)
Am I correct in thinking this can be ignored (foamInstallationTest is good)

Well... I always think that "Error 1 (ignored)" pretty much states that although it's an error, it has been ignored.
Any other errors that do not state "(ignored)", can be understood as not being ignored! ;)

Quote:

Originally Posted by tladd (Post 469516)
6) Can someone explain what FOAM_SETTINGS is. Whenever I check it seems to be empty.

That's not good. It shouldn't be empty!? At least not if you followed the instructions to the letter.
Anyway, "FOAM_SETTINGS" is thoroughly explained here: http://openfoamwiki.net/index.php/In...iable_settings :)

-------------------------
Quote:

Originally Posted by tladd (Post 469516)
A summary of my comments:

1) Package versions are defined in the scripts - check for consistency

The original OpenFOAM scripts themselves aren't consistent ;)

Quote:

Originally Posted by tladd (Post 469516)
2) Use the default OpenFoam settings while making gcc and binutils

It will use the system's default GCC, while the custom GCC version isn't built yet.

Quote:

Originally Posted by tladd (Post 469516)
3) Set the compiler options foamCompiler and WM_Compiler in prefs.sh (it needs to go in the etc directory) or in bashrc

:confused: Well... the in-line instructions don't require the usage of the "prefs.sh" file, but that would explain why your "FOAM_SETTINGS" is always empty.

Quote:

Originally Posted by tladd (Post 469516)
4) Use the openmpi from ThirdParty tree

YMMV - did you check:
  1. What version was given by mpirun and mpicc, when the "SYSTEMOPENMPI" options were defined:
    Code:

    mpirun --version
    mpicc --version

  2. Are you certain that the development files for the system Open-MPI are installed properly?
  3. Did you run the following line with success:
    Code:

    module load openmpi-x86_64 || export PATH=$PATH:/usr/lib64/openmpi/bin


Beyond this, the instructions are not yet bulletproof. They should be, but not necessarily, since it might depend on the installation each user has got. For example, recently instructions were added to the Ubuntu Deb packages page: http://www.openfoam.org/download/ubuntu.php - regarding the need to specify the system MPI to be Open-MPI, because for some reason, some systems had by default MPICH2.


Another detail is that you might have caught the small period of time of when I was readjusting the installation instructions to be more generic and able to contemplate the installation of several OpenFOAM versions, which was done on the 1st of January. Check the history link on the top right of the wiki page ;)

Best regards,
Bruno

tladd January 10, 2014 21:15

Compiling OpenFOAM
 
1 Attachment(s)
Bruno

There is a lot here I don't understand - I do appreciate you taking the time to help.

One basic difficulty is that I still don't see how FOAM_SETTINGS is obtained. It seems as if you are using it as input to the bashrc (wmSET $FOAM_SETTINGS) but of course it has to have something in it first. It says in bashrc that it stores the previous values of the environment variables in FOAM_SETTINGS but I never see that behavior. So if I source etc/bashrc (from the OpenFOAM directory) then all the expected aliases and environment variables seem to be set.

Now if I set
WM_MPLIB=SYSTEMOPENMPI
(for example) and then source bashrc it gets reset to OPENMPI (what I would expect) but FOAM_SETTINGS is still null. Is that correct?

I also tried
WM_MPLIB=SYSTEMOPENMPI
followed by
wmSET $FOAM_SETTINGS
but again FOAM_SETTINGS was null afterwards. So I am obviously missing something. I did read the link you suggested but it did not find an answer there.

Does Allwmake (in $WM_PROJECT_DIR) source bashrc. I say this because if I override a system default e.g.
WM_MPLIB=SYSTEMOPENMPI
then Allwmake runs with WM_MPLIB=OPENMPI regardless. If I check afterwards, I find WM_MPLIB is again OPENMPI. This is why I was editing bashrc rather than using the inline variables as you suggested (I do understand line breaks). Perhaps this is also why I had the problems compiling gcc with the edited bashrc -its behaving differently from the inline version

I could not find where your scripts (getGcc etc.) parsed input arguments. I thought they just took the hard wired settings. I am a beginner with bash (just switched from csh) so I am obviously overlooking how you do that.

I think MPI was loading correctly - the error in the log file was an include:

413 wmake libso ptscotchDecomp
414 SOURCE=ptscotchDecomp.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-100 -DOMPI_SKIP_MPICXX -I/usr/include/openmpi-x86_64 -pthread -I/include -I/global/usr/apps/OpenFOAM/ThirdParty-2.2.2/platforms/linux64Gcc45/scotch_6.0.0/include/openmpi-system -I/usr/include/scotch -I../decompositionMethods/lnInclude -IlnInclude -I. -I/global/usr/apps/OpenFOAM/OpenFOAM-2.2.2/src/OpenFOAM/lnInclude -I/global/usr/apps/OpenFOAM/OpenFOAM-2.2.2/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64Gcc45DPOptSYSTEMOPENMPI/ptscotchDecomp.o
415 ptscotchDecomp.C:126:22: fatal error: ptscotch.h: No such file or directory
416 compilation terminated.
417 make: *** [Make/linux64Gcc45DPOptSYSTEMOPENMPI/ptscotchDecomp.o] Error 1

A log file from the second try (shorter) is attached

Tony

wyldckat January 11, 2014 15:43

Hi Tony,

Quote:

Originally Posted by tladd (Post 469540)
One basic difficulty is that I still don't see how FOAM_SETTINGS is obtained. It seems as if you are using it as input to the bashrc (wmSET $FOAM_SETTINGS) but of course it has to have something in it first. It says in bashrc that it stores the previous values of the environment variables in FOAM_SETTINGS but I never see that behavior. So if I source etc/bashrc (from the OpenFOAM directory) then all the expected aliases and environment variables seem to be set.

Now if I set
WM_MPLIB=SYSTEMOPENMPI
(for example) and then source bashrc it gets reset to OPENMPI (what I would expect) but FOAM_SETTINGS is still null. Is that correct?

Line 186: https://github.com/OpenFOAM/OpenFOAM...tc/bashrc#L184
Quote:

Code:

# Evaluate command-line parameters and record settings for later
# these can be used to set/unset values, or specify alternative pref files
export FOAM_SETTINGS="$@"
_foamEval $@


That's how it's done in OpenFOAM's "bashrc" file ;)
Nonetheless, it is possible that your shell environment is not working as expected. Perhaps the dash, ash or bash shell you are using is older than the ones more common nowadays.
A quick test is to start a new terminal, in which the OpenFOAM environment is not active. Then run these commands (the first line might be different for your installation!):
Code:

cd ~/OpenFOAM/OpenFOAM-2.2.2
source etc/bashrc WM_MPLIB=MPICH
echo $WM_MPLIB
echo $FOAM_SETTINGS

If the last two commands do not give you:
Code:

MPICH
WM_MPLIB=MPICH

then I'd say that there is a problem with the command line shell you are using. Check the instructions on this StackOverflow post: http://stackoverflow.com/a/3327022 - to find more information about the shell you are working with.


Quote:

Originally Posted by tladd (Post 469540)
I also tried
WM_MPLIB=SYSTEMOPENMPI
followed by
wmSET $FOAM_SETTINGS
but again FOAM_SETTINGS was null afterwards. So I am obviously missing something. I did read the link you suggested but it did not find an answer there.

If that had worked, then there was something very fishy going on in your shell ;)
It's meant to work as exemplified before the quote above. In other words, the correct steps for your example should be:
Code:

cd ~/OpenFOAM/OpenFOAM-2.2.2
source etc/bashrc  WM_MPLIB=SYSTEMOPENMPI
echo $WM_MPLIB
echo $FOAM_SETTINGS

By the way, regarding the wmSET command, it's an alias command, which means that if you run this:
Code:

alias wmSET
you'll see what it stands for.

Quote:

Originally Posted by tladd (Post 469540)
Does Allwmake (in $WM_PROJECT_DIR) source bashrc. I say this because if I override a system default e.g.
WM_MPLIB=SYSTEMOPENMPI
then Allwmake runs with WM_MPLIB=OPENMPI regardless. If I check afterwards, I find WM_MPLIB is again OPENMPI. This is why I was editing bashrc rather than using the inline variables as you suggested (I do understand line breaks). Perhaps this is also why I had the problems compiling gcc with the edited bashrc -its behaving differently from the inline version

No, the Allwmake script uses the current shell environment. Although, you better check if the shell being used by the script is identical or similar to the shell you are using. Have a look into the first line of the script and you'll see this:
Code:

#!/bin/sh
Run this command to see what exactly that binary actually is:
Code:

ls -l /bin/sh
It might give you an indication that it's a link to the real shell, for example:
Code:

lrwxrwxrwx 1 root root 4 Mar 29  2012 /bin/sh -> dash
But it could also be a copy of the real shell binary; to check this, run:
Code:

ls -l /bin/*sh*
The ones with the same file size should be the same binary (if not a symbolic link).

Quote:

Originally Posted by tladd (Post 469540)
I could not find where your scripts (getGcc etc.) parsed input arguments. I thought they just took the hard wired settings. I am a beginner with bash (just switched from csh) so I am obviously overlooking how you do that.

The scripts use the same parsing mechanism as from the ones they originated from, namely from OpenFOAM's makeGcc. The code in specific starts with this comment:
Code:

# parse options
As for being new to bash: have a look into the whole wiki page and the links given there: http://openfoamwiki.net/index.php/In...with_the_Shell - the most important regarding bash is this one: http://linuxcommand.org/learning_the_shell.php

Nonetheless, OpenFOAM is also able to use csh; the wiki instructions don't mention it, because ... well, I wrote most of the latest wiki instructions on how to install OpenFOAM and I only extremely rarely use csh. If you scroll down to the section "Setting environment variables for alternative locations" on the official instructions: http://www.openfoam.org/download/source.php - you'll find information about how to use csh/tcsh.


Quote:

Originally Posted by tladd (Post 469540)
I think MPI was loading correctly - the error in the log file was an include:

Code:

413 wmake libso ptscotchDecomp
 414 SOURCE=ptscotchDecomp.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3  -DNoRepository -ftemplate-depth-100 -DOMPI_SKIP_MPICXX -I/usr/include/openmpi-x86_64 -pthread -I/include -I/global/usr/apps/OpenFOAM/ThirdParty-2.2.2/platforms/linux64Gcc45/scotch_6.0.0/include/openmpi-system -I/usr/include/scotch -I../decompositionMethods/lnInclude -IlnInclude -I. -I/global/usr/apps/OpenFOAM/OpenFOAM-2.2.2/src/OpenFOAM/lnInclude -I/global/usr/apps/OpenFOAM/OpenFOAM-2.2.2/src/OSspecific/POSIX/lnInclude  -fPIC -c $SOURCE -o Make/linux64Gcc45DPOptSYSTEMOPENMPI/ptscotchDecomp.o
415 ptscotchDecomp.C:126:22: fatal error: ptscotch.h: No such file or directory
416 compilation terminated.
417 make: *** [Make/linux64Gcc45DPOptSYSTEMOPENMPI/ptscotchDecomp.o] Error 1


The log file tells a whole other story:
Code:

/global/usr/apps/OpenFOAM/ThirdParty-2.2.2/platforms/linux64/gcc-4.5.2/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../x86_64-unknown-linux-gnu/bin/ld: cannot find -lmpi
collect2: ld returned 1 exit status
make[2]: *** [ptdummysizes] Error 1

It says it cannot find the library file "libmpi.so" (it's what "-lmpi" stands for).

The same issue a few lines lower:
Code:

wmake libso mpi
/global/usr/apps/OpenFOAM/ThirdParty-2.2.2/platforms/linux64/gcc-4.5.2/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../x86_64-unknown-linux-gnu/bin/ld: cannot find -lmpi
collect2: ld returned 1 exit status
make: *** [/global/usr/apps/OpenFOAM/OpenFOAM-2.2.2/platforms/linux64Gcc45DPOpt/lib/openmpi-system/libPstream.so] Error 1

Only a bit lower than that does it give the error you've given above.

To check what exact MPI definitions are in place, run:
Code:

echo $MPI_ARCH_PATH
ls -l $MPI_ARCH_PATH/lib/lib*mpi*

The first command indicates the path defined by the file "etc/config/settings.sh" and the second line lists the known files that are named "lib*mpi*".

Best regards,
Bruno

tladd January 11, 2014 16:27

Bruno

I see my mistake now. I had not realized the WM_xxx definitions were inputs to bashrc - stupid of me. I have a hard time with instructions I don't understand. Sorry to take your time on something trivial, but I have learnt a lot about how the OpenFOAM environment works.

Thanks again

Tony

tladd January 13, 2014 12:45

Install scripts for Centos 6
 
1 Attachment(s)
Bruno

Thanks again for your help over the weekend. I can now compile smoothly, at least with Gcc45. I tried with Gcc47 but the cmake compilation seemed to crash. I might take another look at that if I have some spare time.

I made some scripts which are wrappers around your scripts; it just implements your webpage. But it makes it a bit easier to update versions and so on. They may be useful to someone. It assumes a SCRIPTS directory where the install scripts and your scripts live and a downloads directory where the OpenFOAM tarballs live. I made it go in stages so there can be some manual intervention (makes debugging easier too) but I can make a clean install (under centos 6.5) by running install with yes 1 2 3 4.

Tony

wyldckat January 13, 2014 16:28

Hi Tony,

Thanks for sharing! I've added a link to your post on the wiki page: http://openfoamwiki.net/index.php/In...HEL#CentOS_6.4

Personally I did work on scripts that automated the installation of OpenFOAM on Ubuntu and then also began adding more Linux Distributions, but it became counter-productive, since the scripts had to be tested countless times... the project was this one: http://code.google.com/p/nucleation/

The conclusion I got from it is that it made a whole lot more sense to simply write the instructions on the wiki and do the adjustments only a few of times on-a-need-basis.
And on top of that, it trains people a bit to look more closely how things are actually done and how to follow instructions... for a very picky development environment ;)


By the way, on the topic of scripts for CentOS/RHEL, there is also CentFOAM: http://sourceforge.net/apps/mediawik...itle=Main_Page

Best regards,
Bruno

tladd January 13, 2014 17:43

Bruno

I agree with you. I think someone new to this should definitely work through your web page first. As you say it is a sophisticated and difficult environment, which I am only just beginning to understand. I have been blown away by the structure and coding of OpenFOAM; I think its an amazing intellectual effort. I learnt programming about 40 years ago and it was nothing like this.

Best

Tony

tladd January 17, 2014 17:25

Compiling OpenFOAM - update with gcc 4.7
 
1 Attachment(s)
I have tried compiling OpenFOAM using gcc 4.7.2; I thought that there may be a performance improvement over 4.5.2. However gcc 4.7.2 fails to compile cmake no matter what version (of cmake) I try.

The other packages were:
gmp-5.0.4, mpc-0.9, mpfr-3.1.0 (from settings.sh), binutils-2.23.2 and the latest cmake-2.8.12.1 (2.8.3 fails to build as well)

The error log has:

/global/usr/apps/OpenFOAM47/ThirdParty-2.2.2/platforms/linux64/gcc-4.7.2/lib/gcc/x86_64-unknown-linux-gnu/4.7.2/../../../../x86_64-unknown-linux-gnu/bin/ld: CMakeFiles/ccmake.dir/CursesDialog/cmCursesMainForm.cxx.o: undefined reference to symbol 'keypad'
/global/usr/apps/OpenFOAM47/ThirdParty-2.2.2/platforms/linux64/gcc-4.7.2/lib/gcc/x86_64-unknown-linux-gnu/4.7.2/../../../../x86_64-unknown-linux-gnu/bin/ld: note: 'keypad' is defined in DSO /lib64/libtinfo.so.5 so try adding it to the linker command line
/lib64/libtinfo.so.5: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status

This is a known issue with cmake and gcc 4.7 (for example http://nerdanswer.com/answer.php?q=222739) but there does not seem to be a solution. I tried adding /lib64 to LD_LIBRARY_PATH but it did not help (neither before or after the OpenFOAM libraries). It also seems to be OS dependent. The compatibility wiki (http://openfoamwiki.net/index.php/In...ibility_Matrix) suggests that it should work.

Tony

PS: here is an update to getCmake which allows you to input the version number (as in Bruno's other scripts). Its a copy of getBinutils modified for the cmake source tree.

wyldckat January 18, 2014 11:20

Hi Tony,

Quote:

Originally Posted by tladd (Post 470562)
I have tried compiling OpenFOAM using gcc 4.7.2; I thought that there may be a performance improvement over 4.5.2. However gcc 4.7.2 fails to compile cmake no matter what version (of cmake) I try.

One simple trick is to copy-paste the build of CMake from the other installation, by copying from the folder "ThirdParty-2.2.2/platforms/linux64Gcc45/cmake-2.8.3" to "ThirdParty-2.2.2/platforms/linux64Gcc47/cmake-2.8.3".

Quote:

Originally Posted by tladd (Post 470562)
The compatibility wiki (http://openfoamwiki.net/index.php/In...ibility_Matrix) suggests that it should work.

The "Compatibility Matrix" page only refers to OpenFOAM itself ;).

But I'll have a quick look into this later today.

Best regards,
Bruno

wyldckat January 18, 2014 13:58

Hi Tony,

What I've done differently from you was to use gcc 4.7.3 and binutils 2.23 on CentOS 6.5, and CMake 2.8.3 built without any problems.

Then I tried switching only to gcc 4.7.2... and it also built CMake 2.8.3 without any problems.

Honestly, I suggest that you try another "binutils" version and package. From my experience, the "binutils" packages can have a somewhat unstable nature... bz2 files are usually the most unstable ones. I don't know why it is, all I know is that when I switch versions or packages, I can build things with one version, but not the other.

And don't forget to use:
Code:

wmSET $FOAM_SETTINGS
to refresh the shell environment, after gcc or binutils have been built.

Best regards,
Bruno

tladd January 19, 2014 14:36

Yes - it works for me too
 
Bruno

I found the combination of gcc-4.7.3, binutils-2.23 and cmake-2.8.3 compiled just fine. I agree that it is most likely the binutils - perhaps something broken in the loader with RHEL; but I would not have guessed it.

Thanks Again

Tony

tladd January 21, 2014 18:32

Follow up to gcc 4.7.2
 
Bruno

I made some more tests of the build of cmake. Here is what I found with
gmp-5.0.4 mpc-0.9 mpfr-3.1.0 in each case

gcc cmake binutils Build?
4.7.2 2.8.12.1 2.23 No
4.7.2 2.8.3 2.23 No
4.7.2 2.8.3 2.22 No
4.7.3 2.8.3 2.23 Yes
4.7.3 2.8.4 2.23.2 Yes
4.7.3 2.8.12.1 2.23 Yes
4.7.3 2.8.12.1 2.23.2 Yes

So for me everything I tried with 4.7.3 worked while everything with 4.7.2 failed. So I do not understand your magic touch that enabled a build with 4.7.2 - unless the build you thought was 4.7.2 was in fact 4.7.3.

In any case I am OK at this point - I have built a number of working versions of OpenFOAM - I just need to edit settings.sh to change 4.7.2 to 4.7.3.

Azraf February 3, 2014 02:13

Error in executing ./Allwmake during OpenFOAM 2.2.2 installation
 
Dear all,
I am new to OpenFOAM and Linux. Currently I am trying to install OpenFOAM in CentOS 6.5 for i686 machine. I followed the instructions from http://openfoamwiki.net/index.php/In...CentOS_SL_RHEL but encountered some problem at no 13 instruction which is ./Allwmake. Please advise. sorry for the inconvenience because it is quite long.

the error as below:

Code:

[CFD@azraf PV3Readers]$ ./Allwmake
wmakeLnInclude: linking include files to ./lnInclude
Making dependency list for source file vtkPV3Readers.C
SOURCE=vtkPV3Readers.C ;  g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3  -DNoRepository -ftemplate-depth-100 -I/home/CFD/OpenFOAM/ThirdParty-2.2.2/platforms/linuxGcc/paraview-3.12.0/include/paraview-3.12 -IlnInclude -I. -I/home/CFD/OpenFOAM/OpenFOAM-2.2.2/src/OpenFOAM/lnInclude -I/home/CFD/OpenFOAM/OpenFOAM-2.2.2/src/OSspecific/POSIX/lnInclude  -fPIC -c $SOURCE -o Make/linuxGccDPOpt/vtkPV3Readers.o
'/home/CFD/OpenFOAM/OpenFOAM-2.2.2/platforms/linuxGccDPOpt/lib/libvtkPV3Readers.so' is up to date.
+ '[' -d /home/CFD/OpenFOAM/ThirdParty-2.2.2/platforms/linuxGcc/paraview-3.12.0 -a -r /home/CFD/OpenFOAM/ThirdParty-2.2.2/platforms/linuxGcc/paraview-3.12.0 ']'
+ wmake libso vtkPV3blockMesh
wmakeLnInclude: linking include files to ./lnInclude
Making dependency list for source file vtkPV3blockMesh.C
Making dependency list for source file vtkPV3blockMeshConvert.C
Making dependency list for source file vtkPV3blockMeshUtils.C
SOURCE=vtkPV3blockMesh.C ;  g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3  -DNoRepository -ftemplate-depth-100 -I/home/CFD/OpenFOAM/OpenFOAM-2.2.2/src/meshTools/lnInclude -I/home/CFD/OpenFOAM/OpenFOAM-2.2.2/src/mesh/blockMesh/lnInclude -I/home/CFD/OpenFOAM/ThirdParty-2.2.2/platforms/linuxGcc/paraview-3.12.0/include/paraview-3.12 -I../../vtkPV3Readers/lnInclude -I../PV3blockMeshReader -IlnInclude -I. -I/home/CFD/OpenFOAM/OpenFOAM-2.2.2/src/OpenFOAM/lnInclude -I/home/CFD/OpenFOAM/OpenFOAM-2.2.2/src/OSspecific/POSIX/lnInclude  -fPIC -c $SOURCE -o Make/linuxGccDPOpt/vtkPV3blockMesh.o
SOURCE=vtkPV3blockMeshConvert.C ;  g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3  -DNoRepository -ftemplate-depth-100 -I/home/CFD/OpenFOAM/OpenFOAM-2.2.2/src/meshTools/lnInclude -I/home/CFD/OpenFOAM/OpenFOAM-2.2.2/src/mesh/blockMesh/lnInclude -I/home/CFD/OpenFOAM/ThirdParty-2.2.2/platforms/linuxGcc/paraview-3.12.0/include/paraview-3.12 -I../../vtkPV3Readers/lnInclude -I../PV3blockMeshReader -IlnInclude -I. -I/home/CFD/OpenFOAM/OpenFOAM-2.2.2/src/OpenFOAM/lnInclude -I/home/CFD/OpenFOAM/OpenFOAM-2.2.2/src/OSspecific/POSIX/lnInclude  -fPIC -c $SOURCE -o Make/linuxGccDPOpt/vtkPV3blockMeshConvert.o
SOURCE=vtkPV3blockMeshUtils.C ;  g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3  -DNoRepository -ftemplate-depth-100 -I/home/CFD/OpenFOAM/OpenFOAM-2.2.2/src/meshTools/lnInclude -I/home/CFD/OpenFOAM/OpenFOAM-2.2.2/src/mesh/blockMesh/lnInclude -I/home/CFD/OpenFOAM/ThirdParty-2.2.2/platforms/linuxGcc/paraview-3.12.0/include/paraview-3.12 -I../../vtkPV3Readers/lnInclude -I../PV3blockMeshReader -IlnInclude -I. -I/home/CFD/OpenFOAM/OpenFOAM-2.2.2/src/OpenFOAM/lnInclude -I/home/CFD/OpenFOAM/OpenFOAM-2.2.2/src/OSspecific/POSIX/lnInclude  -fPIC -c $SOURCE -o Make/linuxGccDPOpt/vtkPV3blockMeshUtils.o
/usr/bin/ld: cannot find -lblockMesh
collect2: ld returned 1 exit status
make: *** [/home/CFD/OpenFOAM/OpenFOAM-2.2.2/platforms/linuxGccDPOpt/lib/libvtkPV3blockMesh.so] Error 1
+ cd PV3blockMeshReader
+ mkdir -p Make/linuxGccDPOpt
+ cd Make/linuxGccDPOpt
+ cmake ../..
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Loading ParaView CMake commands
-- Loading ParaView CMake commands - done
CMake Error at CMakeLists.txt:43 (QT4_WRAP_CPP):
  Unknown CMake command "QT4_WRAP_CPP".


-- Configuring incomplete, errors occurred!
+ make
make: *** No targets specified and no makefile found.  Stop.
+ '[' -d /home/CFD/OpenFOAM/ThirdParty-2.2.2/platforms/linuxGcc/paraview-3.12.0 -a -r /home/CFD/OpenFOAM/ThirdParty-2.2.2/platforms/linuxGcc/paraview-3.12.0 ']'
+ wmake libso vtkPV3Foam
wmakeLnInclude: linking include files to ./lnInclude
Making dependency list for source file vtkPV3Foam.C
Making dependency list for source file vtkPV3FoamFields.C
Making dependency list for source file vtkPV3FoamMesh.C
Making dependency list for source file vtkPV3FoamMeshLagrangian.C
Making dependency list for source file vtkPV3FoamMeshSet.C
Making dependency list for source file vtkPV3FoamMeshVolume.C
Making dependency list for source file vtkPV3FoamMeshZone.C
Making dependency list for source file vtkPV3FoamUpdateInfo.C
Making dependency list for source file vtkPV3FoamUtils.C
SOURCE=vtkPV3Foam.C ;  g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3  -DNoRepository -ftemplate-depth-100 -I/home/CFD/OpenFOAM/OpenFOAM-2.2.2/src/meshTools/lnInclude -I/home/CFD/OpenFOAM/OpenFOAM-2.2.2/src/finiteVolume/lnInclude -I/home/CFD/OpenFOAM/OpenFOAM-2.2.2/src/lagrangian/basic/lnInclude -I../../vtkPV3Readers/lnInclude -I../PV3FoamReader -I/home/CFD/OpenFOAM/ThirdParty-2.2.2/platforms/linuxGcc/paraview-3.12.0/include/paraview-3.12 -DHAS_VTK_POLYHEDRON -IlnInclude -I. -I/home/CFD/OpenFOAM/OpenFOAM-2.2.2/src/OpenFOAM/lnInclude -I/home/CFD/OpenFOAM/OpenFOAM-2.2.2/src/OSspecific/POSIX/lnInclude  -fPIC -c $SOURCE -o Make/linuxGccDPOpt/vtkPV3Foam.o
SOURCE=vtkPV3FoamFields.C ;  g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3  -DNoRepository -ftemplate-depth-100 -I/home/CFD/OpenFOAM/OpenFOAM-2.2.2/src/meshTools/lnInclude -I/home/CFD/OpenFOAM/OpenFOAM-2.2.2/src/finiteVolume/lnInclude -I/home/CFD/OpenFOAM/OpenFOAM-2.2.2/src/lagrangian/basic/lnInclude -I../../vtkPV3Readers/lnInclude -I../PV3FoamReader -I/home/CFD/OpenFOAM/ThirdParty-2.2.2/platforms/linuxGcc/paraview-3.12.0/include/paraview-3.12 -DHAS_VTK_POLYHEDRON -IlnInclude -I. -I/home/CFD/OpenFOAM/OpenFOAM-2.2.2/src/OpenFOAM/lnInclude -I/home/CFD/OpenFOAM/OpenFOAM-2.2.2/src/OSspecific/POSIX/lnInclude  -fPIC -c $SOURCE -o Make/linuxGccDPOpt/vtkPV3FoamFields.o
SOURCE=vtkPV3FoamMesh.C ;  g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3  -DNoRepository -ftemplate-depth-100 -I/home/CFD/OpenFOAM/OpenFOAM-2.2.2/src/meshTools/lnInclude -I/home/CFD/OpenFOAM/OpenFOAM-2.2.2/src/finiteVolume/lnInclude -I/home/CFD/OpenFOAM/OpenFOAM-2.2.2/src/lagrangian/basic/lnInclude -I../../vtkPV3Readers/lnInclude -I../PV3FoamReader -I/home/CFD/OpenFOAM/ThirdParty-2.2.2/platforms/linuxGcc/paraview-3.12.0/include/paraview-3.12 -DHAS_VTK_POLYHEDRON -IlnInclude -I. -I/home/CFD/OpenFOAM/OpenFOAM-2.2.2/src/OpenFOAM/lnInclude -I/home/CFD/OpenFOAM/OpenFOAM-2.2.2/src/OSspecific/POSIX/lnInclude  -fPIC -c $SOURCE -o Make/linuxGccDPOpt/vtkPV3FoamMesh.o
SOURCE=vtkPV3FoamMeshLagrangian.C ;  g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3  -DNoRepository -ftemplate-depth-100 -I/home/CFD/OpenFOAM/OpenFOAM-2.2.2/src/meshTools/lnInclude -I/home/CFD/OpenFOAM/OpenFOAM-2.2.2/src/finiteVolume/lnInclude -I/home/CFD/OpenFOAM/OpenFOAM-2.2.2/src/lagrangian/basic/lnInclude -I../../vtkPV3Readers/lnInclude -I../PV3FoamReader -I/home/CFD/OpenFOAM/ThirdParty-2.2.2/platforms/linuxGcc/paraview-3.12.0/include/paraview-3.12 -DHAS_VTK_POLYHEDRON -IlnInclude -I. -I/home/CFD/OpenFOAM/OpenFOAM-2.2.2/src/OpenFOAM/lnInclude -I/home/CFD/OpenFOAM/OpenFOAM-2.2.2/src/OSspecific/POSIX/lnInclude  -fPIC -c $SOURCE -o Make/linuxGccDPOpt/vtkPV3FoamMeshLagrangian.o
SOURCE=vtkPV3FoamMeshSet.C ;  g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3  -DNoRepository -ftemplate-depth-100 -I/home/CFD/OpenFOAM/OpenFOAM-2.2.2/src/meshTools/lnInclude -I/home/CFD/OpenFOAM/OpenFOAM-2.2.2/src/finiteVolume/lnInclude -I/home/CFD/OpenFOAM/OpenFOAM-2.2.2/src/lagrangian/basic/lnInclude -I../../vtkPV3Readers/lnInclude -I../PV3FoamReader -I/home/CFD/OpenFOAM/ThirdParty-2.2.2/platforms/linuxGcc/paraview-3.12.0/include/paraview-3.12 -DHAS_VTK_POLYHEDRON -IlnInclude -I. -I/home/CFD/OpenFOAM/OpenFOAM-2.2.2/src/OpenFOAM/lnInclude -I/home/CFD/OpenFOAM/OpenFOAM-2.2.2/src/OSspecific/POSIX/lnInclude  -fPIC -c $SOURCE -o Make/linuxGccDPOpt/vtkPV3FoamMeshSet.o
SOURCE=vtkPV3FoamMeshVolume.C ;  g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3  -DNoRepository -ftemplate-depth-100 -I/home/CFD/OpenFOAM/OpenFOAM-2.2.2/src/meshTools/lnInclude -I/home/CFD/OpenFOAM/OpenFOAM-2.2.2/src/finiteVolume/lnInclude -I/home/CFD/OpenFOAM/OpenFOAM-2.2.2/src/lagrangian/basic/lnInclude -I../../vtkPV3Readers/lnInclude -I../PV3FoamReader -I/home/CFD/OpenFOAM/ThirdParty-2.2.2/platforms/linuxGcc/paraview-3.12.0/include/paraview-3.12 -DHAS_VTK_POLYHEDRON -IlnInclude -I. -I/home/CFD/OpenFOAM/OpenFOAM-2.2.2/src/OpenFOAM/lnInclude -I/home/CFD/OpenFOAM/OpenFOAM-2.2.2/src/OSspecific/POSIX/lnInclude  -fPIC -c $SOURCE -o Make/linuxGccDPOpt/vtkPV3FoamMeshVolume.o
SOURCE=vtkPV3FoamMeshZone.C ;  g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3  -DNoRepository -ftemplate-depth-100 -I/home/CFD/OpenFOAM/OpenFOAM-2.2.2/src/meshTools/lnInclude -I/home/CFD/OpenFOAM/OpenFOAM-2.2.2/src/finiteVolume/lnInclude -I/home/CFD/OpenFOAM/OpenFOAM-2.2.2/src/lagrangian/basic/lnInclude -I../../vtkPV3Readers/lnInclude -I../PV3FoamReader -I/home/CFD/OpenFOAM/ThirdParty-2.2.2/platforms/linuxGcc/paraview-3.12.0/include/paraview-3.12 -DHAS_VTK_POLYHEDRON -IlnInclude -I. -I/home/CFD/OpenFOAM/OpenFOAM-2.2.2/src/OpenFOAM/lnInclude -I/home/CFD/OpenFOAM/OpenFOAM-2.2.2/src/OSspecific/POSIX/lnInclude  -fPIC -c $SOURCE -o Make/linuxGccDPOpt/vtkPV3FoamMeshZone.o
SOURCE=vtkPV3FoamUpdateInfo.C ;  g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3  -DNoRepository -ftemplate-depth-100 -I/home/CFD/OpenFOAM/OpenFOAM-2.2.2/src/meshTools/lnInclude -I/home/CFD/OpenFOAM/OpenFOAM-2.2.2/src/finiteVolume/lnInclude -I/home/CFD/OpenFOAM/OpenFOAM-2.2.2/src/lagrangian/basic/lnInclude -I../../vtkPV3Readers/lnInclude -I../PV3FoamReader -I/home/CFD/OpenFOAM/ThirdParty-2.2.2/platforms/linuxGcc/paraview-3.12.0/include/paraview-3.12 -DHAS_VTK_POLYHEDRON -IlnInclude -I. -I/home/CFD/OpenFOAM/OpenFOAM-2.2.2/src/OpenFOAM/lnInclude -I/home/CFD/OpenFOAM/OpenFOAM-2.2.2/src/OSspecific/POSIX/lnInclude  -fPIC -c $SOURCE -o Make/linuxGccDPOpt/vtkPV3FoamUpdateInfo.o
SOURCE=vtkPV3FoamUtils.C ;  g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3  -DNoRepository -ftemplate-depth-100 -I/home/CFD/OpenFOAM/OpenFOAM-2.2.2/src/meshTools/lnInclude -I/home/CFD/OpenFOAM/OpenFOAM-2.2.2/src/finiteVolume/lnInclude -I/home/CFD/OpenFOAM/OpenFOAM-2.2.2/src/lagrangian/basic/lnInclude -I../../vtkPV3Readers/lnInclude -I../PV3FoamReader -I/home/CFD/OpenFOAM/ThirdParty-2.2.2/platforms/linuxGcc/paraview-3.12.0/include/paraview-3.12 -DHAS_VTK_POLYHEDRON -IlnInclude -I. -I/home/CFD/OpenFOAM/OpenFOAM-2.2.2/src/OpenFOAM/lnInclude -I/home/CFD/OpenFOAM/OpenFOAM-2.2.2/src/OSspecific/POSIX/lnInclude  -fPIC -c $SOURCE -o Make/linuxGccDPOpt/vtkPV3FoamUtils.o
/usr/bin/ld: cannot find -lfiniteVolume
collect2: ld returned 1 exit status
make: *** [/home/CFD/OpenFOAM/OpenFOAM-2.2.2/platforms/linuxGccDPOpt/lib/libvtkPV3Foam.so] Error 1
+ cd PV3FoamReader
+ mkdir -p Make/linuxGccDPOpt
+ cd Make/linuxGccDPOpt
+ cmake ../..
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Loading ParaView CMake commands
-- Loading ParaView CMake commands - done
CMake Error at CMakeLists.txt:44 (QT4_WRAP_CPP):
  Unknown CMake command "QT4_WRAP_CPP".


-- Configuring incomplete, errors occurred!
+ make
make: *** No targets specified and no makefile found.  Stop.
[CFD@azraf PV3Readers]$


tladd February 3, 2014 08:38

I am not an expert in this, but the first complaint is that it cannot find libblockMesh.so. It should be in OpenFOAM-2.2.2/platforms/linux64Gcc45DPOpt/lib or similar. If not you need to check for errors in the build of OpenFOAM itself perhaps.

Tony

wyldckat February 4, 2014 14:59

Greetings to all!

@Azraf: Tony is correct. There seems to have been bigger problems while building OpenFOAM itself.
Please follow the instructions in step #11.

Best regards,
Bruno

mmmn036 February 12, 2014 18:57

CMake build error
 
1 Attachment(s)
Hello,

I was installing OpenFOAM 2.2.2 and paraview on Centos6.4 by followng the instruction of-http://openfoamwiki.net/index.php/Installation/Linux/OpenFOAM-2.2.2/CentOS_SL_RHEL#CentOS_6.4 .

OpenFoam installation was successful and it runs cases with parallel, but I got error when I was building CMake 2.8.3.

I look into the log files and didn't see any error until step no. 12.

I attached the error in log file. Would anyone please help me out.

Thanks

tladd February 12, 2014 23:37

The log file seemed empty when I tried to read it. I think it should be larger than 183 bytes.

Tony

mmmn036 February 13, 2014 13:47

1 Attachment(s)
Sorry about empty file. here I updated the log file.

tladd February 13, 2014 15:06

Manjura

I had a similar error but not with gcc-4.5.2. I found that gcc-4.7.2 crashed on building cmake in the same way as in your log files with the "keypad" error. I found that switching to 4.7.3 worked fine. In post 22 I report builds that worked and those that did not.

However Bruno Santos, who is much more experienced than me, got a 4.7.2 build to work so I am not sure exactly what is wrong.

I would suggest

1) You go over the instructions for the build of cmake and make sure you are following them exactly.
2) Are you using binutils-2.20.1 as the instructions recommend. Bruno says this can make a difference.
3) Try with different version of gcc - e.g. 4.7.3. (see post 22)
4) I compared your log file with my successful build of cmake-2.8.3 with gcc-4.5.2. The first difference was on line 192
193,195c193,195
< -- Looking for idna_to_ascii_lz in idn;dl - not found
< -- Looking for dlopen in dl
< -- Looking for dlopen in dl - found
---
> -- Looking for idna_to_ascii_lz in idn;dl - found
> -- Looking for dlopen in dl;idn
> -- Looking for dlopen in dl;idn - found

There is this thing "idna_to_ascii_lz in idn;dl" which my log reports as found and yours says not found. No idea why, but this may give you a place to start.

Good luck

Tony

mmmn036 February 13, 2014 18:57

Thanks Tony for your reply.

The binutils version is 2.23. Is that may cause any problem?

Thanks

tladd February 13, 2014 19:15

Possibly - do try 2.20.1 and post the result.

Tony

mmmn036 February 13, 2014 19:48

oh...yes....it is binutils version that gives me the error.
binutils 2.20.1 is good to build cmake 2.8.3.

Thanks a lot for helping me out. Now I will build paraview.

Manjura

jpierce February 13, 2014 22:13

Maybe late to the party, but I found this page while searching for that particular error in building cmake. I was running gcc-4.7.2 and binutils-2.22. After compiling binutils-2.24 and rebuilding cmake, I still had the same error.

In the end, editing $CMAKE_BUILD/Source/CMakeFiles/ccmake.dir/link.txt and adding "-ltinfo" to the end of the line fixed the issue. Went back and tested with binutils-2.22 using a fresh build directory, and I was able to complete the build using that, as well.

All this might not be necessary on RH5-based distributions. I believe (but could be wrong) that they modified DSO linking between majors so you have to be a little more explicit now.

[edit]: Someone on the kbuild mailing list arrived at the same conclusion/solution for that project: https://groups.google.com/forum/#!to...el/0AMWriDGc8g

wyldckat February 15, 2014 17:27

Greetings Jonathan and welcome to the forum!

And many thanks for sharing this information about building CMake!
I just have a couple of questions, just to confirm the situation, so that I can try and reproduce the same issue:
  1. Which Linux Distribution did you use?
  2. What does this command give you, when the OpenFOAM shell environment is ready to be used:
    Code:

    ld --version
Best regards,
Bruno

jpierce February 24, 2014 14:06

  1. This is in CentOS 6.3 (stock, no updates applied). For the purposes of cmake, there shouldn't be much difference between that and v6.4, which mmmn036 was having issues with.
  2. To be quite honest, I'm not an OpenFOAM user. (I work in Neuroimaging and was compiling the pre-requisites for Gadgetron.) This post just happened to be the first result in several related Google searches. I'm not using the binutils package that comes with the distro; I have custom builds in /usr/local. The output is probably just about what you would expect. For v2.22:
    Code:

    GNU ld (GNU Binutils) 2.22
    Copyright 2011 Free Software Foundation, Inc.
    This program is free software; you may redistribute it under the terms of
    the GNU General Public License version 3 or (at your option) a later version.
    This program has absolutely no warranty.

    and for v2.24:
    Code:

    GNU ld (GNU Binutils) 2.24
    Copyright 2013 Free Software Foundation, Inc.
    This program is free software; you may redistribute it under the terms of
    the GNU General Public License version 3 or (at your option) a later version.
    This program has absolutely no warranty.



All times are GMT -4. The time now is 16:28.