Problem installing CGAL on Ubuntu

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem installing CGAL on Ubuntu

gligart
This post was updated on .
Hi there! I'm having issues installing the library CGAL, in details it have
success in all but for CGAL_QT5, here the output:

== Setting paths ==
-- Build CGAL from release in directory CGAL-4.11
-- Packagenames: CGAL-4.11
== Setting paths (DONE) ==

== Generate version files ==
-- CGAL_MAJOR_VERSION=4
-- CGAL_MINOR_VERSION=11
-- CGAL_BUGFIX_VERSION=0
-- CGAL_SONAME_VERSION=13
-- CGAL_SOVERSION     =13.0.1
-- CGAL_REFERENCE_CACHE_DIR=
-- Building shared libraries
-- Targetting Unix Makefiles
-- Using /usr/bin/c++ compiler.
-- USING CMake version: 2.8.12
-- System: Linux
-- USING GCC_VERSION = '4.8.4'
-- Using gcc version 4 or later. Adding -frounding-math
== Generate version files (DONE) ==

== Set up flags ==
-- Build type: Release
-- USING CXXFLAGS = ' -frounding-math -O3 -DNDEBUG'
-- USING LDFLAGS = '  '
== Set up flags (DONE) ==

== Detect external libraries ==
-- External libraries supported:
GMP;GMPXX;MPFR;ZLIB;OpenGL;LEDA;MPFI;RS;RS3;OpenNL;Eigen3;BLAS;LAPACK;QGLViewer;ESBTL;Coin3D;NTL;IPE
-- Preconfiguring library: GMP ...
-- GMP has been preconfigured:
--   UseGMP-file:      
--   GMP include:      /usr/include/x86_64-linux-gnu
--   GMP libraries:    /usr/lib/x86_64-linux-gnu/libgmp.so
--   GMP definitions:  
-- USING GMP_VERSION = '5.1.3'
-- Preconfiguring library: MPFR ...
-- MPFR has been preconfigured:
--   UseMPFR-file:      
--   MPFR include:      /usr/include
--   MPFR libraries:    /usr/lib/x86_64-linux-gnu/libmpfr.so
--   MPFR definitions:  
-- USING MPFR_VERSION = '3.1.2'
-- __cplusplus is 199711
-- Boost version: 1.54.0
-- Found the following Boost libraries:
--   thread
--   system
-- Boost include:     /usr/include
-- Boost libraries:  
/usr/lib/x86_64-linux-gnu/libboost_thread.so;/usr/lib/x86_64-linux-gnu/libboost_system.so;/usr/lib/x86_64-linux-gnu/libpthread.so
-- Boost definitions:
-- USING BOOST_VERSION = '1.54.0'
== Detect external libraries (DONE) ==

== Write compiler_config.h ==
-- Performing Test CGAL_CFG_DENORMALS_COMPILE_BUG - Success
-- Performing Test CGAL_CFG_FPU_ROUNDING_MODE_UNWINDING_VC_BUG - Success
-- Performing Test CGAL_CFG_IEEE_754_BUG - Success
-- Performing Test CGAL_CFG_ISTREAM_INT_BUG - Success
-- Performing Test CGAL_CFG_MATCHING_BUG_5 - Success
-- Performing Test CGAL_CFG_MATCHING_BUG_6 - Success
-- Performing Test CGAL_CFG_MATCHING_BUG_7 - Success
-- Performing Test CGAL_CFG_MATCHING_BUG_8 - Success
-- Performing Test CGAL_CFG_NESTED_CLASS_FRIEND_DECLARATION_BUG - Success
-- Performing Test CGAL_CFG_NO_LIMITS - Success
-- Performing Test CGAL_CFG_NO_NEXTAFTER - Success
-- Performing Test CGAL_CFG_NO_STL - Success
-- Performing Test CGAL_CFG_NUMERIC_LIMITS_BUG - Success
-- Performing Test CGAL_CFG_OUTOFLINE_MEMBER_DEFINITION_BUG - Success
-- Performing Test CGAL_CFG_TEMPLATE_IN_DEFAULT_PARAMETER_BUG - Success
-- Performing Test CGAL_CFG_TYPENAME_BEFORE_DEFAULT_ARGUMENT_BUG - Success
-- Performing Test CGAL_CFG_USING_BASE_MEMBER_BUG_2 - Success
== Write compiler_config.h (DONE) ==

== Generating build files ==
Configuring libCGAL
-- Requested component: MPFR
-- Requested component: GMP
libCGAL is configured
-- Sources for CGAL component library 'CGAL_Core' detected
Configuring libCGAL_Core
-- Requested component: MPFR
-- Requested component: GMP
-- Boost version: 1.54.0
-- Found the following Boost libraries:
--   thread
--   system
libCGAL_Core is configured
-- Sources for CGAL component library 'CGAL_ImageIO' detected
Configuring libCGAL_ImageIO
-- USING ZLIB_VERSION = '1.2.8'
-- Requested component: MPFR
-- Requested component: GMP
libCGAL_ImageIO is configured
-- Sources for CGAL component library 'CGAL_Qt5' detected
Configuring libCGAL_Qt5
-- libCGAL_Qt5 is missing the dependencies: Qt5OpenGL Qt5Svg Qt5 cannot be
configured.
-- Sources for CGAL component libraries 'CGAL_Core;CGAL_ImageIO;CGAL_Qt5'
detected
== Generating build files (DONE) ==

-- Configuring done
-- Generating done
-- Build files have been written to: /opt/CGAL-4.11


Anything I could do to make it work? Since it doesnt work with CGAL_Qt5 I'm
not able to run any demo, I've already tried looking for similar topics, but
couldnt find a way to make it work.
Any Help?



--
Sent from: http://cgal-discuss.949826.n4.nabble.com/

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss


Reply | Threaded
Open this post in threaded view
|

Re: Problem installing CGAL on Ubuntu

Laurent Rineau (CGAL/GeometryFactory)
Le Thursday, October 5, 2017 4:24:49 PM CEST gligart a ?crit :
> Hi there! I'm having issues installing the library CGAL, in details it have
> success in all but for CGAL_QT5, here the output:
[...]
> Configuring libCGAL_Qt5
> -- libCGAL_Qt5 is missing the dependencies: Qt5OpenGL Qt5Svg Qt5 cannot be
> configured.

On Linux distribution, the Qt5 libraries are packaged into several packages.
For Ubuntu, you need to install developement packages:

libqt5svg5-dev
qtscript5-dev
libqt5opengl5-dev

--
Laurent Rineau, PhD
R&D Engineer at GeometryFactory           http://www.geometryfactory.com/
Release Manager of the CGAL Project       http://www.cgal.org/


--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss


Reply | Threaded
Open this post in threaded view
|

Re: Problem installing CGAL on Ubuntu

Marc Glisse
In reply to this post by gligart
On Thu, 5 Oct 2017, gligart wrote:

> Hi there! I'm having issues installing the library CGAL, in details it have
> success in all but for CGAL_QT5, here the output:
[...]
> Anything I could do to make it work? Since it doesnt work with CGAL_Qt5 I'm
> not able to run any demo, I've already tried looking for similar topics, but
> couldnt find a way to make it work.

Hello,

CGAL is packaged in Ubuntu. Even if you are not going to use that package
(for instance you want a more recent version), the package still contains
useful information.

apt build-dep cgal

will install the packages that must be installed to build the Ubuntu cgal
package (may require sudo, etc).

apt show libcgal-demo

look at the Suggests: field, the packages listed there are all relevant to
some demos.

The newer version of CGAL may have new requirements, but not very often
unless you are using an ancient version of Ubuntu, and the old
requirements are still a good starting point.

--
Marc Glisse

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss


Reply | Threaded
Open this post in threaded view
|

Re: Problem installing CGAL on Ubuntu

gligart
In reply to this post by Laurent Rineau (CGAL/GeometryFactory)
Thank you guys for the suggestions...now I succeded in running the commands:
cmake .
make
in the main directory of CGAL which seems to work, I hadn't any error
message neither any warning while compiling.
That's the output of make:

[  5%] Building CXX object src/CGAL/CMakeFiles/CGAL.dir/all_files.cpp.o
Linking CXX shared library ../../lib/libCGAL.so
[  5%] Built target CGAL
Scanning dependencies of target CGAL_Core
[ 10%] Building CXX object
src/CGAL_Core/CMakeFiles/CGAL_Core.dir/all_files.cpp.o
Linking CXX shared library ../../lib/libCGAL_Core.so
[ 10%] Built target CGAL_Core
Scanning dependencies of target CGAL_ImageIO
[ 15%] Building CXX object
src/CGAL_ImageIO/CMakeFiles/CGAL_ImageIO.dir/all_files.cpp.o
Linking CXX shared library ../../lib/libCGAL_ImageIO.so
[ 15%] Built target CGAL_ImageIO
Scanning dependencies of target CGAL_Qt5
[ 20%] Building CXX object
src/CGAL_Qt5/CMakeFiles/CGAL_Qt5.dir/all_files.cpp.o
[ 25%] Building CXX object
src/CGAL_Qt5/CMakeFiles/CGAL_Qt5.dir/__/__/include/CGAL/Qt/moc_GraphicsViewNavigation.cpp.o
[ 30%] Building CXX object
src/CGAL_Qt5/CMakeFiles/CGAL_Qt5.dir/__/__/include/CGAL/Qt/moc_DemosMainWindow.cpp.o
[ 35%] Building CXX object
src/CGAL_Qt5/CMakeFiles/CGAL_Qt5.dir/__/__/include/CGAL/Qt/moc_GraphicsItem.cpp.o
[ 40%] Building CXX object
src/CGAL_Qt5/CMakeFiles/CGAL_Qt5.dir/__/__/include/CGAL/Qt/moc_GraphicsViewInput.cpp.o
Linking CXX shared library ../../lib/libCGAL_Qt5.so
[100%] Built target CGAL_Qt5



Now I'm having another kind of problem, I'm not able to run a demo, for
example if I try with Convex_hull_2, in the folder of the example
Convex_Hull_2 I run this command:

g++ -lGCAL -lgmp -frounding-math ch_from_cin_to_cout.cpp

but what i got in response is this:

/usr/bin/ld: cannot find -lGCAL
collect2: error: ld returned 1 exit status

So I thought it's a matter of finding the lib, since I installed it from a
.tar its folder is /opt/CGAL-4.11/lib which contains the file libCGAL.so

Then I tried with this other command:

sudo g++ -L/opt/CGAL-4.11/lib -lGCAL -lgmp -frounding-math
ch_from_cin_to_cout.cpp

but got the same error.
So I thought it would have been nice to see if I can find the lib itself,
that's why I run this line:

ld -lCGAL --verbose

and that's the output:

attempt to open /usr/x86_64-linux-gnu/lib64/libCGAL.so failed
attempt to open /usr/x86_64-linux-gnu/lib64/libCGAL.a failed
attempt to open //usr/local/lib/x86_64-linux-gnu/libCGAL.so succeeded
-lCGAL (//usr/local/lib/x86_64-linux-gnu/libCGAL.so)
libboost_thread.so.1.54.0 needed by
//usr/local/lib/x86_64-linux-gnu/libCGAL.so
found libboost_thread.so.1.54.0 at
//usr/lib/x86_64-linux-gnu/libboost_thread.so.1.54.0
libpthread.so.0 needed by //usr/local/lib/x86_64-linux-gnu/libCGAL.so
found libpthread.so.0 at //lib/x86_64-linux-gnu/libpthread.so.0
libstdc++.so.6 needed by //usr/local/lib/x86_64-linux-gnu/libCGAL.so
found libstdc++.so.6 at //usr/lib/x86_64-linux-gnu/libstdc++.so.6
libm.so.6 needed by //usr/local/lib/x86_64-linux-gnu/libCGAL.so
found libm.so.6 at //lib/x86_64-linux-gnu/libm.so.6
libgcc_s.so.1 needed by //usr/local/lib/x86_64-linux-gnu/libCGAL.so
found libgcc_s.so.1 at //lib/x86_64-linux-gnu/libgcc_s.so.1
libc.so.6 needed by //usr/local/lib/x86_64-linux-gnu/libCGAL.so
found libc.so.6 at //lib/x86_64-linux-gnu/libc.so.6
libboost_system.so.1.54.0 needed by
//usr/lib/x86_64-linux-gnu/libboost_thread.so.1.54.0
found libboost_system.so.1.54.0 at
//usr/lib/x86_64-linux-gnu/libboost_system.so.1.54.0
librt.so.1 needed by //usr/lib/x86_64-linux-gnu/libboost_thread.so.1.54.0
found librt.so.1 at //lib/x86_64-linux-gnu/librt.so.1
ld-linux-x86-64.so.2 needed by //lib/x86_64-linux-gnu/libpthread.so.0
found ld-linux-x86-64.so.2 at //lib/x86_64-linux-gnu/ld-linux-x86-64.so.2
ld: warning: cannot find entry symbol _start; not setting start address

Now I don't exactly know what I'm doing, I think I got it but not
completely...and I got two questions about it:

1) Is it referring to the wroing one? Is it possible I have this file
/usr/local/lib/x86_64-linux-gnu/libCGAL.so due to an older installation from
terminal of CGAL?  That way it didn't work at all with CMake that's why I
switched to an installation from a .tar , at least now CMake compiles.

2) How can I run some demos and or examples? I cannot find a proper way to
do it.



--
Sent from: http://cgal-discuss.949826.n4.nabble.com/

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss


Reply | Threaded
Open this post in threaded view
|

Re: Problem installing CGAL on Ubuntu

Laurent Rineau (CGAL/GeometryFactory)
Le Monday, October 9, 2017 1:10:35 PM CEST gligart a ?crit :
> g++ -lGCAL -lgmp -frounding-math ch_from_cin_to_cout.cpp
>
> but what i got in response is this:
>
> /usr/bin/ld: cannot find -lGCAL
> collect2: error: ld returned 1 exit status

There is a typo in your command. The library is named "CGAL" and not "GCAL".

--
Laurent Rineau, PhD
R&D Engineer at GeometryFactory           http://www.geometryfactory.com/
Release Manager of the CGAL Project       http://www.cgal.org/


--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss


Reply | Threaded
Open this post in threaded view
|

Re: Problem installing CGAL on Ubuntu

Christophe Riedinger
Le 11 oct. 2017 12:28, "Laurent Rineau (CGAL/GeometryFactory)" <[hidden email]> a écrit :
Le Monday, October 9, 2017 1:10:35 PM CEST gligart a ?crit :
> g++ -lGCAL -lgmp -frounding-math ch_from_cin_to_cout.cpp
>
> but what i got in response is this:
>
> /usr/bin/ld: cannot find -lGCAL
> collect2: error: ld returned 1 exit status

There is a typo in your command. The library is named "CGAL" and not "GCAL".

--
Laurent Rineau, PhD
R&D Engineer at GeometryFactory           http://www.geometryfactory.com/
Release Manager of the CGAL Project       http://www.cgal.org/


--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss


Reply | Threaded
Open this post in threaded view
|

Re: Problem installing CGAL on Ubuntu

gligart
I noticed that...my bad! Anyway I had success installing the library. Now I'm
exploring it. Thanks for the help.



--
Sent from: http://cgal-discuss.949826.n4.nabble.com/

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss