CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   OpenFOAM-2.1.x on fedora 16 x86_64 (https://www.cfd-online.com/Forums/openfoam-installation/95618-openfoam-2-1-x-fedora-16-x86_64-a.html)

anand_30 December 25, 2011 11:53

OpenFOAM-2.1.x on fedora 16 x86_64
 
Hi,I am trying to compile the sources of OpenFOAM obtained from git repo.
I am new to this fedora 16 environment,so getting lots of errors in installation.

I have sources at /opt/OpenFOAM/ .
I am installing as root,I followed complete steps provided by openfoam-git page,also got help from this page http://www.cfd-online.com/Forums/openfoam/94671-openfoam-2-0-x-fedora-16-64-bit.html

output of foamInstallationTest is as follows:-
Code:

Executing /opt/OpenFOAM/OpenFOAM-2.1.x/bin/foamInstallationTest:


Checking basic setup...
-------------------------------------------------------------------------------
Shell:              bash
Host:              fedora.lotus
OS:                Linux version 3.1.6-1.fc16.x86_64
-------------------------------------------------------------------------------


Checking main OpenFOAM env variables...
-------------------------------------------------------------------------------
Environment_variable Set_to_file_or_directory                Valid      Crit
-------------------------------------------------------------------------------
$WM_PROJECT_INST_DIR /opt/OpenFOAM                            yes      yes
$WM_PROJECT_USER_DIR /home/anand/OpenFOAM/anand-2.1.x        yes      no
$WM_THIRD_PARTY_DIR  /opt/OpenFOAM/ThirdParty-2.1.x          yes      yes
-------------------------------------------------------------------------------


Checking the OpenFOAM env variables set on the PATH...
-------------------------------------------------------------------------------
Environment_variable Set_to_file_or_directory                Valid Path Crit
-------------------------------------------------------------------------------
$WM_PROJECT_DIR      /opt/OpenFOAM/OpenFOAM-2.1.x            yes  yes  yes

$FOAM_APPBIN        ...-2.1.x/platforms/linux64GccDPOpt/bin  yes  yes  yes
$FOAM_SITE_APPBIN    .../2.1.x/platforms/linux64GccDPOpt/bin  no        no
$FOAM_USER_APPBIN    ...-2.1.x/platforms/linux64GccDPOpt/bin  no        no
$WM_DIR              /opt/OpenFOAM/OpenFOAM-2.1.x/wmake      yes  yes  yes
-------------------------------------------------------------------------------


Checking the OpenFOAM env variables set on the LD_LIBRARY_PATH...
-------------------------------------------------------------------------------
Environment_variable Set_to_file_or_directory                Valid Path Crit
-------------------------------------------------------------------------------
$FOAM_LIBBIN        ...-2.1.x/platforms/linux64GccDPOpt/lib  yes  no  yes
$FOAM_SITE_LIBBIN    .../2.1.x/platforms/linux64GccDPOpt/lib  no        no
$FOAM_USER_LIBBIN    ...-2.1.x/platforms/linux64GccDPOpt/lib  no        no
$MPI_ARCH_PATH      ...x/platforms/linux64Gcc/openmpi-1.5.3  no        yes
-------------------------------------------------------------------------------


Third party software
-------------------------------------------------------------------------------
Software Version  Location
-------------------------------------------------------------------------------
flex    2.5.35    /usr/bin/flex                                           
gcc      4.6.2    /usr/lib64/ccache/gcc                                   
gzip    1.4      /usr/bin/gzip                                           
tar      1.26      /bin/tar                                               
icoFoam         
WARNING:  Conflicting installations:
          OpenFOAM settings        : /opt/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/bin/icoFoam
          current path            :
          CRITICAL ERROR

-------------------------------------------------------------------------------


Summary
-------------------------------------------------------------------------------
Base configuration ok.
The foam installation contains 1 critical error(s).

Review the output for warning messages and consult
the installation guide for troubleshooting.

Done

Sorry forgot to make log file so the last output is

Code:

(.text._ZN4Foam8fvMatrixIdE5relaxEd[Foam::fvMatrix<double>::relax(double)]+0x5a4): undefined reference to `Foam::reduce(double&, Foam::sumOp<double> const&, int)'
Make/linux64GccDPOpt/twoPhaseEulerFoam.o: In function `Foam::fvMatrix<Foam::Vector<double> >::relax(double)':
twoPhaseEulerFoam.C:(.text._ZN4Foam8fvMatrixINS_6VectorIdEEE5relaxEd[Foam::fvMatrix<Foam::Vector<double> >::relax(double)]+0x854): undefined reference to `Foam::reduce(double&, Foam::sumOp<double> const&, int)'
Make/linux64GccDPOpt/twoPhaseEulerFoam.o: In function `Foam::GeometricField<Foam::SymmTensor<double>, Foam::fvPatchField, Foam::volMesh>::GeometricBoundaryField::evaluate()':
twoPhaseEulerFoam.C:(.text._ZN4Foam14GeometricFieldINS_10SymmTensorIdEENS_12fvPatchFieldENS_7volMeshEE22GeometricBoundaryField8evaluateEv[Foam::GeometricField<Foam::SymmTensor<double>, Foam::fvPatchField, Foam::volMesh>::GeometricBoundaryField::evaluate()]+0xf1): undefined reference to `Foam::UPstream::nRequests()'
twoPhaseEulerFoam.C:(.text._ZN4Foam14GeometricFieldINS_10SymmTensorIdEENS_12fvPatchFieldENS_7volMeshEE22GeometricBoundaryField8evaluateEv[Foam::GeometricField<Foam::SymmTensor<double>, Foam::fvPatchField, Foam::volMesh>::GeometricBoundaryField::evaluate()]+0x24f): undefined reference to `Foam::UPstream::waitRequests(int)'
/opt/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/libmeshTools.so: undefined reference to `Foam::triSurface::triSurface(Foam::fileName const&)'
/opt/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/libmeshTools.so: undefined reference to `Foam::triSurface::triSurface()'
/opt/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/libOpenFOAM.so: undefined reference to `Foam::UIPstream::UIPstream(Foam::UPstream::commsTypes, int, Foam::DynamicList<char, 0u, 2u, 1u>&, int&, int, bool, Foam::IOstream::streamFormat, Foam::IOstream::versionNumber)'
/opt/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/libmeshTools.so: undefined reference to `Foam::triSurface::scalePoints(double)'
/opt/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/libmeshTools.so: undefined reference to `Foam::triSurface::triSurface(Foam::fileName const&)'
/opt/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/libOpenFOAM.so: undefined reference to `Foam::UPstream::abort()'
/opt/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/libmeshTools.so: undefined reference to `Foam::geometricSurfacePatch::operator==(Foam::geometricSurfacePatch const&) const'
/opt/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/libmeshTools.so: undefined reference to `Foam::triSurface::subsetMesh(Foam::List<bool> const&, Foam::List<int>&, Foam::List<int>&) const'
/opt/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/libmeshTools.so: undefined reference to `Foam::triSurface::edgeOwner() const'
/opt/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/libmeshTools.so: undefined reference to `Foam::triSurface::triSurface(Foam::List<Foam::labelledTri> const&, Foam::List<Foam::geometricSurfacePatch> const&, Foam::Field<Foam::Vector<double> > const&)'
/opt/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/libOpenFOAM.so: undefined reference to `Foam::UPstream::init(int&, char**&)'
/opt/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/libmeshTools.so: undefined reference to `Foam::geometricSurfacePatch::geometricSurfacePatch()'
/opt/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/libfiniteVolume.so: undefined reference to `Foam::UIPstream::UIPstream(int, Foam::PstreamBuffers&)'
/opt/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/libfiniteVolume.so: undefined reference to `Foam::triSurface::~triSurface()'
/opt/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/libmeshTools.so: undefined reference to `Foam::triSurface::operator=(Foam::triSurface const&)'
/opt/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/libmeshTools.so: undefined reference to `Foam::triSurface::sortedEdgeFaces() const'
/opt/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/libmeshTools.so: undefined reference to `Foam::triSurface::triSurface(Foam::List<Foam::labelledTri> const&, Foam::Field<Foam::Vector<double> > const&)'
/opt/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/libmeshTools.so: undefined reference to `Foam::triSurface::triSurface(Foam::triSurface const&)'
/opt/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/libmeshTools.so: undefined reference to `Foam::triSurface::triSurface(Foam::List<Foam::labelledTri>&, Foam::List<Foam::geometricSurfacePatch> const&, Foam::Field<Foam::Vector<double> >&, bool)'
/opt/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/libOpenFOAM.so: undefined reference to `Foam::UPstream::addValidParOptions(Foam::HashTable<Foam::string, Foam::word, Foam::string::hash>&)'
/opt/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/libOpenFOAM.so: undefined reference to `Foam::UPstream::exit(int)'
/opt/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/libmeshTools.so: undefined reference to `Foam::faceTriangulation::faceTriangulation(Foam::Field<Foam::Vector<double> > const&, Foam::face const&, Foam::Vector<double> const&, bool)'
/opt/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/libmeshTools.so: undefined reference to `Foam::triSurface::~triSurface()'
/opt/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/libfiniteVolume.so: undefined reference to `Foam::triSurface::write(Foam::fileName const&, bool) const'
/opt/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/libmeshTools.so: undefined reference to `typeinfo for Foam::triSurface'
/opt/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/libmeshTools.so: undefined reference to `Foam::triSurface::movePoints(Foam::Field<Foam::Vector<double> > const&)'
/opt/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/libmeshTools.so: undefined reference to `Foam::DimensionedField<int, Foam::triSurfaceGeoMesh>::typeName'
/opt/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/libmeshTools.so: undefined reference to `Foam::triSurface::triSurface(Foam::triSurface const&)'
/opt/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/libmeshTools.so: undefined reference to `Foam::triSurface::markZones(Foam::List<bool> const&, Foam::List<int>&) const'
/opt/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/libmeshTools.so: undefined reference to `Foam::triSurface::writeStats(Foam::Ostream&) const'
/opt/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/libmeshTools.so: undefined reference to `Foam::triSurface::clearOut()'
collect2: ld returned 1 exit status
make[2]: *** [/opt/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/bin/twoPhaseEulerFoam] Error 1
make[1]: *** [twoPhaseEulerFoam] Error 2
make[1]: Target `application' not remade because of errors.
make: *** [multiphase] Error 2
make: Target `application' not remade because of errors.

Thank you in advance. :)

wyldckat December 25, 2011 12:58

Greetings Anand,

OK, here are a few basic steps:
  1. Do NOT build OpenFOAM as root, unless you really know what you are doing! ;)
  2. First build with your own user account. This minimizes chances of you accidentally nuking your system.
  3. Follow the official instructions from here: http://www.openfoam.org/download/git.php - and yes, they have instructions for Fedora ;)
  4. Although, a few changes are recommended:
    • Define the number of processor cores to be used for compiling, directly on the source command line:
      Code:

      source $HOME/OpenFOAM/OpenFOAM-2.1.x/etc/bashrc WM_NCOMPPROCS=4
      4 is the number of cores. This will make the build process go a lot faster.
    • Run Allwmake like this:
      Code:

      ./Allwmake > make.log 2>&1
      This will generate a full log of the build process.
  5. When the build is finished, check the "make.log" file for errors. Usually the first errors are the ones that need tending to.
  6. If you can't figure out what's wrong, edit the file and replace any sensitive data, such as user names or something like that. Then package the file and attach on your next post.
    A way for packaging the file is to run this command:
    Code:

    tar -czf make.log.tar.gz make.log
Edit: I forgot to mention that after you've successfully compiled OpenFOAM, you can then move or copy it to "/opt" and change the permissions on the version at "/opt":
Code:

chown -R root:root /opt/OpenFOAM
Good luck!
Bruno

anand_30 December 25, 2011 14:18

Thanks a lot Bruno :)
Never really realised that my system was at risk while building as root.
Thanks for reminding me.

Just started building process,i think its almost going to take an hour or so.
Hope it will be successful.

merry christmas :)

anand_30 December 26, 2011 03:09

Hey it worked this time....

I don't know why it gave me errors while building as root but everything worked out smooth when I build it as user.:cool:

Before building ParaView I just had to add
Code:

QMAKE_PATH="/usr/bin/qmake-qt4"
to makeParaView file in ThirdParty folder.

Also moved installation to /opt and changed its ownership and group to 'root'.

Changed bashrc file /opt/OpenFOAMOpenFOAM-2.1.x/etc/bashrc from
Code:

foamInstall=$HOME/$WM_PROJECT
to
Code:

foamInstall=/opt/$WM_PROJECT
So my .bashrc file in home folder now has
Code:

source /opt/OpenFOAM/OpenFOAM-2.1.x/etc/bashrc
Tried cavity tutorial just now,everything is working fine.
Thank you very much for the help Bruno.:)


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