Open CASCADE, the 3D modelling kernel
3D modeling & numerical simulation

Search the Forums
See All Topics
Open CASCADEShowroomGet it!Developer CornerSupport and ProductsAbout us
Technical overview
Areas of use
Advantages
FAQ
Screenshots
Shape factory
Shape gallery
Demonstrations
What's new
System requirements
Download Center
Public license
Documentation
Getting started
Forums
Open Source community
Training and e-learning
A-la Carte Support
Value-added software
Complementary Components
Customer Corner
Company Profile
Marketing Materials
Contact Us
News
Home / Developer Corner / Forums / Installation and building / Building with GCC 3.4.3?

Building with GCC 3.4.3?

Building with GCC 3.4.3?
Rob Bachrach 2005/04/26 13:21
I know it is not officially supported, but other requirements in my applications are forcing me to compile OCC 5.2 with GCC 3.4.3 (Solaris 8). Unfortunately, I get all sorts of errors due to the fact that many OCC classes have private copy constructors. The first of which is below. I tried turning off optimization and using the -fno-elide-constructors compiler flag, to no avail. I know I can get through this by change OCC code, but I'd like that to be a last resort. Any help would be greatly appreciated...

In file included from ../../../drv/GeomFill/GeomFill_AppSurf_0.cxx:75:
../../../inc/AppBlend_AppSurf.gxx: In copy constructor `AppDef_Compute::AppDef_C
ompute(const AppDef_Compute&)':
../../../inc/AppParCurves_SequenceOfMultiCurve.hxx:123: error: `AppParCurves_Seq
uenceOfMultiCurve::AppParCurves_SequenceOfMultiCurve(const AppParCurves_Sequence
OfMultiCurve&)' is private
../../../inc/AppBlend_AppSurf.gxx:244: error: within this context
../../../inc/Approx_SequenceOfHArray1OfReal.hxx:126: error: `Approx_SequenceOfHA
rray1OfReal::Approx_SequenceOfHArray1OfReal(const Approx_SequenceOfHArray1OfReal
&)' is private
../../../inc/AppBlend_AppSurf.gxx:244: error: within this context
../../../inc/TColStd_SequenceOfReal.hxx:125: error: `TColStd_SequenceOfReal::TCo
lStd_SequenceOfReal(const TColStd_SequenceOfReal&)' is private
../../../inc/AppBlend_AppSurf.gxx:244: error: within this context
../../../inc/TColStd_SequenceOfReal.hxx:125: error: `TColStd_SequenceOfReal::TCo
lStd_SequenceOfReal(const TColStd_SequenceOfReal&)' is private
../../../inc/AppBlend_AppSurf.gxx:244: error: within this context
make: *** [GeomFill_AppSurf_0.lo] Error 1

Roman Lygin 2005/04/26 22:10
Hello Rob,

This will not resolve your problem but may still be helpful for futher experiments. Many OCC collections intentionally have private copy constructors to prevent occasional copies (because there are deep). So, if eventually you need to modify the code, you will need to update the callers, not the collection themselves. Next point, as I read from http://gnu.ghks.de/software/gcc/bugs.html (C++ section) temporary objects (and hence deep copies) can be disabled ("...temporary copy can be elided ..."), likely by compiler keys (perhaps this is what you referencing to already).

Finally, I can't really understand the compiler message from your quote:
...
../../../inc/AppBlend_AppSurf.gxx: In copy constructor `AppDef_Compute::AppDef_Compute(const AppDef_Compute&)': ...

which I guess is generated at the line ../../../inc/AppBlend_AppSurf.gxx:244

theapprox = AppDef_Compute(theParams,dmin,dmax,tol3d,tol2d,nbit,
                     Standard_True,Standard_True);

I would expect assignment operator invoked here, not the copy constructor. In such case it should be valid. So, can it be gcc 3.4 itself to blame ?

Again, this doesn't fix your problem but maybe will give some clues.
I'm on a Windows box and can't run gcc.

Good luck and please let us know about your progress.

Roman

Rob Bachrach 2005/04/27 11:29
Roman,

Thanks for the response. Yes, that flag is the one I tried, with no help. And yes, I would have expected the assignment operator as well, but that does not seem to be the case. For some reason, the copy constructor gets called on the members of AppDef_Compute when an assignment operator is automatically generated. I have no clue why.

Thanks again,
Rob
Rob Bachrach 2005/04/27 12:58
Roman,

Just as an FYI...I understand what's happening. If you look at the link you sent me, you will see the following note:

=====================
Starting with GCC 3.4.0, binding an rvalue to a const reference requires an accessible copy constructor. This might be surprising at first sight, especially since most popular compilers do not correctly implement this rule.

The C++ Standard says that a temporary object should be created in this context and its contents filled with a copy of the object we are trying to bind to the reference; it also says that the temporary copy can be elided, but the semantic constraints (eg. accessibility) of the copy constructor still have to be checked.
=====================

Therefore, any function that takes a const reference as an argument and is passed a temporary object requires access to the copy constructor. This includes the assignment operator function. These instances can, of course, be fixed by creating a local variable of the new object and passing that to the assignment operator. I guess these would need to be fixed before OCC can support gcc 3.4.
Frederic Deghetto 2005/11/10 10:11
Same problem with gcc 3.4.4 under gentoo AMD64
Frederic Deghetto 2005/11/10 10:23
Any patchs to solve this problem ?

Frederic
Frederic Deghetto 2005/11/10 10:23
Any patchs to solve this problem ?

Frederic
Frederic Deghetto 2005/11/10 17:50
I changed when needed private to public. I had other problems but all solutions are already solved in the forum (casting necessary with tk 8.4, extern int errno to be changed to include <errno.h>, ....

Now that's OK.

Fred,
Frederic Deghetto 2005/11/12 12:58
Below are modifications I have done to compile occ 5.2 on gentoo AMD64 with gcc3.4.4 and tk/tcl8.4:


--- ros/inc/TColStd_ListOfInteger.hxx     2005-11-10 23:29:54.000000000 +0100
+++ ros/inc/TColStd_ListOfInteger.hxx     2005-11-10 23:30:08.000000000 +0100
@@ -109,7 +109,7 @@
//


-private:
+public:

// Methods PRIVATE
//
--- ros/inc/Extrema_SequenceOfPOnCurv.hxx     2005-11-10 23:16:59.000000000 +0100
+++ ros/inc/Extrema_SequenceOfPOnCurv.hxx     2005-11-10 23:17:07.000000000 +0100
@@ -116,7 +116,7 @@
//


-private:
+public:

// Methods PRIVATE
//
--- ros/inc/GeomFill_SequenceOfTrsf.hxx     2005-11-10 23:21:48.000000000 +0100
+++ ros/inc/GeomFill_SequenceOfTrsf.hxx     2005-11-10 23:22:01.000000000 +0100
@@ -116,7 +116,7 @@
//


-private:
+public:

// Methods PRIVATE
//
--- ros/inc/HLRBRep_ListOfBPoint.hxx     2005-11-11 10:30:44.000000000 +0100
+++ ros/inc/HLRBRep_ListOfBPoint.hxx     2005-11-11 10:30:57.000000000 +0100
@@ -110,7 +110,7 @@
//


-private:
+public:

// Methods PRIVATE
//
--- ros/inc/Extrema_SequenceOfPOnCurv2d.hxx     2005-11-10 23:11:14.000000000 +0100
+++ ros/inc/Extrema_SequenceOfPOnCurv2d.hxx     2005-11-10 23:11:32.000000000 +0100
@@ -116,7 +116,7 @@
//


-private:
+public:

// Methods PRIVATE
//
--- ros/inc/WOKTCL_DefaultCommand.hxx     2005-11-10 23:38:02.000000000 +0100
+++ ros/inc/WOKTCL_DefaultCommand.hxx     2005-11-10 23:39:12.000000000 +0100
@@ -16,7 +16,7 @@


Standard_Integer DefaultCommand(ClientData , Tcl_Interp *,
-                    Standard_Integer , char* []);
+                    Standard_Integer , const char* []);

void DefaultCommandDelete (ClientData );

--- ros/inc/Extrema_SequenceOfPOnSurf.hxx     2005-11-10 23:18:49.000000000 +0100
+++ ros/inc/Extrema_SequenceOfPOnSurf.hxx     2005-11-10 23:18:58.000000000 +0100
@@ -116,7 +116,7 @@
//


-private:
+public:

// Methods PRIVATE
//
--- ros/inc/Draw_PluginMacro.hxx     2005-11-11 10:37:20.000000000 +0100
+++ ros/inc/Draw_PluginMacro.hxx     2005-11-11 10:37:32.000000000 +0100
@@ -17,7 +17,7 @@
#define DPLUGIN(name) \
extern "C" {Standard_EXPORT void PLUGINFACTORY(Draw_Interpretor&);} \
void PLUGINFACTORY(Draw_Interpretor& theDI) { \
- name##::Factory(theDI);} \
+ name::Factory(theDI);} \
\

#endif
--- ros/inc/Plugin_Macro.hxx 2005-11-12 11:50:27.000000000 +0100
+++ ros/inc/Plugin_Macro.hxx 2005-11-12 11:50:35.000000000 +0100
@@ -18,7 +18,7 @@
#define PLUGIN(name) \
extern "C" {Standard_EXPORT Handle(Standard_Transient) PLUGINFACTORY(const Standard_GUID&);} \
Handle(Standard_Transient) PLUGINFACTORY(const Standard_GUID& aGUID) { \
- return name##::Factory(aGUID);}\
+ return name::Factory(aGUID);}\
\

#endif
--- ros/inc/AIS2D_DataMapOfPrimAspects.hxx     2005-11-11 00:29:21.000000000 +0100
+++ ros/inc/AIS2D_DataMapOfPrimAspects.hxx     2005-11-11 00:29:36.000000000 +0100
@@ -118,7 +118,7 @@
//


-private:
+public:

// Methods PRIVATE
//
--- ros/inc/TColgp_SequenceOfPnt.hxx     2005-11-10 23:39:22.000000000 +0100
+++ ros/inc/TColgp_SequenceOfPnt.hxx     2005-11-10 23:39:39.000000000 +0100
@@ -116,7 +116,7 @@
//


-private:
+public:

// Methods PRIVATE
//
--- ros/inc/Prs2d_DataMapOfAspectRoot.hxx     2005-11-11 00:41:31.000000000 +0100
+++ ros/inc/Prs2d_DataMapOfAspectRoot.hxx     2005-11-11 00:41:42.000000000 +0100
@@ -114,7 +114,7 @@
//


-private:
+public:

// Methods PRIVATE
//
--- ros/inc/Extrema_SeqPCOfPCFOfEPCOfExtPC2d.hxx     2005-11-10 23:13:16.000000000 +0100
+++ ros/inc/Extrema_SeqPCOfPCFOfEPCOfExtPC2d.hxx     2005-11-10 23:13:25.000000000 +0100
@@ -116,7 +116,7 @@
//


-private:
+public:

// Methods PRIVATE
//
--- ros/inc/BRepBlend_SequenceOfPointOnRst.hxx     2005-11-11 00:09:03.000000000 +0100
+++ ros/inc/BRepBlend_SequenceOfPointOnRst.hxx     2005-11-11 00:09:13.000000000 +0100
@@ -116,7 +116,7 @@
//


-private:
+public:

// Methods PRIVATE
//
--- ros/inc/Extrema_SeqPCOfPCFOfEPCOfExtPC.hxx     2005-11-10 23:20:11.000000000 +0100
+++ ros/inc/Extrema_SeqPCOfPCFOfEPCOfExtPC.hxx     2005-11-10 23:20:19.000000000 +0100
@@ -116,7 +116,7 @@
//


-private:
+public:

// Methods PRIVATE
//
--- ros/inc/TColgp_Array1OfPnt2d.hxx     2005-11-11 08:29:40.000000000 +0100
+++ ros/inc/TColgp_Array1OfPnt2d.hxx     2005-11-11 08:29:54.000000000 +0100
@@ -110,7 +110,7 @@
//


-private:
+public:

// Methods PRIVATE
//
--- ros/inc/TDF_IDMap.hxx     2005-11-11 09:35:06.000000000 +0100
+++ ros/inc/TDF_IDMap.hxx     2005-11-11 09:35:13.000000000 +0100
@@ -97,7 +97,7 @@
//


-private:
+public:

// Methods PRIVATE
//
--- ros/inc/TColStd_MapOfInteger.hxx     2005-11-10 23:30:35.000000000 +0100
+++ ros/inc/TColStd_MapOfInteger.hxx     2005-11-10 23:30:44.000000000 +0100
@@ -97,7 +97,7 @@
//


-private:
+public:

// Methods PRIVATE
//
--- ros/inc/TColStd_SequenceOfReal.hxx     2005-11-10 23:02:40.000000000 +0100
+++ ros/inc/TColStd_SequenceOfReal.hxx     2005-11-10 23:02:56.000000000 +0100
@@ -118,7 +118,7 @@
//


-private:
+public:

// Methods PRIVATE
//
--- ros/inc/PCDM_ReferenceIterator.hxx     2005-11-11 09:29:42.000000000 +0100
+++ ros/inc/PCDM_ReferenceIterator.hxx     2005-11-11 09:29:56.000000000 +0100
@@ -101,7 +101,7 @@
//


-private:
+public:

// Methods PRIVATE
//
--- ros/inc/BRepCheck_ListOfStatus.hxx     2005-11-10 23:34:50.000000000 +0100
+++ ros/inc/BRepCheck_ListOfStatus.hxx     2005-11-10 23:35:32.000000000 +0100
@@ -112,7 +112,7 @@
//


-private:
+public:

// Methods PRIVATE
//
--- ros/inc/TColStd_SequenceOfHAsciiString.hxx     2005-11-11 13:15:30.000000000 +0100
+++ ros/inc/TColStd_SequenceOfHAsciiString.hxx     2005-11-11 13:15:46.000000000 +0100
@@ -119,7 +119,7 @@
//


-private:
+public:

// Methods PRIVATE
//
--- ros/inc/TColStd_SequenceOfInteger.hxx     2005-11-10 23:12:49.000000000 +0100
+++ ros/inc/TColStd_SequenceOfInteger.hxx     2005-11-10 23:12:57.000000000 +0100
@@ -115,7 +115,7 @@
//


-private:
+public:

// Methods PRIVATE
//
--- ros/inc/TopTools_ListOfShape.hxx     2005-11-10 23:36:48.000000000 +0100
+++ ros/inc/TopTools_ListOfShape.hxx     2005-11-10 23:36:57.000000000 +0100
@@ -110,7 +110,7 @@
//


-private:
+public:

// Methods PRIVATE
//
--- ros/inc/TDF_Transaction.hxx     2005-11-11 09:34:41.000000000 +0100
+++ ros/inc/TDF_Transaction.hxx     2005-11-11 09:34:55.000000000 +0100
@@ -99,7 +99,7 @@
//


-private:
+public:

// Methods PRIVATE
//
--- ros/inc/Graphic2d_Buffer.hxx     2005-11-11 00:22:22.000000000 +0100
+++ ros/inc/Graphic2d_Buffer.hxx     2005-11-11 00:22:39.000000000 +0100
@@ -157,7 +157,7 @@
//


-private:
+public:

// Methods PRIVATE
//
--- ros/inc/PCollection_HSequence.gxx     2005-11-11 09:09:02.000000000 +0100
+++ ros/inc/PCollection_HSequence.gxx     2005-11-11 09:10:25.000000000 +0100
@@ -37,13 +37,13 @@
FirstItem = FirstItem->Next();
FirstItem->SetPrevious(pnul);
#ifndef CSFDB
- cell.Delete();
+ // cell.Delete();
#endif
--Size;
}
FirstItem.Nullify();
#ifndef CSFDB
- LastItem.Delete(); // free memory
+ // LastItem.Delete(); // free memory
#endif
Size = 0;
}
@@ -345,7 +345,7 @@
Size = 0;
FirstItem.Nullify();
#ifndef CSFDB
- LastItem.Delete(); // free memory
+ // LastItem.Delete(); // free memory
#endif
}
else {
@@ -356,7 +356,7 @@
FirstItem = FirstItem->Next();
FirstItem->SetPrevious(pnul);
#ifndef CSFDB
- cell.Delete(); // free memory
+ // cell.Delete(); // free memory
#endif
--Size;
} else if ( Index == Size ) { // Remove the last Index
@@ -364,7 +364,7 @@
LastItem = LastItem->Previous();
LastItem->SetNext(pnul);
#ifndef CSFDB
- cell.Delete(); // free memory
+ // cell.Delete(); // free memory
#endif
--Size;
} else {
@@ -379,7 +379,7 @@
previous->SetNext(next);
next->SetPrevious(previous);
#ifndef CSFDB
- cell.Delete(); // free memory
+ // cell.Delete(); // free memory
#endif
--Size;
}
--- ros/inc/Extrema_SequenceOfBoolean.hxx     2005-11-10 23:15:39.000000000 +0100
+++ ros/inc/Extrema_SequenceOfBoolean.hxx     2005-11-10 23:15:49.000000000 +0100
@@ -118,7 +118,7 @@
//


-private:
+public:

// Methods PRIVATE
//
--- ros/inc/TopOpeBRepBuild_ListOfShapeListOfShape.hxx     2005-11-10 23:55:10.000000000 +0100
+++ ros/inc/TopOpeBRepBuild_ListOfShapeListOfShape.hxx     2005-11-10 23:55:22.000000000 +0100
@@ -110,7 +110,7 @@
//


-private:
+public:

// Methods PRIVATE
//
--- ros/inc/AIS2D_DataMapOfLocStat.hxx     2005-11-11 00:31:14.000000000 +0100
+++ ros/inc/AIS2D_DataMapOfLocStat.hxx     2005-11-11 00:31:26.000000000 +0100
@@ -118,7 +118,7 @@
//


-private:
+public:

// Methods PRIVATE
//
--- ros/inc/DBC_DBVArray.hxx     2005-11-11 09:06:16.000000000 +0100
+++ ros/inc/DBC_DBVArray.hxx     2005-11-11 09:22:51.000000000 +0100
@@ -19,5 +19,6 @@
#include <PStandard_ArrayNode.hxx>
typedef PStandard_ArrayNode* DBC_DBVArray;
#endif
-
+#include <PStandard_ArrayNode.hxx>
+typedef PStandard_ArrayNode* DBC_DBVArray;
#endif
--- ros/inc/TopOpeBRepDS_ListOfInterference.hxx     2005-11-10 23:57:17.000000000 +0100
+++ ros/inc/TopOpeBRepDS_ListOfInterference.hxx     2005-11-10 23:57:28.000000000 +0100
@@ -113,7 +113,7 @@
//


-private:
+public:

// Methods PRIVATE
//
--- ros/inc/Approx_SequenceOfHArray1OfReal.hxx     2005-11-10 23:05:57.000000000 +0100
+++ ros/inc/Approx_SequenceOfHArray1OfReal.hxx     2005-11-10 23:06:10.000000000 +0100
@@ -119,7 +119,7 @@
//


-private:
+public:

// Methods PRIVATE
//
--- ros/inc/TopOpeBRepTool_ListOfC2DF.hxx     2005-11-11 00:01:43.000000000 +0100
+++ ros/inc/TopOpeBRepTool_ListOfC2DF.hxx     2005-11-11 00:02:02.000000000 +0100
@@ -110,7 +110,7 @@
//


-private:
+public:

// Methods PRIVATE
//
--- ros/inc/BOP_ListOfLoop.hxx     2005-11-10 23:45:17.000000000 +0100
+++ ros/inc/BOP_ListOfLoop.hxx     2005-11-10 23:45:26.000000000 +0100
@@ -113,7 +113,7 @@
//


-private:
+public:

// Methods PRIVATE
//
--- ros/inc/AppParCurves_SequenceOfMultiCurve.hxx     2005-11-10 23:02:04.000000000 +0100
+++ ros/inc/AppParCurves_SequenceOfMultiCurve.hxx     2005-11-10 23:02:22.000000000 +0100
@@ -116,7 +116,7 @@
//


-private:
+public:

// Methods PRIVATE
//
--- ros/inc/math_IntegerVector.hxx     2005-11-10 23:24:39.000000000 +0100
+++ ros/inc/math_IntegerVector.hxx     2005-11-10 23:24:48.000000000 +0100
@@ -166,7 +166,7 @@
//


-private:
+public:

// Methods PRIVATE
//
--- ros/inc/TopOpeBRepBuild_ListOfLoop.hxx     2005-11-10 23:53:12.000000000 +0100
+++ ros/inc/TopOpeBRepBuild_ListOfLoop.hxx     2005-11-10 23:53:24.000000000 +0100
@@ -113,7 +113,7 @@
//


-private:
+public:

// Methods PRIVATE
//
--- ros/inc/Graphic2d_Primitive.hxx     2005-11-11 00:19:56.000000000 +0100
+++ ros/inc/Graphic2d_Primitive.hxx     2005-11-11 00:20:11.000000000 +0100
@@ -188,7 +188,7 @@
Standard_Integer myDisplayMode;


-private:
+public:

// Methods PRIVATE
//
--- ros/inc/TopTools_Array1OfListOfShape.hxx     2005-11-11 00:03:56.000000000 +0100
+++ ros/inc/TopTools_Array1OfListOfShape.hxx     2005-11-11 00:04:06.000000000 +0100
@@ -110,7 +110,7 @@
//


-private:
+public:

// Methods PRIVATE
//
--- ros/src/Draw/Draw_Window.cxx     2005-11-10 23:37:16.000000000 +0100
+++ ros/src/Draw/Draw_Window.cxx     2005-11-10 23:37:42.000000000 +0100
@@ -44,7 +44,7 @@
{


- char *promptCmd;
+ const char *promptCmd;
int code;
Tcl_Channel outChannel, errChannel;
outChannel = Tcl_GetStdChannel(TCL_STDOUT);
--- ros/src/Draw/Draw_VariableCommands.cxx     2005-11-10 23:33:46.000000000 +0100
+++ ros/src/Draw/Draw_VariableCommands.cxx     2005-11-10 23:36:31.000000000 +0100
@@ -644,7 +644,7 @@
Draw::Set(name,D,autodisp);
}

-static char* tracevar(ClientData CD, Tcl_Interp*, char*, char*, Standard_Integer)
+static char* tracevar(ClientData CD, Tcl_Interp*, const char*, const char*, Standard_Integer)
{
// protect if the map was destroyed before the interpretor
if (theVariables.IsEmpty()) return NULL;
@@ -688,7 +688,7 @@
if (!D.IsNull()) {
Standard_Integer ival = theVariables.Extent() + 1;
theVariables.Bind(ival,D);
- D->Name(Tcl_SetVar(theCommands.Interp(),name,name,0));
+ D->Name((const Standard_CString) Tcl_SetVar(theCommands.Interp(),name,name,0));

// set the trace function
Tcl_TraceVar(theCommands.Interp(),name,TCL_TRACE_UNSETS,
--- ros/src/Draw/Draw_Interpretor.cxx     2005-11-10 23:32:33.000000000 +0100
+++ ros/src/Draw/Draw_Interpretor.cxx     2005-11-10 23:33:35.000000000 +0100
@@ -25,7 +25,7 @@

static Standard_Integer CommandCmd
(ClientData clientData, Tcl_Interp *interp,
- Standard_Integer argc, char* argv[])
+ Standard_Integer argc, const char* argv[])
{
static Standard_Integer code;
code = TCL_OK;
@@ -42,7 +42,7 @@
Handle(Standard_Failure) E = Standard_Failure::Caught();

// fail if Draw_ExitOnCatch is set
- char* const cc = Tcl_GetVar(interp,
+ const char* cc = Tcl_GetVar(interp,
                "Draw_ExitOnCatch",TCL_GLOBAL_ONLY);

cout << "An exception was caught " << E << endl;
--- ros/src/WOKTclTools/WOKTclTools_Interpretor.cxx     2005-11-10 23:43:28.000000000 +0100
+++ ros/src/WOKTclTools/WOKTclTools_Interpretor.cxx     2005-11-11 13:27:46.000000000 +0100
@@ -57,14 +57,14 @@
Standard_EXPORT Handle(WOKTclTools_Interpretor) CurrentInterp;

static Standard_Integer CommandCmd (ClientData clientData, Tcl_Interp *,
-                     Standard_Integer argc, char* argv[])
+                     Standard_Integer argc, const char* argv[])
{
CData* C = (CData*) clientData;

// set de l'interprete en cours
CurrentInterp = C->i;

- if (C->f(C->i,argc,argv) == 0)
+ if (C->f(C->i,argc, (char** const&) argv) == 0)
{
CurrentInterp.Nullify();
return TCL_OK;
@@ -77,7 +77,7 @@
}

static Standard_Integer WOKCommand(ClientData clientData, Tcl_Interp *,
-                     Standard_Integer argc, char* argv[])
+                     Standard_Integer argc, const char* argv[])
{
WOKCData* C = (WOKCData*) clientData;

@@ -94,7 +94,7 @@
WOKUtils_ProcessManager::Arm();

// appel de la fonction API
- if(!(*acmd)(argc, argv, returns))
+ if(!(*acmd)(argc, (char** const&) argv, returns))
     {
      if(!C->i->TreatReturn(returns))
      {
@@ -110,7 +110,7 @@

Standard_SStream astream;
astream << E << ends;
- ErrorMsg << argv[0] << "Exception was raised : " << GetSString(astream) << endm;
+ ErrorMsg << (char*) argv[0] << "Exception was raised : " << GetSString(astream) << endm;
WOKUtils_ProcessManager::UnArm();
return TCL_ERROR;
}
@@ -440,7 +440,7 @@
Standard_Integer argc,i;
Standard_CString* argv;

- if(Tcl_SplitList(myInterp, myInterp->result, &argc, &argv)) return Standard_True;
+ if(Tcl_SplitList(myInterp, myInterp->result, &argc, (const char***) argv)) return Standard_True;

for(i=0; i<argc; i++)
{
@@ -685,7 +685,7 @@

if (Tcl_GetCommandInfo(myInterp, argv[0], &infoPtr) != 0)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; infoPtr.proc (infoPtr.clientData, myInterp, argc, argv);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; infoPtr.proc (infoPtr.clientData, myInterp, argc, (const char**) argv);
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (status==1)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Tcl_AddErrorInfo(myInterp,"Invalid message");
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
@@ -706,7 +706,7 @@
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (Tcl_GetCommandInfo(myInterp, argv[0], &infoPtr) != 0)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; status = infoPtr.proc (infoPtr.clientData, myInterp, argc, argv);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; status = infoPtr.proc (infoPtr.clientData, myInterp, argc, (const char**) argv);
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (status==1)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tcl_AddErrorInfo(myInterp,"Invalid message");
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }
@@ -724,7 +724,7 @@
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (Tcl_GetCommandInfo(myInterp, argv[0], &infoPtr) != 0)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; status = infoPtr.proc (infoPtr.clientData, myInterp, argc, argv);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; status = infoPtr.proc (infoPtr.clientData, myInterp, argc, (const char**) argv);
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (status==1)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tcl_AddErrorInfo(myInterp,"Invalid message");
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }
--- ros/src/PMMgt/PMMgt_PManaged.cxx&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2005-11-11 09:13:20.000000000 +0100
+++ ros/src/PMMgt/PMMgt_PManaged.cxx&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2005-11-11 09:19:50.000000000 +0100
@@ -15,7 +15,7 @@
}

//============================================================================
-#ifndef CSFDB
+/*#ifndef CSFDB
class _Oid_PMMgt_PManaged : public Oid_PMMgt_PManaged {
friend class Handle_PMMgt_PManaged;
};
@@ -42,7 +42,7 @@
Nullify();
// delete aMng;
}
-#endif
+#endif*/
#ifdef OBJY
void PHandle_PMMgt_PManaged::Delete()
{
--- ros/src/IGESToBRep/IGESToBRep_Reader.cxx&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2005-11-10 23:29:13.000000000 +0100
+++ ros/src/IGESToBRep/IGESToBRep_Reader.cxx&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2005-11-10 23:29:40.000000000 +0100
@@ -55,7 +55,7 @@
#include <ShapeAlgo_AlgoContainer.hxx>
#include <MoniTool_ProgressSentry.hxx>

-extern int errno;
+#include <errno.h>;

static Handle(IGESData_FileProtocol) protocol;

--- ros/src/WOKTCL/WOKTCL_DefaultCommand.cxx     2005-11-10 23:40:49.000000000 +0100
+++ ros/src/WOKTCL/WOKTCL_DefaultCommand.cxx     2005-11-10 23:42:15.000000000 +0100
@@ -45,7 +45,7 @@
Standard_IMPORT Handle(WOKTclTools_Interpretor) CurrentInterp;

Standard_Integer DefaultCommand(ClientData clientData, Tcl_Interp *,
-                    Standard_Integer argc, char* argv[])
+                    Standard_Integer argc, const char* argv[])
{
volatile Standard_Integer status = 0;

@@ -68,7 +68,7 @@
WOKUtils_ProcessManager::Arm();

// appel de la fonction API
- if(!(*acmd)(C->i->Session(), argc, argv, returns))
+ if(!(*acmd)(C->i->Session(), argc, (char** const&) argv, returns))
{
     if(!C->i->TreatReturn(returns))
      {
@@ -88,7 +88,7 @@
Standard_SStream astream;
astream << E << ends;

- ErrorMsg << argv[0] << "Exception was raised : " << GetSString(astream) << endm;
+ ErrorMsg << (char*) argv[0] << "Exception was raised : " << GetSString(astream) << endm;

WOKAPI_Session* asess = (WOKAPI_Session *) &(C->i->Session());
asess->GeneralFailure(E);
--- ros/src/FWOSDriver/FWOSDriver.cxx     2005-11-11 09:41:23.000000000 +0100
+++ ros/src/FWOSDriver/FWOSDriver.cxx     2001-09-21 09:51:04.000000000 +0200
@@ -1,26 +1,18 @@
-// File:     PlugIn_Macro.hxx
-// Created:     Tue Mar 4 10:47:14 1997
+// File:     FWOSDriver.cxx
+// Created:     Tue Mar 4 16:38:53 1997
// Author:     Mister rmi
//          <rmi@frilox.paris1.matra-dtv.fr>


-#ifndef _PlugIn_Macro_HeaderFile
-#define _PlugIn_Macro_HeaderFile
+#include <FWOSDriver.ixx>
+#include <FWOSDriver_DriverFactory.hxx>

-#if defined (__hpux) || defined (HPUX)
-#define PLUGIN(name) \
-extern "C" {Standard_EXPORT Handle(Standard_Transient) PLUGINFACTORY(const Standard_GUID&);} \
-Handle(Standard_Transient) PLUGINFACTORY(const Standard_GUID& aGUID) { \
- return name::Factory(aGUID);}\
-\
-                         
-#else
-#define PLUGIN(name) \
-extern "C" {Standard_EXPORT Handle(Standard_Transient) PLUGINFACTORY(const Standard_GUID&);} \
-Handle(Standard_Transient) PLUGINFACTORY(const Standard_GUID& aGUID) { \
- return name##::Factory(aGUID);}\
-\
-                         
-#endif
+#include <Plugin_Macro.hxx>

-#endif
+PLUGIN(FWOSDriver)
+
+Handle(Standard_Transient) FWOSDriver::Factory(const Standard_GUID& aGUID) {
+ static Handle(FWOSDriver_DriverFactory) f;
+ if(f.IsNull()) f = new FWOSDriver_DriverFactory;
+ return f;
+}
--- ros/src/WOKUnix/WOKUnix_FDescr.cxx     2005-11-10 23:28:34.000000000 +0100
+++ ros/src/WOKUnix/WOKUnix_FDescr.cxx     2005-11-10 23:28:59.000000000 +0100
@@ -39,7 +39,7 @@

extern "C" { extern int mknod (const char *, mode_t , dev_t ); }

-extern int errno;
+#include <errno.h>;

const OSD_WhoAmI Iam = OSD_WFile;





You can put this datas into a file and use patch -p0 < file to apply the changes.




and my configuration :
./configure --with-tcl=/usr/lib64/ --with-tk=/usr/lib64/ --with-dps-library=/usr/lib64/ --with-xmu-library=/usr/lib64/ --with-stlport-library=/usr/lib64 --with-gl-library=/usr/X11R6/lib/ --with-java-include=/opt/sun-jdk-1.5.0.05/include/ --prefix=/usr/opencascade5.2 --with-xmu-include=/usr/include/X11 --with-stlport-libname=stlport_gcc
jeff shanab 2006/01/02 05:53
I have tried all weekend to implement an ebuild that uses your patch file, but patch is picky and I am still learning which spaces where make a difference. I think I have most the syntax figured out but could you post a patch file that is "space intact"
jeff shanab 2006/01/07 15:25
For those that are following...
I have managed to apply the patch and start compiling but this part of the patch

--- ros/inc/DBC_DBVArray.hxx 2005-11-11 09:06:16.000000000 +0100
+++ ros/inc/DBC_DBVArray.hxx 2005-11-11 09:22:51.000000000 +0100
@@ -19,5 +19,6 @@
#include <PStandard_ArrayNode.hxx>
typedef PStandard_ArrayNode* DBC_DBVArray;
#endif
-
+#include <PStandard_ArrayNode.hxx>
+typedef PStandard_ArrayNode* DBC_DBVArray;
#endif

Changes the code in such a way as to cause a typedef conflict if any if the other flags are set. I changed it to...
--- inc/DBC_DBVArray.hxx 2005-11-11 09:06:16.000000000 +0100
+++ inc/DBC_DBVArray.hxx 2005-11-11 09:22:51.000000000 +0100
@@ -19,5 +19,12 @@
#include <PStandard_ArrayNode.hxx>
typedef PStandard_ArrayNode* DBC_DBVArray;
#endif
-
+#ifndef OBDY
+ #ifndef OBJS
+ #ifndef CSFDB
+ #include <PStandard_ArrayNode.hxx>
+ typedef PStandard_ArrayNode* DBC_DBVArray;
+#endif
+#endif
+#endif
#endif

And am continuing the compile (man does it take a while, it keeps 3200+ amd64 busy for hours)
 
 
Latest news
  • Open CASCADE Technology 6.7.0 is available for download!
  • Open CASCADE Technology 6.6.0 is available for download!
  • Open CASCADE Technology 6.5.5 is available for download!

  • © OPEN CASCADE 2000 - 2014  |  Search  |  Contacts   |  Site map