Open CASCADE Technology
6.7.0
|
|
This document presents additional guidelines for building third-party products used by Open CASCADE Technology and samples on Linux platform.
The links for downloading the third-party products are available on the web site of OPEN CASCADE SAS at http://www.opencascade.org/getocc/require/.
There are two types of third-party products, which are necessary to build OCCT:
Tcl/Tk is required for DRAW test harness.
It is possible to download ready-to-install binaries from http://www.activestate.com/activetcl/downloads
cd TCL_SRC_DIR
Run the install command
install.sh
and follow instructions.
Download the necessary archive from http://www.tcl.tk/software/tcltk/download.html and unpack it.
cd TCL_SRC_DIR/unix
Run the configure command
configure --enable-gcc --enable-shared --enable-threads --prefix=TCL_INSTALL_DIR
For a 64 bit platform also add –enable-64bit option to the command line.
make
make install
Download the necessary archive from http://www.tcl.tk/software/tcltk/download.html and unpack it.
cd TK_SRC_DIR/unix
Run the configure command, where TCL_LIB_DIR is TCL_INSTALL_DIR/lib
configure --enable-gcc --enable-shared --enable-threads --with-tcl=TCL_LIB_DIR --prefix=TK_INSTALL_DIR
where TCL_LIB_DIR is TCL_INSTALL_DIR/lib
For a 64 bit platform also add –enable-64bit option to the command line.
make
make install
FreeType is required for display of text in 3D viewer. Download the necessary archive from http://sourceforge.net/projects/freetype/files/ and unpack it.
cd FREETYPE_SRC_DIR
Run the configure command
configure --prefix=FREETYPE_INSTALL_DIR
For a 64 bit platform also add CFLAGS='-m64 -fPIC' CPPFLAGS='-m64 -fPIC' option to the command line.
make
make install
This third-party product is installed with binaries from the archive that can be downloaded from http://threadingbuildingblocks.org. Go to "Downloads page", find the release version you need and pick the archive for Linux platform. To install, unpack the downloaded archive of TBB product.
Download the necessary archive from http://geuz.org/gl2ps/ and unpack it.
Start cmake in GUI mode with the directory where the source files of gl2ps are located:
ccmake GL2PS_SRC_DIR
a. Press [c] to make the initial configuration b. Define the necessary options CMAKE_INSTALL_PREFIX c. Press [c] to make the final configuration d. Press [g] to generate Makefile and exit
or just run the following command:
cmake –DCMAKE_INSTALL_PREFIX=GL2PS_INSTALL_DIR –DCMAKE_BUILD_TYPE=Release
make
make install
Download the necessary archive from http://sourceforge.net/projects/freeimage/files/Source%20Distribution/ and unpack it. The directory with unpacked sources is further referred to as FREEIMAGE_SRC_DIR.
#include string.h
cd FREEIMAGE_SRC_DIR
make
Run the installation process
a. If you have permissions to write to /usr/include and /usr/lib directories then run the following command:
make install
b. If you don’t have permissions to write to /usr/include and /usr/lib directories then you need to modify the file FREEIMAGE_SRC_DIR/Makefile.gnu:
Change lines 7-9 from:
DESTDIR ?= / INCDIR ?= $(DESTDIR)/usr/include INSTALLDIR ?= $(DESTDIR)/usr/lib
to:
DESTDIR ?= $(DESTDIR) INCDIR ?= $(DESTDIR)/include INSTALLDIR ?= $(DESTDIR)/lib
Change lines 65-67 from:
install -m 644 -o root -g root $(HEADER) $(INCDIR) install -m 644 -o root -g root $(STATICLIB) $(INSTALLDIR) install -m 755 -o root -g root $(SHAREDLIB) $(INSTALLDIR)
to:
install -m 755 $(HEADER) $(INCDIR) install -m 755 $(STATICLIB) $(INSTALLDIR) install -m 755 $(SHAREDLIB) $(INSTALLDIR)
Change line 70 from:
ldconfig
to:
\#ldconfig
Then run the installation process by the following command:
make DESTDIR=FREEIMAGE_INSTALL_DIR install
make clean
If you have OpenCL SDK (one provided by Apple, AMD, NVIDIA, Intel, or other vendor) installed on your system, you should find OpenCL headers and libraries required for building OCCT inside that SDK.
Alternatively, you can use OpenCL ICD (Installable Client Driver) Loader provided by Khronos group. The following describes steps used to build OpenCL ICD Loader version 1.2.11.0.
All 3rd-party products required for building of OCCT could be installed from official repositories. You may install them from console using apt-get utility:
sudo apt-get install \ tcllib tklib tcl-dev tk-dev \ libfreetype-dev \ libxt-dev libxmu-dev \ libgl1-mesa-dev \ libfreeimage-dev \ libtbb-dev \ libgl2ps-dev
To launch WOK-prebuilt binaries you need install C shell and 32-bit libraries on x86_64 distributives:
sudo apt-get install \ csh \ libstdc++5:i386 libxt6:i386
Any compliant C++ compiler is required for building anyway:
sudo apt-get install \ g++