Building Opencascade 6.2.0 on Debian amd64

Here is how to build Opencascade 6.2.0 on Debian amd64….

Debian use gcc 4.1 so first apply the following patch:

--- OpenCASCADE6.2.0-orig/ros/src/BOPTest/BOPTest_LowCommands.cxx       2007-08-09 16:04:04.000000000 +0200
+++ OpenCASCADE6.2.0/ros/src/BOPTest/BOPTest_LowCommands.cxx    2007-08-10 09:43:32.000000000 +0200
@@ -792,7 +792,7 @@
 //=======================================================================
 class X_Chr {
  public:
-  X_Chr::X_Chr() {
+  X_Chr() {
     Reset();
   }
   void Reset() {
--- OpenCASCADE6.2.0-orig/ros/inc/Standard_ErrorHandlerCallback.hxx     2007-08-09 16:04:06.000000000 +0200
+++ OpenCASCADE6.2.0/ros/inc/Standard_ErrorHandlerCallback.hxx  2007-08-09 16:29:20.000000000 +0200
@@ -61,7 +61,7 @@
   void RegisterCallback() ;
 //! Unregisters this callback object from the error handler. 
   void UnregisterCallback() ;
-virtual Standard_EXPORT Standard_ErrorHandlerCallback::~Standard_ErrorHandlerCallback ();
+virtual Standard_EXPORT ~Standard_ErrorHandlerCallback ();

 //! The callback function to perform necessary callback action. 
 //!          Called by the exception handler when it is being destroyed but

Install required package:

apt-get install libglu1-mesa-dev libxmu-headers tcl8.4-dev tk8.4-dev make automake libtool g++ distcc

Run the configure script:

../OpenCASCADE6.2.0/ros/configure \
           CXX="distcc g++" \
           CXXFLAGS=-ffriend-injection \
           --with-tcl=/usr/lib/tcl8.4/ \
           --with-tk=/usr/lib/tk8.4/

#debian, #opencascade