Linux install problem with opencascade

General discussion about TexGen.

Moderators: Martin, Developers

Post Reply
bart-cer
Posts: 5
Joined: Mon Sep 15, 2014 4:39 am

Linux install problem with opencascade

Post by bart-cer »

Hi,

I've installed the basic TexGen and the python interface on a Linux cluster without problem. Also OpenCascade has been installed correctly. However, when I try to compile the Export features of TexGen, I get the errors below.
Any clue what could be the reason?

Thanks,
Bart

Code: Select all

[ 96%] Building CXX object Export/CMakeFiles/TexGenExport.dir/Exporter.o
In file included from /projects/uoa00210/temp/OpenCASCADE/inc/Standard_Real.hxx:11:0,
                 from /projects/uoa00210/temp/OpenCASCADE/inc/gp_XYZ.hxx:17,
                 from /projects/uoa00210/temp/OpenCASCADE/inc/gp_Pnt.hxx:17,
                 from /projects/uoa00210/temp/texgen/TexGen/Export/Exporter.cpp:3:
/projects/uoa00210/temp/OpenCASCADE/inc/Standard_math.hxx:32:0: warning: "M_SQRT1_2" redefined [enabled by default]
 # define M_SQRT1_2  7.0710678118654752440E-1
 ^
In file included from /gpfs1m/apps/easybuild/RHEL6.3/westmere/software/GCC/4.8.2/include/c++/4.8.2/cmath:44:0,
                 from /projects/uoa00210/temp/texgen/TexGen/Export/../Core/mymath.h:22,
                 from /projects/uoa00210/temp/texgen/TexGen/Export/../Core/PrecompiledHeaders.h:34,
                 from /projects/uoa00210/temp/texgen/TexGen/Export/Exporter.h:5,
                 from /projects/uoa00210/temp/texgen/TexGen/Export/Exporter.cpp:1:
/usr/include/math.h:369:0: note: this is the location of the previous definition
 # define M_SQRT1_2 0.70710678118654752440 /* 1/sqrt(2) */
 ^
In file included from /projects/uoa00210/temp/OpenCASCADE/inc/Standard.hxx:13:0,
                 from /projects/uoa00210/temp/OpenCASCADE/inc/gp_Pnt.hxx:10,
                 from /projects/uoa00210/temp/texgen/TexGen/Export/Exporter.cpp:3:
/projects/uoa00210/temp/OpenCASCADE/inc/Standard_Macro.hxx:37:38: error: expected constructor, destructor, or type conversion before ‘(’ token
(and so it continues...)
bart-cer
Posts: 5
Joined: Mon Sep 15, 2014 4:39 am

Re: Linux install problem with opencascade

Post by bart-cer »

For linux installations, ADD_DEFINITIONS(-DWNT) has to be removed from Export/CMakeLists.txt.

Now I'm getting:

Code: Select all

/projects/uoa00210/temp/texgen/TexGen/Export/Exporter.cpp: In member function ‘TopoDS_Shape TexGen::CExporter::ConvertDomain(const TexGen::CDomain&)’:
/projects/uoa00210/temp/texgen/TexGen/Export/Exporter.cpp:375:87: error: conversion from ‘BRepPrimAPI_MakeBox’ to ‘TopoDS_Shape’ is ambiguous
    return BRepPrimAPI_MakeBox(gp_Pnt(Min.x, Min.y, Min.z), gp_Pnt(Max.x, Max.y, Max.z));
                                                                                       ^
/projects/uoa00210/temp/texgen/TexGen/Export/Exporter.cpp:375:87: note: candidates are:
In file included from /projects/uoa00210/temp/texgen/TexGen/Export/Exporter.cpp:16:0:
/projects/uoa00210/temp/OpenCASCADE/inc/BRepPrimAPI_MakeBox.hxx:87:17: note: BRepPrimAPI_MakeBox::operator TopoDS_Solid()
 Standard_EXPORT operator TopoDS_Solid();
                 ^
/projects/uoa00210/temp/OpenCASCADE/inc/BRepPrimAPI_MakeBox.hxx:84:17: note: BRepPrimAPI_MakeBox::operator TopoDS_Shell()
 Standard_EXPORT operator TopoDS_Shell();
                 ^
In file included from /projects/uoa00210/temp/OpenCASCADE/inc/BRepBuilderAPI_MakeEdge.hxx:20:0,
                 from /projects/uoa00210/temp/texgen/TexGen/Export/Exporter.cpp:10:
/projects/uoa00210/temp/OpenCASCADE/inc/BRepBuilderAPI_MakeShape.hxx:63:17: note: BRepBuilderAPI_MakeShape::operator TopoDS_Shape() const
 Standard_EXPORT operator TopoDS_Shape() const;
                 ^
/projects/uoa00210/temp/texgen/TexGen/Export/Exporter.cpp:383:106: error: conversion from ‘BRepPrimAPI_MakeBox’ to ‘TopoDS_Shape’ is ambiguous
   TopoDS_Shape DomainShape = BRepPrimAPI_MakeBox(gp_Pnt(Min.x, Min.y, Min.z), gp_Pnt(Max.x, Max.y, Max.z));
                                                                                                          ^
/projects/uoa00210/temp/texgen/TexGen/Export/Exporter.cpp:383:106: note: candidates are:
In file included from /projects/uoa00210/temp/texgen/TexGen/Export/Exporter.cpp:16:0:
/projects/uoa00210/temp/OpenCASCADE/inc/BRepPrimAPI_MakeBox.hxx:87:17: note: BRepPrimAPI_MakeBox::operator TopoDS_Solid()
 Standard_EXPORT operator TopoDS_Solid();
                 ^
/projects/uoa00210/temp/OpenCASCADE/inc/BRepPrimAPI_MakeBox.hxx:84:17: note: BRepPrimAPI_MakeBox::operator TopoDS_Shell()
 Standard_EXPORT operator TopoDS_Shell();
                 ^
In file included from /projects/uoa00210/temp/OpenCASCADE/inc/BRepBuilderAPI_MakeEdge.hxx:20:0,
                 from /projects/uoa00210/temp/texgen/TexGen/Export/Exporter.cpp:10:
/projects/uoa00210/temp/OpenCASCADE/inc/BRepBuilderAPI_MakeShape.hxx:63:17: note: BRepBuilderAPI_MakeShape::operator TopoDS_Shape() const
 Standard_EXPORT operator TopoDS_Shape() const;
                 ^
make[2]: *** [Export/CMakeFiles/TexGenExport.dir/Exporter.o] Error 1
make[1]: *** [Export/CMakeFiles/TexGenExport.dir/all] Error 2
make: *** [all] Error 2
All hints/help welcome.
bart-cer
Posts: 5
Joined: Mon Sep 15, 2014 4:39 am

Re: Linux install problem with opencascade

Post by bart-cer »

Adding Shape(), like in:

TopoDS_Shape DomainShape = BRepPrimAPI_MakeBox(gp_Pnt(Min.x, Min.y, Min.z), gp_Pnt(Max.x, Max.y, Max.z)).Shape();

seems to help.
louisepb
Project Leader
Posts: 998
Joined: Tue Dec 08, 2009 2:27 pm
Location: Nottingham

Re: Linux install problem with opencascade

Post by louisepb »

Hi Bart,

Apologies for not replying sooner. I have to confess that I haven't built the Linux version with the Export option myself (not sure if my predecessor had done that or not). I had a quick look earlier in the week but haven't managed to build OpenCascade yet (I'm using Ubuntu). I'm not sure if I set it up properly - if you could let me know what you did to build it that would be great.

Which version of OpenCascade have you used? The current Windows installation of TexGen uses 6.5.2. I should look into upgrading it (especially as the export quite often crashes in the OpenCascade functions). If you're using a newer version therefore I can't guarantee that TexGen will build with it without any upgrade issues.

What are you using TexGen to do? Do you specifically need STEP/IGES output? If not just leave out the Export option and everything should work fine.

I will look into it but it will probably be next week before I have time.

Louise
bart-cer
Posts: 5
Joined: Mon Sep 15, 2014 4:39 am

Re: Linux install problem with opencascade

Post by bart-cer »

Hi,

I used the recommanded version of OpenCascade. I had to change the librariy list, as it seems in linux the names are a little differnt?

I got everything compiled now, but when I import the export module:

Code: Select all

ImportError: /projects/uoa00210/temp/TexGen/_Export.so: undefined symbol: _ZN18IGESControl_Writer8AddShapeERK12TopoDS_Shape
I'm installing TexGen for a user of the cluster in Auckland, and it seems she needs the export module, yes.

Regards,
Bart
bart-cer
Posts: 5
Joined: Mon Sep 15, 2014 4:39 am

Re: Linux install problem with opencascade

Post by bart-cer »

Hi,

Seems like the researcher doens't need the Export module...

Thanks for replying :)

Bart
Post Reply