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.org] Problems building foamyHexMesh: CGAL missing? (https://www.cfd-online.com/Forums/openfoam-installation/130354-problems-building-foamyhexmesh-cgal-missing.html)

laurent98 February 24, 2014 18:22

Problems building foamyHexMesh: CGAL missing?
 
Hi,
i just compile OF2.3 everythinks work fine except foamyHexMesh: in the log file there is:

/opt/OpenFOAM-2.3.0/bin/tools/RunFunctions: line 52: foamyHexMesh: command not found
any idea?
thank you. LL

here the error message when i try to wmake the application:
linux-dgf5:/opt/OpenFOAM-2.3.0/applications/utilities/mesh/generation # wmake foamyHexMesh
SOURCE=foamyHexMesh.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -frounding-math -DNDEBUG -DCGAL_INEXACT -I/opt/ThirdParty-2.3.0/platforms/linux64Gcc/CGAL-4.3/include -I/include -I/include -I/opt/ThirdParty-2.3.0/platforms/linux64Gcc/boost-system/include -IconformalVoronoiMesh/lnInclude -I/opt/OpenFOAM-2.3.0/src/finiteVolume/lnInclude -I/opt/OpenFOAM-2.3.0/src/meshTools/lnInclude -I/opt/OpenFOAM-2.3.0/src/parallel/decompose/decompositionMethods/lnInclude -I/opt/OpenFOAM-2.3.0/src/edgeMesh/lnInclude -I/opt/OpenFOAM-2.3.0/src/fileFormats/lnInclude -I/opt/OpenFOAM-2.3.0/src/dynamicMesh/lnInclude -I/opt/OpenFOAM-2.3.0/src/triSurface/lnInclude -I/opt/OpenFOAM-2.3.0/src/sampling/lnInclude -I/opt/OpenFOAM-2.3.0/src/mesh/autoMesh/lnInclude -IvectorTools -IlnInclude -I. -I/opt/OpenFOAM-2.3.0/src/OpenFOAM/lnInclude -I/opt/OpenFOAM-2.3.0/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/foamyHexMesh.o
In file included from conformalVoronoiMesh/lnInclude/CGALTriangulation3Ddefs.H:41:0,
from conformalVoronoiMesh/lnInclude/conformalVoronoiMesh.H:44,
from foamyHexMesh.C:36:
conformalVoronoiMesh/lnInclude/CGALTriangulation3DKernel.H:36:43: fatal error: CGAL/Delaunay_triangulation_3.h: No such file or directory
compilation terminated.
make: *** [Make/linux64GccDPOpt/foamyHexMesh.o] Error 1


it look likek i miss CGAL/Delaunay_triangulation_3.h ???

alexeym February 25, 2014 02:43

Hi,

Yes, foamyHexMesh needs CGAL library to be built (CGAL in turn depends on boost, gmp, and mpfr). CGAL is in ThirdParty source pack but it won't build without dependencies and consequently foamyHexMesh will refuse to build.

tomf February 25, 2014 02:49

Hi,

I had a similar problem. I checked the thirdparty folder and ran the Allwmake script there a couple of times to make sure everything was compiled correctly. I also had to install or update some additional packages. Sometimes I had to update the environment variables in between running the Allwmake script. I suggest you start with the thirdparty folder and look at the error messages there. Probably you can work your way through them.

Regards,
Tom

mturcios777 February 25, 2014 16:46

Did you have to install the boost-dev package? I found I had to install that AND add the cgal library to the options file.

laurent98 February 25, 2014 22:23

thanks to all,
@mturcios777
yes, i'am on opensuse,12.3, i did a:
zypper install cmake libqt4-devel boost-devel gnuplot
how do you install boost-devl? how do you add options?


i try to compile from source and follow exactly
http://www.openfoam.org/download/source.php..
but it look like it s not enough, openfoam paraFoam works well but not foamyHexMesh.
so i built gmp5.0.4 and mpfr3.1.0 manually doing now mpc0.9,
yast or zypper install boost 1.49, in general may be older version than openfoam need?
for example in Thirdparty when i do as su ./makeGcc, it ask for newer version of gmp or mpfr, than the one install with yast...

i never add so much problems before to install older version of OpenFoam... it turm me crazy!!!

billie February 26, 2014 03:36

Quote:

Originally Posted by laurent98 (Post 476809)
thanks to all,
@mturcios777
yes, i'am on opensuse,12.3, i did a:
zypper install cmake libqt4-devel boost-devel gnuplot
how do you install boost-devl? how do you add options?


i try to compile from source and follow exactly
http://www.openfoam.org/download/source.php..
but it look like it s not enough, openfoam paraFoam works well but not foamyHexMesh.
so i built gmp5.0.4 and mpfr3.1.0 manually doing now mpc0.9,
yast or zypper install boost 1.49, in general may be older version than openfoam need?
for example in Thirdparty when i do as su ./makeGcc, it ask for newer version of gmp or mpfr, than the one install with yast...

i never add so much problems before to install older version of OpenFoam... it turm me crazy!!!

I am not familiar with Suse, but did you really follow the instructions and install the dependent packages required for OpenSuSE using the following commands:

zypper install -t pattern devel_C_C++
zypper install cmake libqt4-devel boost-devel gnuplot

Were the commands successful?

I had the same problem on Ubuntu were boost was missing as well. After installing boost, cgal from Thirdparty compiled fine.

It would be helpful if you provide the first lines of output for the Thirdparty programs from the ./Allwmake script. Here it looks like this:

Code:

========================================
Start ThirdParty Allwmake
========================================

========================================
Build MPI libraries if required

    have OPENMPI shared library (openmpi-1.6.5)

========================================
Build Scotch decomposition library scotch_6.0.0
    /home/openfoam/OpenFOAM-dev/ThirdParty-2.3.x/platforms/linux64Gcc/scotch_6.0.0
    scotch header in /home/openfoam/OpenFOAM-dev/ThirdParty-2.3.x/platforms/linux64Gcc/scotch_6.0.0/include
    scotch libs  in /home/openfoam/OpenFOAM-dev/ThirdParty-2.3.x/platforms/linux64GccDPOpt/lib

========================================
Build PTScotch decomposition library scotch_6.0.0 (uses MPI)
    /home/openfoam/OpenFOAM-dev/ThirdParty-2.3.x/platforms/linux64Gcc/scotch_6.0.0

    ptscotch header in /home/openfoam/OpenFOAM-dev/ThirdParty-2.3.x/platforms/linux64Gcc/scotch_6.0.0/include/openmpi-1.6.5
    ptscotch libs  in /home/openfoam/OpenFOAM-dev/ThirdParty-2.3.x/platforms/linux64GccDPOpt/lib/openmpi-1.6.5

========================================
Build Metis decomposition
    optional component Metis was not found
========================================
Build CGAL
    CGAL headers in /home/openfoam/OpenFOAM-dev/ThirdParty-2.3.x/platforms/linux64Gcc/CGAL-4.3/include
    CGAL libs    in /home/openfoam/OpenFOAM-dev/ThirdParty-2.3.x/platforms/linux64Gcc/CGAL-4.3/lib

========================================
Done ThirdParty Allwmake
========================================

As you can see openmpi, scotch, ptscotch and cgal compiled fine. You should get error messages in the cgal section if there are dependencies missing.

laurent98 February 26, 2014 11:05

Hi Billie,
HTML Code:

l
inux-dgf5:/home/laurent # zypper install -t pattern devel_C_C++
Retrieving repository 'openSUSE-12.3-Update' metadata ...............................................................................................................................................................................................[done]
Building repository 'openSUSE-12.3-Update' cache ....................................................................................................................................................................................................[done]
Loading repository data...
Reading installed packages...
'pattern:devel_C_C++' is already installed.
No update candidate for 'devel_C_C++-12.3-7.10.1.x86_64'. The highest available version is already installed.
Resolving package dependencies...

Nothing to do.
linux-dgf5:/home/laurent # zypper install cmake libqt4-devel boost-devel gnuplot
Loading repository data...
Reading installed packages...
'cmake' is already installed.
No update candidate for 'cmake-2.8.10.2-2.4.1.x86_64'. The highest available version is already installed.
'libqt4-devel' is already installed.
No update candidate for 'libqt4-devel-4.8.4-3.10.1.x86_64'. The highest available version is already installed.
'boost-devel' is already installed.
No update candidate for 'boost-devel-1.49.0-12.4.1.x86_64'. The highest available version is already installed.
'gnuplot' is already installed.
No update candidate for 'gnuplot-4.6.1-2.1.1.x86_64'. The highest available version is already installed.
Resolving package dependencies...

Nothing to do.

you are right it s good to start from the beginning, but it seems those commands were done well. also ./Allwmake seems ok...well except i have 2.3.0 and you 2.3.x !!!???
usually it is true that major release start with X instead of 0 .... could it be my problem?

HTML Code:

linux-dgf5:/opt/ThirdParty-2.3.0 # ./Allwmake

========================================
Start ThirdParty Allwmake
========================================

========================================
Build MPI libraries if required

    have OPENMPI shared library (openmpi-1.6.5)

========================================
Build Scotch decomposition library scotch_6.0.0
    /opt/ThirdParty-2.3.0/platforms/linux64Gcc/scotch_6.0.0
    scotch header in /opt/ThirdParty-2.3.0/platforms/linux64Gcc/scotch_6.0.0/include
    scotch libs  in /opt/ThirdParty-2.3.0/platforms/linux64GccDPOpt/lib

========================================
Build PTScotch decomposition library scotch_6.0.0 (uses MPI)
    /opt/ThirdParty-2.3.0/platforms/linux64Gcc/scotch_6.0.0

    ptscotch header in /opt/ThirdParty-2.3.0/platforms/linux64Gcc/scotch_6.0.0/include/openmpi-1.6.5
    ptscotch libs  in /opt/ThirdParty-2.3.0/platforms/linux64GccDPOpt/lib/openmpi-1.6.5

========================================
Build Metis decomposition
    optional component Metis was not found
========================================
Build CGAL
    CGAL headers in /opt/ThirdParty-2.3.0/platforms/linux64Gcc/CGAL-4.3/include
    CGAL libs    in /opt/ThirdParty-2.3.0/platforms/linux64Gcc/CGAL-4.3/lib

========================================
Done ThirdParty Allwmake
========================================


billie February 26, 2014 11:53

Well I build from source like you but not from the official releases but from the git head of the OpenFOAM development. These versions use x for the micro version. This shouldn't make a difference however. I can see the Thirdparty tools all build fine, but still the cgal headers are not found.

Were is the file CGAL/Delaunay_triangulation_3.h located on your system? When you extract the Thirdparty tools it should be in ThirdParty-2.3.0/CGAL-4.3/include/CGAL/Delaunay_triangulation_3.h

After compilation of the cgal thirdparty tool they should as well under ThirdParty-2.3.0/platforms/linux64Gcc/CGAL-4.3/include/CGAL/Delaunay_triangulation_3.h

Do you still get the same failures when running ./Allwmake instead of running wmake inside the source for foamyHexMesh.

mturcios777 February 26, 2014 12:49

@Laurent98:

I've installed on Ubunutu so I used the Ubuntu name of the boost developers library. Have you tried compiling the CGAL library included in ThirdParty-2.3 folder?

laurent98 February 26, 2014 23:28

ok thanks to all for reply,
i think the problems come from my computer... i did all my commands with a log
./Allwmake > allwmake.log 2>&1
i found the glu.h was missing to compile cgal, i had i glu-dev and recompile cgal from thirdParty2.3.0 . it was ok from thirdParty2.3.0 ...
then
linux-dgf5:/opt/OpenFOAM-2.3.0/applications/utilities/mesh/generation # ./Allwmake > allwmake.log 2>&1

were there is :
Code:

/usr/lib64/gcc/x86_64-suse-linux/4.7/../../../../x86_64-suse-linux/bin/ld: warning: libautoMesh.so, needed by /opt/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/lib/libconformalVoronoiMesh.so, not found (try using -rpath or -rpath-link)
/usr/lib64/gcc/x86_64-suse-linux/4.7/../../../../x86_64-suse-linux/bin/ld: warning: libfiniteVolume.so, needed by /opt/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/lib/libdecompositionMethods.so, not found (try using -rpath or -rpath-link)
/usr/lib64/gcc/x86_64-suse-linux/4.7/../../../../x86_64-suse-linux/bin/ld: warning: libextrudeModel.so, needed by /opt/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/lib/libdynamicMesh.so, not found (try using -rpath or -rpath-link)
/usr/lib64/gcc/x86_64-suse-linux/4.7/../../../../x86_64-suse-linux/bin/ld: warning: liblagrangian.so, needed by /opt/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/lib/libsampling.so, not found (try using -rpath or -rpath-link)
/usr/lib64/gcc/x86_64-suse-linux/4.7/../../../../x86_64-suse-linux/bin/ld: warning: libconversion.so, needed by /opt/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/lib/libsampling.so, not found (try using -rpath or -rpath-link)
/usr/lib64/gcc/x86_64-suse-linux/4.7/../../../../x86_64-suse-linux/bin/ld: warning: libPstream.so, needed by /opt/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/lib/libOpenFOAM.so, not found (try using -rpath or -rpath-link)
/opt/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/lib/libdynamicMesh.so: undefined reference to `Foam::fvPatchField<Foam::Tensor<double> >::patchMapperConstructorTablePtr_'
/opt/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/lib/libdynamicMesh.so: undefined reference to `Foam::emptyFvsPatchField<double>::typeName'
/opt/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/lib/libdynamicMesh.so: undefined reference to `Foam::fvsPatchField<Foam::Tensor<double> >::patchMapperConstructorTablePtr_'
/opt/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/lib/libsampling.so: undefined reference to `Foam::particle::wallImpactDistance(Foam::Vector<double> const&) const'
/opt/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/lib/libdynamicMesh.so: undefined reference to `Foam::fvPatchField<Foam::SphericalTensor<double> >::patchConstructorTablePtr_'
/opt/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/lib/libdynamicMesh.so: undefined reference to `Foam::fvMeshSubset::pointMap() const'
/opt/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/lib/libconformalVoronoiMesh.so: undefined reference to `Foam::OBJstream::write(Foam::line<Foam::Vector<double>, Foam::Vector<double> const&> const&)'

@billie, yes i have exactly same places like you for Delaunay_triangulation_3.h ...
don't know what to do, maybe clean every thinks and reinstall opensuse 13.1...
have a good day LL

billie February 27, 2014 03:49

Quote:

Originally Posted by laurent98 (Post 477015)
ok thanks to all for reply,
i think the problems come from my computer... i did all my commands with a log
./Allwmake > allwmake.log 2>&1
i found the glu.h was missing to compile cgal, i had i glu-dev and recompile cgal from thirdParty2.3.0 . it was ok from thirdParty2.3.0 ...

Reading the output from Allwmake in your last comment from yesterday it seems that cgal did compile fine else the output would look different. I mean there are no warnings or errors there.

Quote:

Originally Posted by laurent98 (Post 477015)
then
linux-dgf5:/opt/OpenFOAM-2.3.0/applications/utilities/mesh/generation # ./Allwmake > allwmake.log 2>&1

were there is :
Code:

/usr/lib64/gcc/x86_64-suse-linux/4.7/../../../../x86_64-suse-linux/bin/ld: warning: libautoMesh.so, needed by /opt/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/lib/libconformalVoronoiMesh.so, not found (try using -rpath or -rpath-link)
/usr/lib64/gcc/x86_64-suse-linux/4.7/../../../../x86_64-suse-linux/bin/ld: warning: libfiniteVolume.so, needed by /opt/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/lib/libdecompositionMethods.so, not found (try using -rpath or -rpath-link)
/usr/lib64/gcc/x86_64-suse-linux/4.7/../../../../x86_64-suse-linux/bin/ld: warning: libextrudeModel.so, needed by /opt/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/lib/libdynamicMesh.so, not found (try using -rpath or -rpath-link)
/usr/lib64/gcc/x86_64-suse-linux/4.7/../../../../x86_64-suse-linux/bin/ld: warning: liblagrangian.so, needed by /opt/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/lib/libsampling.so, not found (try using -rpath or -rpath-link)
/usr/lib64/gcc/x86_64-suse-linux/4.7/../../../../x86_64-suse-linux/bin/ld: warning: libconversion.so, needed by /opt/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/lib/libsampling.so, not found (try using -rpath or -rpath-link)
/usr/lib64/gcc/x86_64-suse-linux/4.7/../../../../x86_64-suse-linux/bin/ld: warning: libPstream.so, needed by /opt/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/lib/libOpenFOAM.so, not found (try using -rpath or -rpath-link)
/opt/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/lib/libdynamicMesh.so: undefined reference to `Foam::fvPatchField<Foam::Tensor<double> >::patchMapperConstructorTablePtr_'
/opt/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/lib/libdynamicMesh.so: undefined reference to `Foam::emptyFvsPatchField<double>::typeName'
/opt/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/lib/libdynamicMesh.so: undefined reference to `Foam::fvsPatchField<Foam::Tensor<double> >::patchMapperConstructorTablePtr_'
/opt/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/lib/libsampling.so: undefined reference to `Foam::particle::wallImpactDistance(Foam::Vector<double> const&) const'
/opt/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/lib/libdynamicMesh.so: undefined reference to `Foam::fvPatchField<Foam::SphericalTensor<double> >::patchConstructorTablePtr_'
/opt/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/lib/libdynamicMesh.so: undefined reference to `Foam::fvMeshSubset::pointMap() const'
/opt/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/lib/libconformalVoronoiMesh.so: undefined reference to `Foam::OBJstream::write(Foam::line<Foam::Vector<double>, Foam::Vector<double> const&> const&)'

@billie, yes i have exactly same places like you for Delaunay_triangulation_3.h ...
don't know what to do, maybe clean every thinks and reinstall opensuse 13.1...
have a good day LL

From the messages above it seems there are a lot of other things missing to make foamyHexMesh build. Try running the Allwmake script to compile everything which might be missing and not only selected parts of the source code.

If this fails I would not reinstall the complete OS, this should be the last resort. It looks like all dependencies are installed now, so before reinstalling I would first try to recompile OpenFOAM and the Thirdparty tools completely. You can start from scratch by cleaning out everything which has been built with this two scripts:
Code:

/opt/OpenFOAM-2.3.0/wmake/wcleanAll
/opt/ThirdParty-2.3.0/Allclean

wcleanAll should be run from /opt/OpenFOAM-2.3.0 as it recursivly cleans out everything below the current directory. Or just delete the files in /opt and untar from the downloaded archives again.

After that run the Allwmake script. It is good practice to run the Allwmake script a second time as wmake then only tries to build things which failed earlier. This way errors are easier to spot.

laurent98 February 28, 2014 04:18

hi to all, thank again for ideas...
here the begining of the log file made with ./Allwmake;
Code:

gcc -m64  -Wall -O3  -fPIC dirToString.c -o /home/laurent/OpenFOAM//OpenFOAM-2.3.0/wmake/platforms/linux64Gcc/dirToString
flex wmkdep.l
gcc -m64  -Wall -O3  -fPIC lex.yy.c -o /home/laurent/OpenFOAM//OpenFOAM-2.3.0/wmake/platforms/linux64Gcc/wmkdep
lex.yy.c:1379:17: warning: ‘yyunput’ defined but not used [-Wunused-function]
lex.yy.c:1420:16: warning: ‘input’ defined but not used [-Wunused-function]
g++ -m64  -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-100  -fPIC \
    wmkdepend.cpp wmkdependParser.cpp wmkdependScanner.cpp \
    -o /home/laurent/OpenFOAM//OpenFOAM-2.3.0/wmake/platforms/linux64Gcc/wmkdepend

========================================
Start ThirdParty Allwmake
========================================

========================================
Build MPI libraries if required

+ cd openmpi-1.6.5
+ make distclean
+ rm -rf /home/laurent/OpenFOAM//ThirdParty-2.3.0/platforms/linux64Gcc/openmpi-1.6.5
+ configOpt=--with-sge
+ ./configure --prefix=/home/laurent/OpenFOAM//ThirdParty-2.3.0/platforms/linux64Gcc/openmpi-1.6.5 --disable-orterun-prefix-by-default --enable-shared --disable-static --libdir=/home/laurent/OpenFOAM//ThirdParty-2.3.0/platforms/linux64Gcc/openmpi-1.6.5/lib64 --disable-mpi-f77 --disable-mpi-f90 --disable-mpi-cxx --disable-mpi-profile --with-sge
configure: loading site script /usr/share/site/x86_64-unknown-linux-gnu

============================================================================
== Configuring Open MPI
============================================================================

*** Startup tests
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for gcc... gcc

Code:

/usr/lib64/gcc/x86_64-suse-linux/4.7/../../../../x86_64-suse-linux/bin/ld: warning: libtriSurface.so, needed by /home/laurent/OpenFOAM//OpenFOAM-2.3.0/platforms/linux64GccDPOpt/lib/libfiniteVolume.so, not found (try using -rpath or -rpath-link)
is it normal that at beginning it s x86_64-unknown-linux then its x86_64-suse-linux/
just wandering what in my config make that error came!
end of log file :
Code:

/home/laurent/OpenFOAM//OpenFOAM-2.3.0/platforms/linux64GccDPOpt/lib/libfiniteVolume.so: undefined reference to `Foam::pointToPointPlanarInterpolation::pointToPointPlanarInterpolation(Foam::Field<Foam::Vector<double> > const&, Foam::Field<Foam::Vector<double> > const&, double)'
collect2: error: ld returned 1 exit status
make[2]: *** [/home/laurent/OpenFOAM//OpenFOAM-2.3.0/platforms/linux64GccDPOpt/bin/solidEquilibriumDisplacementFoam] Error 1
make[2]: Leaving directory `/home/laurent/OpenFOAM/OpenFOAM-2.3.0/applications/solvers/stressAnalysis/solidEquilibriumDisplacementFoam'
make[1]: *** [solidEquilibriumDisplacementFoam] Error 2
make[1]: Target `application' not remade because of errors.
make[1]: Leaving directory `/home/laurent/OpenFOAM/OpenFOAM-2.3.0/applications/solvers/stressAnalysis'
make: *** [stressAnalysis] Error 2
make: Target `application' not remade because of errors.



i will try tomorrow to firt compile gcc and other for Thirdparty...

wyldckat March 1, 2014 19:12

Greetings to all!

@laurent98: If you're still using openSUSE 12.3 and trying to build OpenFOAM 2.3.0, hopefully the following instructions will solve your problems: http://openfoamwiki.net/index.php/In...#openSUSE_12.3

Best regards,
Bruno

laurent98 March 2, 2014 18:04

Dear Bruno,
after a week of different trying, i finally follow you instruction and it's work right away!
even paraFoam with python i just did:
./makeParaView4 -python

it s great! thank you so much!
good day to all LL

iqbalsk8 December 2, 2016 05:16

conformalVoronoiMesh(CGAL) compilation error
 
1 Attachment(s)
Quote:

Originally Posted by wyldckat (Post 477500)
Greetings to all!

@laurent98: If you're still using openSUSE 12.3 and trying to build OpenFOAM 2.3.0, hopefully the following instructions will solve your problems: http://openfoamwiki.net/index.php/In...#openSUSE_12.3

Best regards,
Bruno

Hi All,

First of all, I apologize if I am asking the question in the wrong thread but the error message seemed similar to the problem I have.

I am trying to compile OpenFOAM-v1606+ on a RedHat-6.8 machine in my $HOME/OpenFOAM directory. I followed the instructions from the webpage https://openfoamwiki.net/index.php/I...HEL#CentOS_6.6.

It seems that the OpenFOAM utilities using the CGAL library are not compiling as they are looking for the <gmp.h> file.

Rest of the packages compiled successfully. Also the I am able to compile paraview successfully. Any help would be much appreciated.

I am using openmpi-1.10 and gcc-4.9.2 for compilation. Also I am don't have the rights to use 'sudo' command.

wyldckat December 2, 2016 06:22

Quick answer: There are instructions on the wiki for installing OpenFOAM+ v1606+ in CentOS 6.x: https://openfoamwiki.net/index.php/I...HEL#CentOS_6.7 - which should also work on RHEL 6.8...

But, OK, since you already have most of the installation going as intended, what's missing is the path to GMP, which is likely on your built GCC stack.
  • How exactly are you choosing to use GCC 4.9?
  • You can also find where gcc is installed by running:
    Code:

    which gcc
  • Because you will need to find the path to GMP's files (headers (*.h) and libraries (*.so or *.a))
  • The idea is that after you've found the path to GMP, you need to set the path to it in the respective environment variable:
    Code:

    export GMP_ARCH_PATH=/opt/gcc-4.9/gmp
  • For more details, check the file "wmake/rules/General/CGAL" for the environment variables needed.

iqbalsk8 December 2, 2016 11:00

foamyHexMesh compilation
 
Quote:

Originally Posted by wyldckat (Post 627935)
Quick answer: There are instructions on the wiki for installing OpenFOAM+ v1606+ in CentOS 6.x: https://openfoamwiki.net/index.php/I...HEL#CentOS_6.7 - which should also work on RHEL 6.8...

But, OK, since you already have most of the installation going as intended, what's missing is the path to GMP, which is likely on your built GCC stack.
  • How exactly are you choosing to use GCC 4.9?
  • You can also find where gcc is installed by running:
    Code:

    which gcc
  • Because you will need to find the path to GMP's files (headers (*.h) and libraries (*.so or *.a))
  • The idea is that after you've found the path to GMP, you need to set the path to it in the respective environment variable:
    Code:

    export GMP_ARCH_PATH=/opt/gcc-4.9/gmp
  • For more details, check the file "wmake/rules/General/CGAL" for the environment variables needed.

Hi Bruno,

Thank you for the reply. I will try to answer your every question one by one.
  • I have gcc-4.9.2 version available so I am exporting its path in the alias command in my local .bashrc.
My 'GMP' and 'MPFR' header path is $WM_THIRD_PARTY_DIR/platforms/linux64. So I extended my alias command to export the path as below i.e.

Code:

alias of1606+='export PATH=$PATH:/opt/gcc49/bin;
export MPFR_ARCH_PATH=/home/iqbalsk8/OpenFOAM/ThirdParty-v1606+OpenCFD/platforms/linux64/mpfr-3.1.2;
export GMP_ARCH_PATH=/home/iqbalsk8/OpenFOAM/ThirdParty-v1606+OpenCFD/platforms/linux64/gmp-5.1.2;
source $HOME/OpenFOAM/OpenFOAM-v1606+OpenCFD/etc/bashrc'

  • As you suggested I made changes to wmake/rules/GeneralCGAL and changed it as
Code:

CGAL_INC = \
    -I$(CGAL_ARCH_PATH)/include \
    -I$(MPFR_ARCH_PATH)/include \
    -I$(GMP_ARCH_PATH)/include \
    -I$(BOOST_ARCH_PATH)/include
CGAL_LIBS = \
    -L$(MPFR_ARCH_PATH)/lib64 \
    -L$(GMP_ARCH_PATH)/lib64 \
    -L$(BOOST_ARCH_PATH)/lib \
    -L$(CGAL_ARCH_PATH)/lib \
    -lCGAL \
    -lmpfr \
    -lgmp

The last line '-lgmp' I added my self as without it I was getting libgmp.so.10 not found error.

After that I ran Allwmake from $WM_PROJECT_DIR and the libraries were compiled successfully. However, I wanted to ask you whether exporting the
'MPFR_ARCH_PATH' and 'GMP_ARCH_PATH' using the alias is common practice. What is the standard way for exporting those path or in which files must those path be set to make it more clean/standard.

Regards

Sohail

wyldckat December 3, 2016 12:40

Quote:

Originally Posted by iqbalsk8 (Post 627980)
However, I wanted to ask you whether exporting the
'MPFR_ARCH_PATH' and 'GMP_ARCH_PATH' using the alias is common practice. What is the standard way for exporting those path or in which files must those path be set to make it more clean/standard.

Quick answer: MPFR and GMP locations are usually configured in the file "OpenFOAM-v1606+/etc/config.sh/compiler". But it will only be used if you set the following variable and value in bashrc or in your alias command:
Code:

WM_COMPILER_TYPE=ThirdParty
Furthermore, you might want do double-check if you don't have MPFR and GMP installed at "/opt/gcc49/".
And you can configure the path to "/opt/gcc49" in "OpenFOAM-v1606+/etc/config.sh/compiler" as well... er, wait... the paths to the compiler and MPFR and GMP are actually defined here: "OpenFOAM-v1606+/etc/config.sh/settings"

ashrufsyed February 15, 2017 10:24

foamyHexMesh compilation reports missing lCGAL
 
I have gone through the discussion thread, and tried different things but nothing seems to work out. Everything has compiled quite well, except foamyMesh folder.

I'm attaching the snippet below from wmake where the first error occurs. FYI I'm trying to compile OpenFOAM-dev with custom CGAL-4.9 and ThirdParty libs (gmp, and mpfr)


wmake refineMesh
wmake renumberMesh
[100%] Built target PVblockMeshReader_SM
Allwmake applications/utilities/mesh/manipulation/renumberMesh
Allwmake applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader
wmake rotateMesh
wmake vtkPVFoam
/home/syed/OpenFOAM/ThirdParty-dev/platforms/linux64/gcc-6.3.0/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lCGAL
collect2: error: ld returned 1 exit status
make[2]: *** [/home/syed/OpenFOAM/OpenFOAM-dev/platforms/linux64Gcc63DPInt64Opt/lib/libconformalVoronoiMesh.so] Error 1
make[2]: Target `libso' not remade because of errors.
wmake conformalVoronoi2DMesh
wmake setSet
Allwmake applications/utilities/mesh/manipulation/setSet
found <readline/readline.h> -- enabling readline support.
wmake setsToZones
wmake singleCellMesh

ashrufsyed February 17, 2017 06:26

Sorry, was able to resolve the error with a simple install of mpfr-devel and gmp-devel using package manager which allowed a proper build and linkage. CGAL was able to find these libraries from their respective locations during its compilation and build process, and so does the foamyMesh utility!


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