[cgma-dev] OCC MacOS compile successful

Rajeev Jain jain at mcs.anl.gov
Mon Mar 5 16:18:45 CST 2012


CGM - based on OCC 6.5/MOAB/Lasso and MeshKit all compile on Mac OSX 10.7.3 with XCode-4.3. make check failure is a 64bit specific problem. 
Other code projects are facing the same problem: http://new-supercollider-mailing-lists-forums-use-these.2681727.n2.nabble.com/supercollider-Bugs-3478895-escapeWindow-crashes-app-td7283477.html

Below is the backtrace of test_edge_orient.
 bt
#0  0x00007fff962c811e in _Unwind_Resume_or_Rethrow ()
#1  0x0000000101b96749 in Transfer_ProcessForTransient::Transferring ()
#2  0x0000000101b968b1 in Transfer_ProcessForTransient::Transfer ()
#3  0x0000000101c1a3ee in XSControl_TransferReader::TransferOne ()
#4  0x0000000101c12c96 in XSControl_Reader::TransferRoots ()
#5  0x00000001000e0657 in OCCQueryEngine::import_solid_model (this=0x109706cd0, file_name=0x1097073a8 "ilc_13body.stp", file_type=0x109707248 "STEP", imported_entities=@0x7fff5fbff2d8, print_results=true, logfile_name=0x0, heal_step=true, import_bodies=true, import_surfaces=true, import_curves=true, import_vertices=true, free_surfaces=true) at OCCQueryEngine.cpp:1513
#6  0x000000010051346e in GeometryQueryTool::import_solid_model (this=0x109704b90, file_name=0x1097073a8 "ilc_13body.stp", file_type=0x109707248 "STEP", logfile_name=0x0, heal_step=true, import_bodies=true, import_surfaces=true, import_curves=true, import_vertices=true, free_surfaces=true, imported_entities=0x0) at GeometryQueryTool.cpp:992
#7  0x000000010041cf01 in CubitCompat_import_solid_model (file_name=0x1097073a8 "ilc_13body.stp", file_type=0x109707248 "STEP", logfile_name=0x0, heal_step=true, import_bodies=true, import_surfaces=true, import_curves=true, import_vertices=true, free_surfaces=true, imported_entities=0x0) at CubitCompat.cpp:85
#8  0x00000001000338d0 in igeom_load_ (instance=0x10083d760, name=0x1097073a8 "ilc_13body.stp", options=0x0, err=0x7fff5fbff95c, name_len=14, options_size=0) at iGeom_CGMA.cc:439
#9  0x0000000100002188 in main (argc=1, argv=0x7fff5fbff9d8) at test_edge_orient.cc:59
(gdb) 
 

The error message is:
........
.....
  ***  Error on Record 2643 (on 9879 -> 26 % in File)  ***  Ident #1439
Complex Type incorrect : GEOMETRIC_REPRESENTATION_ITEM / CURVE ... 
  ***  Error on Record 2657 (on 9879 -> 26 % in File)  ***  Ident #1444
Complex Type incorrect : RATIONAL_B_SPLINE_CURVE / BOUNDED_CURVE ... 
  ***  Error on Record 2659 (on 9879 -> 26 % in File)  ***  Ident #1444
Complex Type incorrect : REPRESENTATION_ITEM / GEOMETRIC_REPRESENTATION_ITEM ... 
  ***  Error on Record 2660 (on 9879 -> 26 % in File)  ***  Ident #1444
Complex Type incorrect : GEOMETRIC_REPRESENTATION_ITEM / CURVE ... 
      ... Step File loaded  ... 
Elapsed time: 0 Hours 0 Minutes 0.147091 Seconds 
CPU user time: 0.01 seconds 
CPU system time: 0 seconds 
   9879 records (entities,sub-lists,scopes), 29736 parameters

      ... Parameters prepared ... Elapsed time: 0 Hours 0 Minutes 0.151193 Seconds 
CPU user time: 0.01 seconds 
CPU system time: 0 seconds 
Report : 75 unknown entities
      ...   Objets analysed  ... 
Elapsed time: 0 Hours 0 Minutes 0.158354 Seconds 
CPU user time: 0.02 seconds 
CPU system time: 0 seconds 
  STEP Loading done : 5784 Entities

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000015
0x00007fff962c811e in _Unwind_Resume_or_Rethrow ()
(gdb) 
No source file named address.




Rajeev



>________________________________
> From: Jane Hu <janejhu at gmail.com>
>To: Rajeev Jain <jain at mcs.anl.gov> 
>Cc: Tim Tautges <tautges at mcs.anl.gov>; CGMA Development <cgma-dev at mcs.anl.gov>; James Tautges <jamesdtautges at gmail.com> 
>Sent: Tuesday, February 28, 2012 12:26 PM
>Subject: Re: [cgma-dev] OCC MacOS compile successful
> 
>
>Can you give me some detailed debug info.? it runs ok on Linux.
>
>Thanks.
>
>Jane
>
>
>On Tue, Feb 28, 2012 at 11:41 AM, Rajeev Jain <jain at mcs.anl.gov> wrote:
>
>Thanks, Jane. I made a couple of changes in addition to checking out the latest version and recompilng:
>>1. Installed gcc -4.7 (The previous error might be a compiler issue as per http://www.opencascade.org/org/forum/thread_19739/)
>>2. Applied the OCC652 patch in cgm/geom/occ
>>
>>
>>make works !
>>make check gives me this error 
>>make  check-TESTS
>>Geometry engine set to: OpenCascade 6.5
>>      ...    Step File Reading : ilc_13body.stp
>>      ...    STEP File   Read    ... 
>>Elapsed time: 0 Hours 0 Minutes 0.007108 Seconds 
>>CPU user time: 0.01 seconds 
>>CPU system time: 0 seconds 
>>  ***  Error on Record 648 (on 9879 -> 6 % in File)  ***  Ident #479
>>Complex Type incorrect : SOLID_ANGLE_UNIT / SI_UNIT ... 
>>  ***  Error on Record 862 (on 9879 -> 8 % in File)  ***  Ident #650
>>Complex Type incorrect : NAMED_UNIT / LENGTH_UNIT ... 
>>  ***  Error on Record 1489 (on 9879 -> 15 % in File)  ***  Ident #1115
>>Complex Type incorrect : RATIONAL_B_SPLINE_CURVE / BOUNDED_CURVE ... 
>>  ***  Error 
>>..................
>> ***  Error on Record 2660 (on 9879 -> 26 % in File)  ***  Ident #1444
>>Complex Type incorrect : GEOMETRIC_REPRESENTATION_ITEM / CURVE ... 
>>      ... Step File loaded  ... 
>>Elapsed time: 0 Hours 0 Minutes 0.01294 Seconds 
>>CPU user time: 0.01 seconds 
>>CPU system time: 0 seconds 
>>   9879 records (entities,sub-lists,scopes), 29736 parameters
>>
>>
>>      ... Parameters prepared ... Elapsed time: 0 Hours 0 Minutes 0.016723 Seconds 
>>CPU user time: 0.02 seconds 
>>CPU system time: 0 seconds 
>>Report : 75 unknown entities
>>      ...   Objets analysed  ... 
>>Elapsed time: 0 Hours 0 Minutes 0.023135 Seconds 
>>CPU user time: 0.02 seconds 
>>CPU system time: 0 seconds 
>>  STEP Loading done : 5784 Entities
>>/bin/sh: line 1: 29000 Segmentation fault: 11  ${dir}$tst
>>FAIL: test_edge_orient
>>Using default input file: ./../test/LeverArm.brep
>>Geometry engine set to: OpenCascade 6.5
>>
>>
>>
>>
>>ITAPS GEOMETRY INTERFACE TEST PROGRAM:
>>
>>
>>/bin/sh: line 1: 29019 Segmentation fault: 11  ${dir}$tst
>>FAIL: testgeom_occ
>>
>>
>>
>>
>>
>>
>>Creating Prism
>>
>>
>>terminate called throwing an exception
>>
>>
>>/bin/sh: line 1: 29037 Abort trap: 6           ${dir}$tst
>>FAIL: copy_attrib
>>===================
>>3 of 3 tests failed
>>===================
>>make[4]: *** [check-TESTS] Error 1
>>make[3]: *** [check-am] Error 2
>>make[2]: *** [check-recursive] Error 1
>>make[1]: *** [check] Error 2
>>make: *** [check-recursive] Error 1
>>
>>
>> 
>>Rajeev
>>
>>
>>
>>>________________________________
>>> From: Jane Hu <janejhu at gmail.com>
>>>To: Rajeev Jain <jain at mcs.anl.gov> 
>>>Cc: Tim Tautges <tautges at mcs.anl.gov>; CGMA Development <cgma-dev at mcs.anl.gov>; James Tautges <jamesdtautges at gmail.com> 
>>>Sent: Tuesday, February 28, 2012 10:28 AM
>>>
>>>Subject: Re: [cgma-dev] OCC MacOS compile successful
>>> 
>>>
>>>
>>>
>>>Hi, Rajeev,
>>>
>>>I just checked in r5411, please update your cgm to see if it fixes the problem.
>>>
>>>Jane
>>>
>>>
>>>On Mon, Feb 27, 2012 at 2:22 PM, Rajeev Jain <jain at mcs.anl.gov> wrote:
>>>
>>>Right, I was missing DYLD_LBRARY_PATH. CGM configures now, make runs for a while then I get the following error:
>>>>....
>>>>In copy constructor 'BRepBuilderAPI_MakeShape::BRepBuilderAPI_MakeShape(const BRepBuilderAPI_MakeShape&)':
>>>>/Users/rajeevjain/Downloads/OpenCASCADE652/ros/install/inc/TopTools_ListOfShape.hxx:112: error: 'TopTools_ListOfShape::TopTools_ListOfShape(const TopTools_ListOfShape&)' is private
>>>>/Users/rajeevjain/Downloads/OpenCASCADE652/ros/install/inc/BRepBuilderAPI_MakeShape.hxx:38: error: within this context
>>>>/Users/rajeevjain/Downloads/OpenCASCADE652/ros/install/inc/BRepBuilderAPI_MakeWire.hxx: In copy constructor 'BRepBuilderAPI_MakeWire::BRepBuilderAPI_MakeWire(const BRepBuilderAPI_MakeWire&)':
>>>>/Users/rajeevjain/Downloads/OpenCASCADE652/ros/install/inc/BRepBuilderAPI_MakeWire.hxx:66: note: synthesized method 'BRepBuilderAPI_MakeShape::BRepBuilderAPI_MakeShape(const BRepBuilderAPI_MakeShape&)' first required here 
>>>>/Users/rajeevjain/Downloads/OpenCASCADE652/ros/install/inc/TopTools_ListOfShape.hxx: In copy constructor 'BRepLib_MakeShape::BRepLib_MakeShape(const BRepLib_MakeShape&)':
>>>>/Users/rajeevjain/Downloads/OpenCASCADE652/ros/install/inc/TopTools_ListOfShape.hxx:112: error: 'TopTools_ListOfShape::TopTools_ListOfShape(const TopTools_ListOfShape&)' is private
>>>>/Users/rajeevjain/Downloads/OpenCASCADE652/ros/install/inc/BRepLib_MakeShape.hxx:46: error: within this context
>>>>/Users/rajeevjain/Downloads/OpenCASCADE652/ros/install/inc/TopTools_ListOfShape.hxx:112: error: 'TopTools_ListOfShape::TopTools_ListOfShape(const TopTools_ListOfShape&)' is private
>>>>/Users/rajeevjain/Downloads/OpenCASCADE652/ros/install/inc/BRepLib_MakeShape.hxx:46: error: within this context
>>>>/Users/rajeevjain/Downloads/OpenCASCADE652/ros/install/inc/TopTools_ListOfShape.hxx:112: error: 'TopTools_ListOfShape::TopTools_ListOfShape(const TopTools_ListOfShape&)' is private
>>>>/Users/rajeevjain/Downloads/OpenCASCADE652/ros/install/inc/BRepLib_MakeShape.hxx:46: error: within this context
>>>>/Users/rajeevjain/Downloads/OpenCASCADE652/ros/install/inc/BRepLib_MakeWire.hxx: In copy constructor 'BRepLib_MakeWire::BRepLib_MakeWire(const BRepLib_MakeWire&)':
>>>>/Users/rajeevjain/Downloads/OpenCASCADE652/ros/install/inc/BRepLib_MakeWire.hxx:81: note: synthesized method 'BRepLib_MakeShape::BRepLib_MakeShape(const BRepLib_MakeShape&)' first required here 
>>>>/Users/rajeevjain/Downloads/OpenCASCADE652/ros/install/inc/TopTools_MapOfShape.hxx:88: error: 'TopTools_MapOfShape::TopTools_MapOfShape(const TopTools_MapOfShape&)' is private
>>>>/Users/rajeevjain/Downloads/OpenCASCADE652/ros/install/inc/BRepLib_MakeWire.hxx:81: error: within this context
>>>>/Users/rajeevjain/Downloads/OpenCASCADE652/ros/install/inc/BRepBuilderAPI_MakeWire.hxx: In copy constructor 'BRepBuilderAPI_MakeWire::BRepBuilderAPI_MakeWire(const BRepBuilderAPI_MakeWire&)':
>>>>/Users/rajeevjain/Downloads/OpenCASCADE652/ros/install/inc/BRepBuilderAPI_MakeWire.hxx:66: note: synthesized method 'BRepLib_MakeWire::BRepLib_MakeWire(const BRepLib_MakeWire&)' first required here 
>>>>OCCModifyEngine.cpp: In member function 'CubitStatus OCCModifyEngine::do_loft(BRepOffsetAPI_ThruSections&, DLIList<DLIList<TopoDS_Edge*>*>) const':
>>>>OCCModifyEngine.cpp:952: note: synthesized method 'BRepBuilderAPI_MakeWire::BRepBuilderAPI_MakeWire(const BRepBuilderAPI_MakeWire&)' first required here 
>>>>make[4]: *** [OCCModifyEngine.lo] Error 1
>>>>make[3]: *** [all-recursive] Error 1
>>>>make[2]: *** [all] Error 2
>>>>make[1]: *** [all-recursive] Error 1
>>>>make: *** [all] Error 2
>>>>
>>>>
>>>> 
>>>>Rajeev
>>>>
>>>>
>>>>
>>>>>________________________________
>>>>> From: Jane Hu <janejhu at gmail.com>
>>>>>To: Rajeev Jain <jain at mcs.anl.gov> 
>>>>>Cc: Tim Tautges <tautges at mcs.anl.gov>; CGMA Development <cgma-dev at mcs.anl.gov>; James Tautges <jamesdtautges at gmail.com> 
>>>>>Sent: Monday, February 27, 2012 9:42 AM
>>>>>Subject: Re: [cgma-dev] OCC MacOS compile successful
>>>>> 
>>>>>
>>>>>
>>>>>Hi, Rajeev:
>>>>>
>>>>>It's good news that you are able to build OCC in Mac!
>>>>>
>>>>>I saw this error before too in building CGM on OCC on Linux. However, it turned out to be a set up problem. Can you look at config.log, and check if it said that you are using the correctly OCC library? You have to set the LD_LIBRARY_PATH to include your new build directory.
>>>>>
>>>>>Hope it helps.
>>>>>
>>>>>Jane
>>>>>
>>>>>
>>>>>On Fri, Feb 24, 2012 at 12:21 PM, Rajeev Jain <jain at mcs.anl.gov> wrote:
>>>>>
>>>>>Thanks, James.
>>>>>>I was able to build OCC. Did you get CGM to work?
>>>>>>Configuring CGM I get this:
>>>>>>checking if OpenCascade requires -lpthread... configure: error: Cannot link libTKKernel with Standard_Mutex
>>>>>>
>>>>>> 
>>>>>>Rajeev
>>>>>>
>>>>>>
>>>>>>
>>>>>>>________________________________
>>>>>>> From: Tim Tautges <tautges at mcs.anl.gov>
>>>>>>>To: CGMA Development <cgma-dev at mcs.anl.gov>; James Tautges <jamesdtautges at gmail.com> 
>>>>>>>Sent: Friday, January 6, 2012 9:10 AM
>>>>>>>Subject: [cgma-dev] OCC MacOS compile successful
>>>>>>> 
>>>>>>>
>>>>>>>Hi all,
>>>>>>>  Good news, last night my son James, hacker extraordinaire, got OCC 6.5.2 to compile successfully on MacOS.  The details:
>>>>>>>
>>>>>>>- Snow leopard, gcc4.2, OCC6.5.2 (straight from the OCC download page)
>>>>>>>- Besides the following changes, follow the steps on http://opencascade.blogspot.com/2010/04/porting-on-macos.html
>>>>>>>- Run "autoreconf -fi" in the ros folder and then "aclocal", "automake", and "autoconf"
>>>>>>>
>>>>>>>- Add the following code to the platform specific part of ros/src/OSD/OSD_Chronometer.cxx:
>>>>>>>#ifdef __MACH__
>>>>>>># include <time.h>
>>>>>>># include <sys/time.h>
>>>>>>># include <mach/clock.h>
>>>>>>># include <mach/mach.h>
>>>>>>>#endif
>>>>>>>
>>>>>>>- And then add this code to the OSD_Chronometer::GetThreadCPU function:
>>>>>>>#elif defined(__MACH__)
>>>>>>>  struct timespec ts;
>>>>>>>  clock_serv_t cclock;
>>>>>>>  mach_timespec_t mts;
>>>>>>>  host_get_clock_service(mach_host_self(), CALENDAR_CLOCK,
 &cclock);
>>>>>>>  clock_get_time(cclock, &mts);
>>>>>>>  mach_port_deallocate(mach_task_self(), cclock);
>>>>>>>  ts.tv_sec = mts.tv_sec;
>>>>>>>  ts.tv_nsec = mts.tv_nsec;
>>>>>>>
>>>>>>>- Proceed to configure, make, and install
>>>>>>>
>>>>>>>The new version of OSD_Chronometer.cxx is attached.
>>>>>>>
>>>>>>>We haven't built or tested CGM on top of this, but that's next.
>>>>>>>
>>>>>>>- tim
>>>>>>>
>>>>>>>--
>>>>>>>================================================================
>>>>>>>"You will keep in perfect peace him whose mind is
>>>>>>>  steadfast, because he trusts in you."               Isaiah 26:3
>>>>>>>
>>>>>>>             Tim Tautges            Argonne National Laboratory
>>>>>>>         (tautges at mcs.anl.gov)      (telecommuting from UW-Madison)
>>>>>>>phone (gvoice): (608)
 354-1459      1500 Engineering Dr.
>>>>>>>            fax: (608) 263-4499      Madison, WI 53706
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>
>>>>>
>>>>>
>>>
>>>
>>>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/cgma-dev/attachments/20120305/5a4943d1/attachment-0001.htm>


More information about the cgma-dev mailing list