Building OpenCascade 6.3 in Kubuntu Hardy

I tried to install OpenCascade 6.3 in my Kubuntu Hardy desktop. First I downloaded the tar.gz file and untar it. After that, I go to the “ros” folder inside. There you will find the instruction in README.txt.

So the first thing I did was to edit env.csh file and change the CASROOT environtment variable to where I untarred the source code. After that I run env.csh.

The next thing was to run ./configure. This is a bit tricky since a lot of things to set up. I first installed tk8.5 by typing:

sudo apt-get install tk8.5-dev

In the first trial, the configure cannot find Xmu.h, so I installed “libxmu-headers” package. But somehow, it still cannot find my X. So what I did was to create a symbolic link to

sudo ln -s

This fixed the problem and now configure can find my X. But there’s still one thing it cannot find which is java. the configure cannot find jni.h. So I installed sun-java6-jdk from apt-get and run the following configure command:

./configure --prefix=$HOME/Programs/OpenCascade/ --with-gl-include=/usr/include --with-gl-library=/usr/lib --with-xmu-include=/usr/include/X11/Xmu/ --with-xmu-library=/usr/lib/ --with-tcl=/usr/lib/tcl8.5/ --with-tk=/usr/lib/tk8.5 --with-java-include=/usr/lib/jvm/java-6-sun/include/

Now configure can find all that is required.  When I ran make, I encountered this error:

macro `AM_PROG_LIBTOOL' not found in library

From some forum, it was suggested to install libtool, so I install libtool from Adept, and the make can continue, but again it stopped and giving this error: directory should not contain `/'

I tried to run make again and it can continue even to the step of make install. But when I tried to run DRAWEXE application, it cannot find some library:

./DRAWEXE: error while loading shared libraries: libTKDraw.0: cannot open shared object file: No such file or directory

So I decided o try the steps described in:

% aclocal
% libtoolize --force
% autoconf
% automake
% mkdir build
% source
% cd build
% ../configure ${flags}
% make
% make install

where is defined as following:

flags="--prefix=$HOME/Programs/OpenCascade/ "
flags="$flags --with-gl-include=/usr/include --with-gl-library=/usr/lib"
flags="$flags --with-tcl=/usr/lib/tcl8.5/ --with-tk=/usr/lib/tk8.5"
flags="$flags --with-java-include=/usr/lib/jvm/java-6-sun/include/"
flags="$flags --enable-production"

I will update the post once it finishes 🙂


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: