Subject: CGAL users discussion list
List archive
- From: Andreas Fabri <>
- To:
- Subject: Re: [cgal-discuss] CGAL 5.1 compile errors when using Intel Compiler 19.1
- Date: Wed, 9 Sep 2020 09:00:08 +0200
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=None ; spf=None
- Ironport-phdr: 9a23:yZ8jLxQenJFNpKP2V6hj+sRh7tpsv+yvbD5Q0YIujvd0So/mwa67ZxWDt8tkgFKBZ4jH8fUM07OQ7/m+HzVavd3R6TgrS99lb1c9k8IYnggtUoauKHbQC7rUVRE8B9lIT1R//nu2YgB/Ecf6YEDO8DXptWZBUhrwOhBoKevrB4Xck9q41/yo+53Ufg5EmCexbal9IRmrrAjdrNQajZVtJ6o+yRbFv2ZDdvhLy29vOV+dhQv36N2q/J5k/SRQuvYh+NBFXK7nYak2TqFWASo/PWwt68LlqRfMTQ2U5nsBSWoWiQZHAxLE7B7hQJj8tDbxu/dn1ymbOc32Sq00WSin4qx2RhLklDsLOjgk+2zRl8d+jr9UoAi5qhJi3YDUboGbOvlwcKzTctwVR3ZOU91LWCBdGI6xdZcDAuQDMOtesoLzp0EOrRy7BQS0GO7vzCJHhmXo0qIgyOQqDAHI0xY7ENIUsXTfsdL4O70UUe+o1qnH0y/Mb+hM1Tfz8ofHaQohofCXULJ/b8XRzkwvGB3ZjlWKqY3lMSma2fgRs2ic9ephVfijhHIgqwF0uzWiwNonhYbViIwP0F/E6Tl5z5gvJd2+UEN3fMOoHZpeuSyHN4Z4TMIvTWF0tSskyrMLuYO2cScFxpoo2xPSaeCKfYiG7x/sWuucPCl0iGxkdbywiBu+7Uqtx+vhXce611ZKqzBKktjKtn0V1hzT7NKHSvpn8Uu71zaPzQbe4fxHL0AsjafWJJ8szqQtmpYPsUnPBCD7lUvsgKOLeUgo5vCk5uD7brn8u5OQKo55hhvxP6kugMCyAec1PhASU2SB5eiwzqHv8VflTLhMk/Y7jK3ZsI3BJcQHuKG5GRJb0oci6hmhFzqqzNIVlmQdIl1fYh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ljw1tLuR1SfSxP7zMhEAPzwTSQ==
Hi Andrew,
Thank you for your bug report/analysis/fix.
In the past we had supported the Intel compiler, but we had given
it up
mainly because there were no users of this compiler. We also had
observed
some compiler bugs in the CGAL testsuite, with no support from
Intel
for working around or fixing them.
We can give it another try if we find a sponsor.
Best regards,
Andreas
On 9/9/2020 12:08 AM, Andrew Cunningham
wrote:
And just to round out one more compiler issue with ICC 19.1
I had to modify FPU.h as there is no __builtin_sqrt on Windows
with ICC 19.1
// For SSE2, we need to call __builtin_sqrt() instead of
libc's sqrt().
#if defined ( _MSC_VER ) && defined ( __INTEL_COMPILER )
# define CGAL_BUG_SQRT(d) std::sqrt(d)
#else
# define CGAL_BUG_SQRT(d) __builtin_sqrt(d)
#endif
#if defined ( _MSC_VER ) && defined ( __INTEL_COMPILER )
# define CGAL_BUG_SQRT(d) std::sqrt(d)
#else
# define CGAL_BUG_SQRT(d) __builtin_sqrt(d)
#endif
On Tue, Sep 8, 2020 at 2:39 PM
Andrew Cunningham <> wrote:
I have found the cause of the CGAL 5.1 compilation
error with the Intel Compiler 19.1 and C++17.
This snippet of code is new to CGAL 5.1 and is used in
a series of headers such as Point_3.h
__cpp_lib_is_swappable is #defined when C++17 is defined
as the language standard.
friend void swap(Self& a, Self& b)
#ifdef __cpp_lib_is_swappable
noexcept(std::is_nothrow_swappable_v<Rep>)
#endif
#ifdef __cpp_lib_is_swappable
noexcept(std::is_nothrow_swappable_v<Rep>)
#endif
INMHO, this code is using an obscure and advanced C++17
(C++20?) feature for no real gain. I would suggest
reverting this change.
On Tue, Sep 8, 2020 at
1:23 PM Andrew Cunningham <>
wrote:
This ussue only seems to happen with
/std:c++17. If I change the language conformance to
/std:c++14 the code compiles with ICC 19.1
On Tue, Sep 8, 2020 at
12:34 PM Andrew Cunningham <>
wrote:
Hi,
Code that compiles without error when using
GCAL 5.0.3 now fails with 5.1 with Visual Studio
2019+Intel Compiler 19.1.
Code compiles without error when using the
native Microsoft compiler.
Since the same code compiled with 5.0.3 when
using ICC 19.1, maybe whatever changed from
5.0.3-5.1 is the key.
Sample code
#include <CGAL/Simple_cartesian.h>
#include <CGAL/Surface_mesh.h>
using Point_3 = CGAL::Simple_cartesian< float >::Point_3;
using Mesh = CGAL::Surface_mesh< Point_3 >;
using vertex_descriptor = Mesh::Vertex_index;
using face_descriptor = Mesh::Face_index;
#include <CGAL/Surface_mesh.h>
using Point_3 = CGAL::Simple_cartesian< float >::Point_3;
using Mesh = CGAL::Surface_mesh< Point_3 >;
using vertex_descriptor = Mesh::Vertex_index;
using face_descriptor = Mesh::Face_index;
Andrew
1>D:\CGAL-5.1\include\CGAL/Cartesian/Line_3.h(38):
error : incomplete type is not allowed
1> Point_3 first;1> ^
1> detected during:
1> instantiation of class "CGAL::LineC3<R_>::Rep [with R_=CGAL::Simple_cartesian<float>]" at line 46
1> instantiation of class "CGAL::LineC3<R_> [with R_=CGAL::Simple_cartesian<float>]" at line 30 of "D:\CGAL-5.1\include\CGAL/Line_3.h"
1> instantiation of class "CGAL::Line_3<R_> [with R_=CGAL::Simple_cartesian<float>]" at line 678 of "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.27.29110\include\type_traits"
1> instantiation of "const bool std::is_move_constructible_v [with _Ty=CGAL::VectorC3<CGAL::Simple_cartesian<float>>]" at line 61 of "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.27.29110\include\type_traits"
1> instantiation of class "std::conjunction<_First, _Rest...> [with _First=std::_Swappable_with_helper<std::add_lvalue_reference_t<CGAL::VectorC3<CGAL::Simple_cartesian<float>>>, std::add_lvalue_reference_t<CGAL::VectorC3<CGAL::Simple_cartesian<float>>>, void>, _Rest=<std::_Swappable_with_helper<std::add_lvalue_reference_t<CGAL::VectorC3<CGAL::Simple_cartesian<float>>>, std::add_lvalue_reference_t<CGAL::VectorC3<CGAL::Simple_cartesian<float>>>, void>>]" at line 66 of "C:\Program Files
1> (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.27.29110\include\type_traits"
1> [ 9 instantiation contexts not shown ]
1> instantiation of class "CGAL::Point_3<R_> [with R_=CGAL::Simple_cartesian<float>]" at line 213 of "D:\CGAL-5.1\include\CGAL/Surface_mesh/Properties.h"
1> instantiation of class "CGAL::Properties::Property_array<T> [with T=Point_3]" at line 515 of "D:\CGAL-5.1\include\CGAL/Surface_mesh/Properties.h"
1> instantiation of class "CGAL::Properties::Property_map_base<I, T, CRTP_derived_class> [with I=CGAL::SM_Vertex_index, T=Point_3, CRTP_derived_class=CGAL::Surface_mesh<Point_3>::Property_map<CGAL::SM_Vertex_index, Point_3>]" at line 342 of "D:\CGAL-5.1\include\CGAL/Surface_mesh/Surface_mesh.h"
1> instantiation of class "CGAL::Surface_mesh<P>::Property_map<I, T> [with P=Point_3, I=CGAL::SM_Vertex_index, T=Point_3]" at line 2098 of "D:\CGAL-5.1\include\CGAL/Surface_mesh/Surface_mesh.h"
1>
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss
-- Andreas Fabri, PhD Chief Officer, GeometryFactory Editor, The CGAL Project phone: +33.492.954.912 skype: andreas.fabri
- [cgal-discuss] CGAL 5.1 compile errors when using Intel Compiler 19.1, Andrew Cunningham, 09/08/2020
- Re: [cgal-discuss] CGAL 5.1 compile errors when using Intel Compiler 19.1, Andrew Cunningham, 09/08/2020
- Re: [cgal-discuss] CGAL 5.1 compile errors when using Intel Compiler 19.1, Andrew Cunningham, 09/08/2020
- Re: [cgal-discuss] CGAL 5.1 compile errors when using Intel Compiler 19.1, Andrew Cunningham, 09/09/2020
- Re: [cgal-discuss] CGAL 5.1 compile errors when using Intel Compiler 19.1, Andreas Fabri, 09/09/2020
- Re: [cgal-discuss] CGAL 5.1 compile errors when using Intel Compiler 19.1, Andrew Cunningham, 09/09/2020
- Re: [cgal-discuss] CGAL 5.1 compile errors when using Intel Compiler 19.1, Andreas Fabri, 09/09/2020
- Re: [cgal-discuss] CGAL 5.1 compile errors when using Intel Compiler 19.1, Andrew Cunningham, 09/09/2020
- Re: [cgal-discuss] CGAL 5.1 compile errors when using Intel Compiler 19.1, Andrew Cunningham, 09/08/2020
- Re: [cgal-discuss] CGAL 5.1 compile errors when using Intel Compiler 19.1, Andrew Cunningham, 09/08/2020
Archive powered by MHonArc 2.6.19+.