|
[Sponsors] |
Install Optional Packages from Ubuntu 12.10 Repositories |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
March 9, 2013, 17:48 |
Install Optional Packages from Ubuntu 12.10 Repositories
|
#1 |
Senior Member
Matthew Denno
Join Date: Feb 2010
Posts: 138
Rep Power: 16 |
Hi All,
I am wondering if installing the optional gmp, mpfr, mpc, cgal and boost from the repositories instead of from source works for OpenFOAM? The current versions are: libgmp-dev (2:5.0.2+dfsg-2ubuntu1 Ubuntu:12.04/precise [amd64]) libmpfr-dev (3.1.0-3ubuntu2 Ubuntu:12.04/precise [amd64]) libgmp-dev (2:5.0.2+dfsg-2ubuntu1 Ubuntu:12.04/precise [amd64]) libboost1.46-dev (1.46.1-7ubuntu3 Ubuntu:12.04/precise [amd64]) libcgal8 (3.9-1build1 Ubuntu:12.04/precise [amd64]) Looks like maybe some values in settings.sh might need to be adjusted? But I have never ventured this far beyond the standard install procedure. Edit: It is easy enough to just try to install this packages and compile, but how can I tell it it worked when it compiles without them to begin with? MD |
|
March 9, 2013, 19:31 |
|
#2 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128 |
Greetings Matthew,
According to Bernhard: Quote:
Best regards, Bruno
__________________
|
||
March 10, 2013, 13:51 |
|
#3 |
Senior Member
Matthew Denno
Join Date: Feb 2010
Posts: 138
Rep Power: 16 |
Bruno,
Thanks for your input. That post by Bernhard was what got me thinking about CGAL and OpenFOAM. I have worked with the CGAL libraries for a different project and was interested about using them with OF. I installed CGAL from the repositories, but it says that it is compiling without CGAL curvature support, but does include a line "-ICGALPolyhedron" From my make.log: Code:
+ [ -n ] + echo + echo Compiling surfaceFeatureExtract without CGAL curvature support Compiling surfaceFeatureExtract without CGAL curvature support + echo + wmake make[2]: Entering directory `/home/matt/OpenFOAM/OpenFOAM-2.2.0/applications/utilities/surface/surfaceFeatureExtract' Making dependency list for source file surfaceFeatureExtract.C make[2]: Leaving directory `/home/matt/OpenFOAM/OpenFOAM-2.2.0/applications/utilities/surface/surfaceFeatureExtract' make[2]: Entering directory `/home/matt/OpenFOAM/OpenFOAM-2.2.0/applications/utilities/surface/surfaceFeatureExtract' SOURCE=surfaceFeatureExtract.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -Wno-old-style-cast -I/include -I/include -I/include -I/include -ICGALPolyhedron -I/home/matt/OpenFOAM/OpenFOAM-2.2.0/src/finiteVolume/lnInclude -I/home/matt/OpenFOAM/OpenFOAM-2.2.0/src/meshTools/lnInclude -I/home/matt/OpenFOAM/OpenFOAM-2.2.0/src/edgeMesh/lnInclude -I/home/matt/OpenFOAM/OpenFOAM-2.2.0/src/triSurface/lnInclude -I/home/matt/OpenFOAM/OpenFOAM-2.2.0/src/surfMesh/lnInclude -I/home/matt/OpenFOAM/OpenFOAM-2.2.0/src/sampling/lnInclude -IlnInclude -I. -I/home/matt/OpenFOAM/OpenFOAM-2.2.0/src/OpenFOAM/lnInclude -I/home/matt/OpenFOAM/OpenFOAM-2.2.0/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/surfaceFeatureExtract.o g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -Wno-old-style-cast -I/include -I/include -I/include -I/include -ICGALPolyhedron -I/home/matt/OpenFOAM/OpenFOAM-2.2.0/src/finiteVolume/lnInclude -I/home/matt/OpenFOAM/OpenFOAM-2.2.0/src/meshTools/lnInclude -I/home/matt/OpenFOAM/OpenFOAM-2.2.0/src/edgeMesh/lnInclude -I/home/matt/OpenFOAM/OpenFOAM-2.2.0/src/triSurface/lnInclude -I/home/matt/OpenFOAM/OpenFOAM-2.2.0/src/surfMesh/lnInclude -I/home/matt/OpenFOAM/OpenFOAM-2.2.0/src/sampling/lnInclude -IlnInclude -I. -I/home/matt/OpenFOAM/OpenFOAM-2.2.0/src/OpenFOAM/lnInclude -I/home/matt/OpenFOAM/OpenFOAM-2.2.0/src/OSspecific/POSIX/lnInclude -fPIC -Xlinker --add-needed -Xlinker --no-as-needed Make/linux64GccDPOpt/surfaceFeatureExtract.o -L/home/matt/OpenFOAM/OpenFOAM-2.2.0/platforms/linux64GccDPOpt/lib \ -L/lib -L/lib -L/lib -lmeshTools -ledgeMesh -ltriSurface -lsampling -lOpenFOAM -ldl -lm -o /home/matt/OpenFOAM/OpenFOAM-2.2.0/platforms/linux64GccDPOpt/bin/surfaceFeatureExtract make[2]: Leaving directory `/home/matt/OpenFOAM/OpenFOAM-2.2.0/applications/utilities/surface/surfaceFeatureExtract' Code:
# boost and CGAL # ~~~~~~~~~~~~~~ boost_version=boost_1_45_0 cgal_version=CGAL-4.0 export BOOST_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$boost_version export CGAL_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$cgal_version # enabled if CGAL is available if [ "$FOAM_VERBOSE" -a "$PS1" ] then echo "Checking for" echo " $cgal_version at $CGAL_ARCH_PATH" echo " $boost_version at $BOOST_ARCH_PATH" fi if [ -d "$CGAL_ARCH_PATH" ] then if [ -d "$BOOST_ARCH_PATH" ] then _foamAddLib $BOOST_ARCH_PATH/lib else unset BOOST_ARCH_PATH fi _foamAddLib $CGAL_ARCH_PATH/lib else unset BOOST_ARCH_PATH CGAL_ARCH_PATH MPFR_ARCH_PATH GMP_ARCH_PATH fi unset boost_version cgal_version |
|
March 10, 2013, 14:31 |
|
#4 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128 |
Hi Matthew,
I haven't tried this yet, but the following massive hack will probably be necessary (or similar): Code:
export BOOST_ARCH_PATH=/usr/include/boost export CGAL_ARCH_PATH=/usr/include/CGAL #this one probably won't be needed _foamAddLib /usr/lib Wait... this is only the tip of the iceberg You also need to hack the following files:
Best regards, Bruno
__________________
|
|
March 11, 2013, 13:59 |
|
#5 |
Senior Member
Matthew Denno
Join Date: Feb 2010
Posts: 138
Rep Power: 16 |
Thanks Bruno,
I made the changes that you suggested and it seems to have compiled without errors but I haven't tried to use it yet. I will try this evening and report back. MD |
|
April 22, 2014, 23:19 |
|
#6 | |
Member
Karl
Join Date: Jan 2011
Posts: 36
Rep Power: 15 |
--edit--
Well, I have to temper my enthusiasm. It attempted to compile, and reported that it found all the libraries, but when the time came to build surfaceFeatureExtract, it appears to have failed with the following error (see below). Something about the wrong number of arguments and a missing "initializer". So it looks like the "Monge" related variables are missing (I have no idea what they are or if they are necessary to get SurfaceFeatureExtract to work, so I need to do some homework). Maybe I need a different version of CGAL? Code:
make[2]: `/home/karl/OpenFOAM/OpenFOAM-2.2.2/platforms/linux64GccDPOpt/bin/surfaceToPatch' is up to date. surfaceFeatureExtract.C: In function ‘Foam::scalarField calcCurvature(const Foam::triSurface&)’: surfaceFeatureExtract.C:85:47: error: wrong number of template arguments (1, should be 3) /usr/local/include/CGAL/Monge_via_jet_fitting.h:56:9: error: provided for ‘template<class DataKernel, class LocalKernel, class SvdTraits> class CGAL::Monge_via_jet_fitting’ surfaceFeatureExtract.C:85:78: error: invalid type in declaration before ‘;’ token surfaceFeatureExtract.C:86:57: error: expected initializer before ‘Monge_form’ make[2]: `/home/karl/OpenFOAM/OpenFOAM-2.2.2/platforms/linux64GccDPOpt/bin/surfaceTransformPoints' is up to date. surfaceFeatureExtract.C:148:9: error: ‘Monge_form’ was not declared in this scope surfaceFeatureExtract.C:148:20: error: expected ‘;’ before ‘monge_form’ surfaceFeatureExtract.C:164:21: error: ‘monge_form’ was not declared in this scope surfaceFeatureExtract.C:146:31: warning: unused variable ‘monge_fit’ [-Wunused-variable] surfaceFeatureExtract.C:92:18: warning: unused variable ‘d_monge’ [-Wunused-variable] make[2]: *** [Make/linux64GccDPOpt/surfaceFeatureExtract.o] Error 1 make[2]: Target `/home/karl/OpenFOAM/OpenFOAM-2.2.2/platforms/linux64GccDPOpt/bin/surfaceFeatureExtract' not remade because of errors. make[1]: *** [surfaceFeatureExtract] Error 2 make[1]: Target `application' not remade because of errors. make: *** [surface] Error 2 make: Target `application' not remade because of errors. Code:
make[3]: `/home/karl/OpenFOAM/OpenFOAM-2.2.2/platforms/linux64GccDPOpt/bin/createPatch' is up to date. + [ -n /usr/include/CGAL ] + echo + echo Compiling surfaceFeatureExtract with CGAL curvature support Compiling surfaceFeatureExtract with CGAL curvature support + echo + wmake ENABLE_CURVATURE=-DENABLE_CURVATURE EXE_FROUNDING_MATH=-frounding-math USE_F2C=-DCGAL_USE_F2C CGAL_LIBDIR=-L/usr/lib LAPACK_LIB=-llapack BLAS_LIB=-lblas CGAL_LIB=-lCGAL CGAL_BOOST_LIB=-lboost_thread CGAL_MPFR_LIB=-lmpfr Quote:
|
||
April 25, 2014, 15:51 |
|
#7 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128 |
Greetings Karl,
Any chance you can switch to OpenFOAM 2.3.0 or 2.3.x instead? Because OpenFOAM 2.3 is better connected to CGAL and Boost. If not, I'll need more information, namely which CGAL version you're using and which Ubuntu version. And those paths "/usr/local/include/" seem to indicate that you're using a custom build of CGAL? Best regards, Bruno
__________________
|
|
April 25, 2014, 16:08 |
|
#8 | |
Member
Karl
Join Date: Jan 2011
Posts: 36
Rep Power: 15 |
Well the goal is to keep using helyxos which only works with 2.2 apparently.
I was able to downgrade cgal to 4.1 and build surfacefearureextract correctly with cgal support. Yes installed cgal in ubuntu 12.04 and pointed openfoam build to the system cgal directories. You actually posted the method for that above. Unfortunately I have another problem with open mpi at the moment that I will post about separately. Thank you for your response. Regards, Karl Quote:
|
||
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Openfoam Ubuntu 12.04 Unmet dependencies | slls33 | OpenFOAM Installation | 10 | April 9, 2013 05:16 |
Installing OpenFOAM 2.1.1 and ParaView 3.12.0 on Ubuntu 12.10 | wyldckat | OpenFOAM Installation | 14 | February 12, 2013 05:43 |
errors when installing openfoam2.1 on ubuntu12.o4 | hewei | OpenFOAM Installation | 5 | May 29, 2012 08:43 |
Problem? with Installation of OpenFOAM 2.1.0 on to Ubuntu 10.4.4 VirtualBox | Stubby | OpenFOAM Installation | 8 | March 5, 2012 16:12 |
How to Install OpenFOAM on 64 Ubuntu 9.04 | hansel | OpenFOAM Installation | 62 | March 19, 2010 15:43 |