Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] CGAL 4.1 compile errors with Intel C++ compiler

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] CGAL 4.1 compile errors with Intel C++ compiler


Chronological Thread 
  • From: Philipp Moeller <>
  • To: "Garth N. Wells" <>
  • Cc:
  • Subject: Re: [cgal-discuss] CGAL 4.1 compile errors with Intel C++ compiler
  • Date: Fri, 04 Jan 2013 23:16:06 +0100
  • Organization: GeometryFactory

"Garth N. Wells"
<>
writes:

> On Wed, Nov 21, 2012 at 8:06 AM, Laurent Rineau (CGAL/GeometryFactory)
> <>
> wrote:
>> Le mardi 20 novembre 2012 22:35:41 Garth N. Wells a écrit :
>>> On Tue, Nov 20, 2012 at 9:41 PM, Laurent Rineau (CGAL/GeometryFactory)
>>>
>>> <>
>>> wrote:
>>> > Le mardi 20 novembre 2012 21:13:01 Garth N. Wells a écrit :
>>> >> I've been using CGAL 4.1 for a while with gcc 4.7 without problems.
>>> >> I've just upgraded to CGAL 4.1 (from 4.0.2) on a machine that has
>>> >>
>>> >> Intel compilers installed. icpc -v gives:
>>> >> icpc version 12.1.4 (gcc version 4.4.6 compatibility))
>>> >>
>>> >> I now get a load of compiler errors from the file
>>> >> CGAL/internal/Intersections_3/Bbox_3_Triangle_3_do_intersect.h:
>>> >>
>>> >>
>>> >> CGAL/internal/Intersections_3/Bbox_3_Triangle_3_do_intersect.h(206):
>>> >> error:
>>> >> destructible entities are not allowed inside of a statement expression
>>> >>
>>> >> return CGAL_OR(
>>> >> (do_axis_intersect_aux<K,AXE,SIDE>(p_min.y()-j->y(),
>>> >>
>>> >> p_min.z()-j->z(), sides) <= 0),
>>> >>
>>> >>
>>> >> Any suggestions on how to work around this?
>>> >
>>> > Which compiler flags have you used?
>>>
>>> -fp-model strict -openmp -O3 -xHost
>>
>> There are other flags, such as several -I.
>>
>> My guess is that you are using the Intel compiler with the the
>> <CGAL/compiler_config.h> that was generated during the compilation of CGAL
>> libraries with g++. Please rebuild your CGAL libraries with that the Intel
>> Compiler. icpc version 12.1 should be supported. It is in the set of tested
>> compilers in the CGAL daily tests suite.
>>
>
> Sorry for the delay. I've only just now has a chance to get back to this.
>
> I've built CGAL 4.0.2 and 4.1 with the Intel compilers (versions
> 12.1.4 and 13.0.1). Looks like a bug has been introduced to the CGAL
> build system, which since 4.1 does not test for
> CGAL_CFG_NO_STATEMENT_EXPRESSIONS. With 4.0.2, when running CMake I
> see:
>
> -- Performing Test CGAL_CFG_NO_STATEMENT_EXPRESSIONS - Failed
>
> and there is the file
> config/testfiles/CGAL_CFG_NO_STATEMENT_EXPRESSIONS.cpp.
>
>
> With CGAL 4.1, there is no test for CGAL_CFG_NO_STATEMENT_EXPRESSIONS,
> the above file has been removed and CGAL_CFG_NO_STATEMENT_EXPRESSIONS
> does not appear anywhere in the CMakeCache.txt file.

That file has been replaced with

#if !defined(__GNUC__)
#define CGAL_CFG_NO_STATEMENT_EXPRESSIONS 1
#endif

in CGAL/config.h and afaik the Intel compiler also supports statement
expressions. But it seems the support is with a twist [1].

#if !defined(__GNUC__) || defined(__INTEL_COMPILER)
#define CGAL_CFG_NO_STATEMENT_EXPRESSIONS 1
#endif

should fix it.

Ultimately, we should simply replace the code that uses statement
expressions.

> Adding
>
> -DCGAL_CFG_NO_STATEMENT_EXPRESSIONS
>
> to my library build flags is a work around, but isn't a solution
> because CGAL should be figuring the flags out.
>
> Garth

Footnotes:
[1] http://software.intel.com/en-us/articles/cdiag1487



Archive powered by MHonArc 2.6.18.

Top of Page