Problems with OS X, GCC 4.2.1 and arrangement_2

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

Problems with OS X, GCC 4.2.1 and arrangement_2

Ben Supnik
Hi Y'all,

I've hit a case where I get assertion failures doing an insert_curves on
the arrangement_2 class.  (Exact numeric type, segment traits with
history, CGAL 3.3.1.)

Here's the rub:

On Linux (GCC 4.2.4) my code runs properly.

On OS X (GCC 4.2.1 build 5566) my code hits a precondition violation.

Has anyone hit this before?  Is anyone working with CGAL on a known good
Mac compiler?

I am building GCC 4.3.3 now to try that...

cheers
ben
--
Scenery Home Page: http://scenery.x-plane.com/
Scenery blog: http://xplanescenery.blogspot.com/
Plugin SDK: http://www.xsquawkbox.net/xpsdk/
X-Plane Wiki: http://wiki.x-plane.com/
Scenery mailing list: [hidden email]
Developer mailing list: [hidden email]
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Problems with OS X, GCC 4.2.1 and arrangement_2

Sylvain Pion
Administrator
Ben Supnik a écrit :

> Hi Y'all,
>
> I've hit a case where I get assertion failures doing an insert_curves on
> the arrangement_2 class.  (Exact numeric type, segment traits with
> history, CGAL 3.3.1.)
>
> Here's the rub:
>
> On Linux (GCC 4.2.4) my code runs properly.
>
> On OS X (GCC 4.2.1 build 5566) my code hits a precondition violation.
>
> Has anyone hit this before?  Is anyone working with CGAL on a known good
> Mac compiler?
>
> I am building GCC 4.3.3 now to try that...

Do compiler optimization options make a difference?

--
Sylvain Pion
INRIA Sophia-Antipolis
Geometrica Project-Team
CGAL, http://cgal.org/
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Problems with OS X, GCC 4.2.1 and arrangement_2

Ben Supnik
Hi Sylvain,

Happens with -O0.  Are there other things I should shut off to try to
produce even more "basic" output?  My original test had only -I to find
CGAL and the full path to the CGAL static archives.

cheers
ben

Sylvain Pion wrote:

> Ben Supnik a écrit :
>> Hi Y'all,
>>
>> I've hit a case where I get assertion failures doing an insert_curves
>> on the arrangement_2 class.  (Exact numeric type, segment traits with
>> history, CGAL 3.3.1.)
>>
>> Here's the rub:
>>
>> On Linux (GCC 4.2.4) my code runs properly.
>>
>> On OS X (GCC 4.2.1 build 5566) my code hits a precondition violation.
>>
>> Has anyone hit this before?  Is anyone working with CGAL on a known
>> good Mac compiler?
>>
>> I am building GCC 4.3.3 now to try that...
>
> Do compiler optimization options make a difference?
>

--
Scenery Home Page: http://scenery.x-plane.com/
Scenery blog: http://xplanescenery.blogspot.com/
Plugin SDK: http://www.xsquawkbox.net/xpsdk/
X-Plane Wiki: http://wiki.x-plane.com/
Scenery mailing list: [hidden email]
Developer mailing list: [hidden email]
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Problems with OS X, GCC 4.2.1 and arrangement_2

Sylvain Pion
Administrator
Ben Supnik a écrit :
> Hi Sylvain,
>
> Happens with -O0.  Are there other things I should shut off to try to
> produce even more "basic" output?  My original test had only -I to find
> CGAL and the full path to the CGAL static archives.

You should also not forget -frounding-math.

Also, try CGAL 3.4.

Then, give a full description of "the assertion failures".

> cheers
> ben
>
> Sylvain Pion wrote:
>> Ben Supnik a écrit :
>>> Hi Y'all,
>>>
>>> I've hit a case where I get assertion failures doing an insert_curves
>>> on the arrangement_2 class.  (Exact numeric type, segment traits with
>>> history, CGAL 3.3.1.)
>>>
>>> Here's the rub:
>>>
>>> On Linux (GCC 4.2.4) my code runs properly.
>>>
>>> On OS X (GCC 4.2.1 build 5566) my code hits a precondition violation.
>>>
>>> Has anyone hit this before?  Is anyone working with CGAL on a known
>>> good Mac compiler?
>>>
>>> I am building GCC 4.3.3 now to try that...
>>
>> Do compiler optimization options make a difference?
>>
>


--
Sylvain Pion
INRIA Sophia-Antipolis
Geometrica Project-Team
CGAL, http://cgal.org/
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Problems with OS X, GCC 4.2.1 and arrangement_2

Ben Supnik
Hi Sylvain,

Aha!!  -frounding-math was it!!  Thank you!!!

Basically with -frounding-math 4.2.1 works even with -O3 and 0Os. :-)

-fno-rounding-math is listed as "experimental" in the man page...and yet
it is the default - who knew??

Cheers
Ben





Sylvain Pion wrote:

> Ben Supnik a écrit :
>> Hi Sylvain,
>>
>> Happens with -O0.  Are there other things I should shut off to try to
>> produce even more "basic" output?  My original test had only -I to
>> find CGAL and the full path to the CGAL static archives.
>
> You should also not forget -frounding-math.
>
> Also, try CGAL 3.4.
>
> Then, give a full description of "the assertion failures".
>
>> cheers
>> ben
>>
>> Sylvain Pion wrote:
>>> Ben Supnik a écrit :
>>>> Hi Y'all,
>>>>
>>>> I've hit a case where I get assertion failures doing an
>>>> insert_curves on the arrangement_2 class.  (Exact numeric type,
>>>> segment traits with history, CGAL 3.3.1.)
>>>>
>>>> Here's the rub:
>>>>
>>>> On Linux (GCC 4.2.4) my code runs properly.
>>>>
>>>> On OS X (GCC 4.2.1 build 5566) my code hits a precondition violation.
>>>>
>>>> Has anyone hit this before?  Is anyone working with CGAL on a known
>>>> good Mac compiler?
>>>>
>>>> I am building GCC 4.3.3 now to try that...
>>>
>>> Do compiler optimization options make a difference?
>>>
>>
>
>

--
Scenery Home Page: http://scenery.x-plane.com/
Scenery blog: http://xplanescenery.blogspot.com/
Plugin SDK: http://www.xsquawkbox.net/xpsdk/
X-Plane Wiki: http://wiki.x-plane.com/
Scenery mailing list: [hidden email]
Developer mailing list: [hidden email]
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Problems with OS X, GCC 4.2.1 and arrangement_2

Laurent Rineau (GeometryFactory)
In reply to this post by Ben Supnik
On Monday 30 March 2009 20:09:33 Ben Supnik wrote:
> Hi Y'all,
>
> I've hit a case where I get assertion failures doing an insert_curves on
> the arrangement_2 class. (Exact numeric type, segment traits with
> history, CGAL 3.3.1.)
>
> Here's the rub:
>
> On Linux (GCC 4.2.4) my code runs properly.
>
> On OS X (GCC 4.2.1 build 5566) my code hits a precondition violation.
>
> Has anyone hit this before?


Well, it happens from time to time. CGAL code is a kind of test suite for compilers. gcc-4.2 is known to be quite buggy, on MacOS but also on other platforms. With gcc-4.2, you usually need to use the compiler flag -fno-strict-aliasing, so that its optimizer does not assume the strict aliasing rule is followed (because that part of the optimizer of gcc-4.2 is buggy).


--
Laurent Rineau, PhD
Engineer at GeometryFactory
http://www.geometryfactory.com/