Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Re: libboost dependencies in Ubuntu 11.04

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Re: libboost dependencies in Ubuntu 11.04


Chronological Thread 
  • From: Philipp Möller <>
  • To:
  • Subject: Re: [cgal-discuss] Re: libboost dependencies in Ubuntu 11.04
  • Date: Mon, 22 Aug 2011 17:41:42 +0200

On 22 August 2011 16:13, mm
<>
wrote:
>
> Laurent Rineau (GeometryFactory) wrote:
>>
>> On lundi 22 août 2011 14:11:36 mm wrote:
>>> Amy Tabb wrote:
>>> > My opinion of how to fix your problem is to keep the newest version of
>>> > boost (at least 1.44), and then skip the Synaptic package manager
>>> version
>>> > of cgal and instead build it from source.  In the cmake dialog, you can
>>> > manually point to the specific version of boost that you have, but when
>>> I
>>> > have installed it on Ubuntu there was no need to alter the libraries
>>> > found by cmake.
>>> >
>>> > Then you'll have the most up to date version of boost with the most up
>>> to
>>> > date version of cgal, the only negative being some long download and
>>> > build times.
>>>
>>> Joachim Reichel wrote:
>>> > If you don't want to/can't do that yourself there seem to be two
>>> options:
>>> > 1) Build CGAL yourself from source, as recommended by Amy.
>>> > 2) Use a newer CGAL package from Ubuntu oneiric or Debian squeeze (CGAL
>>> > 3.8 / Boost 1.46).
>>>
>>> Hey Amy and Joachim, thanks for answering that fast! My response comes a
>>> bit late, but I was afk all weekend long.
>>>
>>> What both of you said makes total sense and I'd like to follow Amy's
>>> recommendation and compile CGAL from source and link against that.
>>> Unfortunately, it's not working. Setup is like this:
>>> 1) downloaded
>>> https://gforge.inria.fr/frs/download.php/28501/CGAL-3.8.tar.xz 2)
>>> unpacked
>>> and called cmake: only option changed is:
>>> CMAKE_INSTALL_PREFIX = /home/mm/.local/CGAL-3.8/
>>> as that's the place I keep my selfcompiled software.
>>> 3) open my project in cmake and set
>>> CGAL_DIR = /home/mm/.local/CGAL-3.8/lib/CGAL
>>> It's the only CGAL option and originally when I install CGAL through
>>> Synaptic, the folder /usr/lib/CGAL contains the same files, mostly
>>> *.cmake
>>> or *.in files.
>>> 4) compile my project and get error:
>>> /home/mm/code/src/cv/reflectance/illumestimators/gamutmapping/gamutmapping2
>>> destimator.cpp:14:64: fatal error:
>>> CGAL/Exact_predicates_inexact_constructions_kernel.h: No such file or
>>> directory
>>> compilation terminated.
>>
>> Between steps 2 and 3, have you compiled CGAL libraries? Do you have a
>> file
>> /home/mm/.local/CGAL-3.8/lib/CGAL/CGALConfig.cmake? What is the value of
>> variable CGAL_INCLUDE_DIRS in that file?
>>
>> The CMake lines about in your CMakeLists.txt seem correct.
>>
>
> Oh, forgot that: yeah, I compiled CGAL between steps 2 and 3. :)
> The file /home/mm/.local/CGAL-3.8/lib/CGAL/CGALConfig.cmake exists and the
> mentioned line looks like this:
> set(CGAL_INCLUDE_DIRS  "/home/mm/.local/CGAL-3.8//include" )
> So, this looks just fine and is the correct path.
>
> I'm kind of out of ideas... I compared the explicit compiler lines for the
> file that includes the CGAL things. Here the includes in the file
> gamutmapping2destimator.cpp:
> #include &lt;CGAL/Exact_predicates_inexact_constructions_kernel.h&gt;
> #include &lt;CGAL/point_generators_2.h&gt;
> #include &lt;CGAL/algorithm.h&gt;
> #include &lt;CGAL/convex_hull_traits_2.h&gt;
> #include &lt;CGAL/convex_hull_2.h&gt;
> #include &lt;CGAL/Exact_predicates_exact_constructions_kernel.h&gt;
>
> and here the compiler line:
> [ 72%] Building CXX object
> illumestimators/CMakeFiles/illumestimators-lib.dir/gamutmapping/gamutmapping2destimator.cpp.o
> cd /home/mm/code/build/cv/vole/illumestimators && /usr/bin/c++
> -DOPENCV_VERSION=2.2.0 -DWITH_OPENCV2 -DWITH_OPENCV -DWITH_QT
> -DWITH_QT_OPENGL -DWITH_QT_XML -DWITH_BOOST -DWITH_BOOST_SYSTEM
> -DWITH_BOOST_FILESYSTEM -DWITH_BOOST_PROGRAM_OPTIONS
> -DWITH_BOOST_SERIALIZATION -DWITH_BOOST_THREAD -DWITH_CGAL -DWITH_QHULL
> -DWITH_LPSOLVE -g -O2  -D_REENTRANT -frounding-math -O3 -DNDEBUG
> -I/usr/local/include/opencv -I/usr/local/include -I/usr/include/qt4
> -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui
> -I/usr/include/qt4/QtOpenGL -I/usr/include/qt4/QtXml -I/usr/include/include
> -I/home/mm/code/src/cv/vole/core/common
> -I/home/mm/code/src/cv/vole/core/storage
> -I/home/mm/code/src/cv/vole/core/shell
> -I/home/mm/code/src/cv/vole/modules/vlfeat
> -I/home/mm/code/src/cv/vole/modules/csparse
> -I/home/mm/code/src/cv/vole/modules/superpixels
> -I/home/mm/code/src/cv/vole/modules/sift
> -I/home/mm/code/src/cv/vole/modules/seg_felzenszwalb
> -I/home/mm/code/src/cv/vole/modules/similarity_measures
> -I/home/mm/code/src/cv/vole/modules/color_processing
> -I/home/mm/code/src/cv/vole/modules/seg_graphs
> -I/home/mm/code/src/cv/reflectance/crf
> -I/home/mm/code/src/cv/reflectance/gt_multi_illum
> -I/home/mm/code/src/cv/reflectance/skinrefl
> -I/home/mm/code/src/cv/reflectance/ms_edges
> -I/home/mm/code/src/cv/reflectance/postseg
> -I/home/mm/code/src/cv/reflectance/iebv
> -I/home/mm/code/src/cv/reflectance/muil
> -I/home/mm/code/src/cv/reflectance/illumestimators/iic/gui
> -I/home/mm/code/src/cv/reflectance/illumestimators/iic/commands
> -I/home/mm/code/src/cv/reflectance/illumestimators/iic/misc
> -I/home/mm/code/src/cv/reflectance/illumestimators/iic/mask
> -I/home/mm/code/src/cv/reflectance/illumestimators/iic/estimator
> -I/home/mm/code/src/cv/reflectance/illumestimators
> -I/home/mm/code/src/cv/reflectance/specularity_removal
> -I/home/mm/code/build/cv/vole/illumestimators    -DWITH_ILLUMESTIMATORS
> -DWITH_SUPERPIXELS -DWITH_CACHE -DWITH_GT_M_ILLUM -o
> CMakeFiles/illumestimators-lib.dir/gamutmapping/gamutmapping2destimator.cpp.o
> -c
> /home/mm/code/src/cv/reflectance/illumestimators/gamutmapping/gamutmapping2destimator.cpp
>
> It was the same for both, ubuntu CGAL and own compiled CGAL.
>
> But, inspecting the above compiler line, Philipp might be right that the
> compiler is still not searching in the right place for include headers...
> But I have no idea why or how I should change that? Adding the explicit path
> /home/mm/.local/CGAL-3.8/include to $PATH seems a bit weird, as you normally
> don't have to do that for other libs...?

The gcc switch is -I /where/my/headers/are (remember to use the
directory that contains the CGAL directory, not the CGAL directory
itself).
If you choose to do it with environment variables (which I would
discourage) there are CMAKE_INCLUDE_PATH for CMake and
CPLUS_INCLUDE_PATH for g++.

Maybe you should just get a simple example without CMake et al to
compile just to see everything is compiled correctly.

HTH,
Philipp

>
> --
> View this message in context:
> http://cgal-discuss.949826.n4.nabble.com/libboost-dependencies-in-Ubuntu-11-04-tp3755646p3760264.html
> Sent from the cgal-discuss mailing list archive at Nabble.com.
>
> --
> You are currently subscribed to cgal-discuss.
> To unsubscribe or access the archives, go to
> https://lists-sop.inria.fr/wws/info/cgal-discuss
>
>



Archive powered by MHonArc 2.6.16.

Top of Page