Quantcast

Cannot make CGAL examples in Cygwin

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Cannot make CGAL examples in Cygwin

Anzel, Phil - NRCS, Fort Collins, CO

Hello,

 

I am unable to build some of the CGAL examples under Cygwin. All of the failing examples share similar error messages.

 

Any guidance would be most appreciated.

 

Following are the steps that I followed and a sample error from a "make".

 

Cygwin (x64) installed under Windows 7 to d:\cygwin64.

 

CGAL source downloaded from  https://github.com/CGAL/cgal/releases/download/releases%2FCGAL-4.9/CGAL-4.9.zip

and unzipped to D:\cygwin64\usr\CGAL-4.9

 

All libraries supposedly needed for CGAL were installed via the Cygwin x64 setup.

 

Initial cmake:

    cd /usr/CGAL-4.9

    cmake -DCMAKE_LEGACY_CYGWIN_WIN32=1 -DWITH_CGAL_Qt5=OFF -DWITH_examples=ON  .

 

Some examples could not be configured, these included the *mesh* and Scale_space_reconstruction_3 examples.

    cd /usr/CGAL-4.9

    make

    make examples

 

The first few examples were created successfully. For example,

    PATH=/usr/local/bin:/usr/bin:/bin:/lib:/usr/CGAL-4.9/bin:/usr/CGAL-4.9/lib

    cd /usr/CGAL-4.9/examples/AABB_tree

    ./AABB_triangle_3_example.exe

    3 intersections(s) with ray query

    closest point is: 0.333333 0.333333 0.333333

    squared distance: 8.33333

 

A later example demonstrates a nagging problem that shows up in a number of the examples:

    cd /usr/CGAL-4.9/examples/Snap_rounding_2/

    cmake -DCGAL_DIR=/usr/CGAL-4.9 .

    make

 

Scanning dependencies of target snap_rounding

[ 16%] Building CXX object CMakeFiles/snap_rounding.dir/snap_rounding.cpp.o

In file included from /usr/CGAL-4.9/include/CGAL/CORE/CoreDefs.h:41:0,

                 from /usr/CGAL-4.9/include/CGAL/CORE/BigFloatRep.h:40,

                 from /usr/CGAL-4.9/include/CGAL/CORE/BigFloat.h:38,

                 from /usr/CGAL-4.9/include/CGAL/CORE_BigFloat.h:27,

                 from /usr/CGAL-4.9/include/CGAL/CORE_arithmetic_kernel.h:39,

                 from /usr/CGAL-4.9/include/CGAL/Arithmetic_kernel.h:51,

                 from /usr/CGAL-4.9/include/CGAL/Arr_rational_function_traits_2.h:28,

                 from /usr/CGAL-4.9/include/CGAL/Sweep_line_2_algorithms.h:37,

                 from /usr/CGAL-4.9/include/CGAL/Snap_rounding_2.h:28,

                 from /usr/CGAL-4.9/examples/Snap_rounding_2/snap_rounding.cpp: :

/usr/CGAL-4.9/include/CGAL/CORE/extLong.h:171:8: warning: ‘CORE::extLong::extLong(int)’ redeclared without dllimport attribute after being referenced with dll linkage

inline extLong::extLong(int i) : val(i), flag(0) {

        ^

/usr/CGAL-4.9/include/CGAL/CORE/extLong.h:292:13: warning: ‘bool CORE::extLong::isNaN() const’ redeclared without dllimport attribute after being referenced with dll linkage

inline bool extLong::isNaN() const {

 

There are a number of similar errors that have been omitted here.

 

This same issue has been submitted as http://stackoverflow.com/questions/41274230/cannot-make-cgal-examples-in-cygwin.

 

Thanks!!!

 

Phil Anzel

Senior Developer

Work: 970-295-5440  | [hidden email]

2150 Centre Ave, Bldg A, Fort Collins, CO 80526

USDA/NRCS Contractor - Team ASRC Federal Vistronix | Customer-Focused. Operationally Excellent.

 

This electronic message contains information generated by the USDA solely for the intended recipients.  Any unauthorized interception of this message or the use or disclosure of the information it contains may violate the law and subject the violator to civil or criminal penalties.  If you believe you have received this message in error, please notify the sender and delete the email immediately.

 

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Cannot make CGAL examples in Cygwin

Laurent Rineau (CGAL/GeometryFactory)
Le Thursday, December 22, 2016 1:06:59 AM CET Anzel, Phil - NRCS, Fort
Collins, CO a écrit :

> Hello,
>
> I am unable to build some of the CGAL examples under Cygwin. All of the
> failing examples share similar error messages.
>
> Any guidance would be most appreciated.
>
> Following are the steps that I followed and a sample error from a "make".
>
> Cygwin (x64) installed under Windows 7 to d:\cygwin64.
>
> CGAL source downloaded from
> https://github.com/CGAL/cgal/releases/download/releases%2FCGAL-4.9/CGAL-4.
> 9.zip and unzipped to D:\cygwin64\usr\CGAL-4.9
>
> All libraries supposedly needed for CGAL were installed via the Cygwin x64
> setup.
>
> Initial cmake:
>     cd /usr/CGAL-4.9
>     cmake -DCMAKE_LEGACY_CYGWIN_WIN32=1 -DWITH_CGAL_Qt5=OFF
> -DWITH_examples=ON  .

The support of CGAL for Cygwin is... well... it is not supported! It is not
because we do not want to but, my lack of resources, we have never tried.

It seems the compilation errors you have are related to the CGAL DLLs. You
should try the new header-only feature: add the option

    -DCGAL_HEADER_ONLY=ON

to your CMake command line. That should suppress the compilation errors about
dllimport/dllexport. ... But that might introduce new errors. Let us know.

--
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
|  
Report Content as Inappropriate

RE: Cannot make CGAL examples in Cygwin

Anzel, Phil - NRCS, Fort Collins, CO
Hello Dr. Rineau,

Thanks for your suggestion. I'm afraid that using "-DCGAL_HEADER_ONLY=ON" was a step backwards - the updated "cmake" command line yielded a possibly-incorrect Makefile. Running "make" performed no compilation or linkage, as a consequence no DLLs were created. Varying parameter CMAKE_LEGACY_CYGWIN_WIN32 (i.e., using either 0 or 1) had no effect on the outcome.

I'm hoping that you or another correspondent can suggest a way forward.

Here are the details of running "cmake" and "make":

  cd /usr/CGAL-4.9
  rm CMakeCache.txt

  cd /usr/CGAL-4.9
  make clean
  cmake -DCMAKE_LEGACY_CYGWIN_WIN32=0 -DWITH_CGAL_Qt5=OFF -DWITH_examples=OFF -DCGAL_HEADER_ONLY=ON .

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

== Generate version files ==
-- CGAL_MAJOR_VERSION=4
-- CGAL_MINOR_VERSION=9
-- CGAL_BUGFIX_VERSION=0
-- CGAL_SONAME_VERSION=12
-- CGAL_SOVERSION     =12.0.0
-- CGAL_REFERENCE_CACHE_DIR=
-- Building shared libraries
-- Targetting Unix Makefiles
-- Using /usr/bin/c++.exe compiler.
-- USING CMake version: 3.6.2
-- System: CYGWIN
-- USING GCC_VERSION = '5.4.0'
-- 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 ...
-- Found GMP: /usr/lib/libgmp.dll.a
-- GMP has been preconfigured:
--   UseGMP-file:
--   GMP include:      /usr/include
--   GMP libraries:    /usr/lib/libgmp.dll.a
--   GMP definitions:
-- USING GMP_VERSION = '6.1.1'
-- Preconfiguring library: MPFR ...
-- Found MPFR: /usr/lib/libmpfr.dll.a
-- MPFR has been preconfigured:
--   UseMPFR-file:
--   MPFR include:      /usr/include
--   MPFR libraries:    /usr/lib/libmpfr.dll.a
--   MPFR definitions:
-- USING MPFR_VERSION = '3.1.5'
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Found Threads: TRUE
-- Boost version: 1.60.0
-- Found the following Boost libraries:
--   thread
--   system
--   chrono
--   date_time
--   atomic
-- Boost include:     /usr/include
-- Boost libraries:   /usr/lib/libboost_thread.dll.a;/usr/lib/libboost_system.dll.a;/usr/lib/libboost_chrono.dll.a;/usr/lib/libboost_date_time.dll.a;/usr/lib/libboost_atomic.dll.a
-- Boost definitions:
-- USING BOOST_VERSION = '1.60.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
libCGAL_Core is configured
-- Sources for CGAL component library 'CGAL_ImageIO' detected
Configuring libCGAL_ImageIO
-- Found ZLIB: /usr/lib/libz.dll.a (found version "1.2.8")
-- USING ZLIB_VERSION = '1.2.8'
-- Requested component: MPFR
-- Requested component: GMP
libCGAL_ImageIO is configured
-- Sources for CGAL component library 'CGAL_Qt5' detected
-- 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: /usr/CGAL-4.9

  cd /usr/CGAL-4.9
  make --debug=v

GNU Make 4.2.1
Built for x86_64-unknown-cygwin
Copyright (C) 1988-2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Reading makefiles...
Reading makefile 'Makefile'...
Updating makefiles....
Updating goal targets....
Considering target file 'default_target'.
 File 'default_target' does not exist.
  Considering target file 'all'.
   File 'all' does not exist.
    Considering target file 'cmake_check_build_system'.
     File 'cmake_check_build_system' does not exist.
     Finished prerequisites of target file 'cmake_check_build_system'.
    Must remake target 'cmake_check_build_system'.
    Successfully remade target file 'cmake_check_build_system'.
   Finished prerequisites of target file 'all'.
  Must remake target 'all'.
GNU Make 4.2.1
Built for x86_64-unknown-cygwin
Copyright (C) 1988-2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Reading makefiles...
Reading makefile 'CMakeFiles/Makefile2'...
Updating makefiles....
Updating goal targets....
Considering target file 'all'.
 File 'all' does not exist.
 Finished prerequisites of target file 'all'.
Must remake target 'all'.
Successfully remade target file 'all'.
  Successfully remade target file 'all'.
 Finished prerequisites of target file 'default_target'.
Must remake target 'default_target'.
Successfully remade target file 'default_target'.


Respectfully,

Phil Anzel
Senior Developer
Work: 970-295-5440  Cell: 307-760-9354 | [hidden email]
2150 Centre Ave, Bldg A, Fort Collins, CO 80526
USDA/NRCS Contractor - Team ASRC Federal Vistronix | Customer-Focused. Operationally Excellent.

This electronic message contains information generated by the USDA solely for the intended recipients.  Any unauthorized interception of this message or the use or disclosure of the information it contains may violate the law and subject the violator to civil or criminal penalties.  If you believe you have received this message in error, please notify the sender and delete the email immediately.


-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Laurent Rineau (CGAL/GeometryFactory)
Sent: Thursday, December 22, 2016 3:39 AM
To: [hidden email]
Subject: Re: [cgal-discuss] Cannot make CGAL examples in Cygwin

Le Thursday, December 22, 2016 1:06:59 AM CET Anzel, Phil - NRCS, Fort Collins, CO a écrit :

> Hello,
>
> I am unable to build some of the CGAL examples under Cygwin. All of
> the failing examples share similar error messages.
>
> Any guidance would be most appreciated.
>
> Following are the steps that I followed and a sample error from a "make".
>
> Cygwin (x64) installed under Windows 7 to d:\cygwin64.
>
> CGAL source downloaded from
> https://github.com/CGAL/cgal/releases/download/releases%2FCGAL-4.9/CGAL-4.
> 9.zip and unzipped to D:\cygwin64\usr\CGAL-4.9
>
> All libraries supposedly needed for CGAL were installed via the Cygwin
> x64 setup.
>
> Initial cmake:
>     cd /usr/CGAL-4.9
>     cmake -DCMAKE_LEGACY_CYGWIN_WIN32=1 -DWITH_CGAL_Qt5=OFF
> -DWITH_examples=ON  .

The support of CGAL for Cygwin is... well... it is not supported! It is not because we do not want to but, my lack of resources, we have never tried.

It seems the compilation errors you have are related to the CGAL DLLs. You should try the new header-only feature: add the option

    -DCGAL_HEADER_ONLY=ON

to your CMake command line. That should suppress the compilation errors about dllimport/dllexport. ... But that might introduce new errors. Let us know.

--
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



--
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
|  
Report Content as Inappropriate

RE: Cannot make CGAL examples in Cygwin

Marc Glisse
On Thu, 22 Dec 2016, Anzel, Phil - NRCS, Fort Collins, CO wrote:

> Thanks for your suggestion. I'm afraid that using
> "-DCGAL_HEADER_ONLY=ON" was a step backwards - the updated "cmake"
> command line yielded a possibly-incorrect Makefile. Running "make"
> performed no compilation or linkage, as a consequence no DLLs were
> created.

Please read the name of the option slowly: header-only. If necessary, you
can read https://en.wikipedia.org/wiki/Header-only . The absence of the
DLL is a feature, it is the whole point of this option.

--
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


Loading...