Building Opencascade from source for I386 for Ubuntu Linux

I was willing to give the .deb downloads but they were for AMD64..
I thought I was out of luck, but apparently, you can build Opencascade from source….

This is about my third month or so into Linux(I need to go through my gmail,to find the exact date from my library email), so I thought what the heck, lets give this a try. Sounds like fun…
Hear’s how you do it:

(*** Step 1***)Load the compiler and other stuff

First thing you need to do is to get your system tune up so it can compile. Go into terminal enter and enter
sudo apt-get install build-essential

A little research here as to what this build-essential is can be found at: This links seems straight foward enough…

(***Step 2***) Get the source
Goto for some reason, and search for the latest .orig.tar.gz, .diff.gz and the .dsc, which together make up the “source package”.
Download them to a central folder
At this moment this is what I got(hopefully I have the correct files here:
Just a side note… I had double clicked these files from my firefox browser. Everything downloaded except the .dsc which opened up a window. I need to wget that one from the terminal.

(***Step 3***) Unpack a source file package:
From terminal enter:
dpkg-source -x opencascade_6.2.0-7.dsc
(The file name will probably change over time as this project progresses):
A little research here:

This looks like this can get real complicated real fast, but I found this in the man pages as to what is going on:

dpkg-source packs and unpacks Debian source archives.

None of these commands allow multiple options to be combined into one, and they do not allow the value for an option to be specified in a separate argument.

-x filename.dsc [output-directory]
Extract a source package. One non-option argument must be supplied, the name of the Debian source control file (.dsc). An optional second non-option
argument may be supplied to specify the directory to extract the source package to, this must not exist. If no output directory is specified, the source
package is extracted into a directory named source-version under the current working directory.

dpkg-source will read the names of the other file(s) making up the source package from the control file; they are assumed to be in the same directory as
the .dsc.

The files in the extracted package will have their permissions and ownerships set to those which would have been expected if the files and directories
had simply been created – directories and executable files will be 0777 and plain files will be 0666, both modified by the extractors’ umask; if the par‐
ent directory is setgid then the extracted directories will be too, and all the files and directories will inherit its group ownership.

Seems sort of straightfowards, Now to examine the contents of the dsc:
Format: 1.0
Source: opencascade
Binary: libopencascade6.2-dev, libopencascade6.2-0, opencascade-tools, opencascade-doc, opencascade-examples
Architecture: any
Version: 6.2.0-7
Maintainer: Adam C. Powell, IV ###########
Build-Depends: autoconf, automake, bison, debhelper (>= 3.0), java-gcj-compat-dev, libgl1-mesa-dev | libgl-dev, libglu1-mesa-dev | libglu-dev, libtool, libx11-dev, libxmu-dev, tcl8.4-dev, tk8.4-dev
Build-Conflicts: libstlport4.6-dev, libstlport5.1-dev
e026ecccc928ef29fc283de0962c9773 100572993 opencascade_6.2.0.orig.tar.gz
da3585c552921aaddd62d16019b7ab6a 11344 opencascade_6.2.0-7.diff.gz

(***Step 4***) Building the package
Move into the subfolder are and start-building.

cd opencascade-6.2.0
dpkg-buildpackage -B

If you get a message about unmet dependencies apt-get or synaptic the files mentioned, if you see a | it means the first one is prefered.
In my case this popped up:
dpkg-checkbuilddeps: Unmet build dependencies: debhelper (>= 3.0) autoconf automake libtool bison libx11-dev tcl8.4-dev tk8.4-dev libgl1-mesa-dev | libgl-dev libglu1-mesa-dev | libglu-dev java-gcj-compat-dev libxmu-dev
dpkg-buildpackage: Build dependencies/conflicts unsatisfied; aborting.
dpkg-buildpackage: (Use -d flag to override.)
So.. I just marked everything I’m missing in synaptic. Time to start loading and see where we’re at in the morning…. (Something tells me I’m gonna need a bigger hard drive.

After installing and repeating I got this:
dpkg-buildpackage: source version without epoch 6.2.0-7
dpkg-checkbuilddeps: Unmet build dependencies: automake java-gcj-compat-dev
dpkg-buildpackage: Build dependencies/conflicts unsatisfied; aborting.
dpkg-buildpackage: (Use -d flag to override.)

Got up to go to the bathroom and see how its going: Seem to be getting closer
re:the automake, I chose automake1.9, I picked plane old automake also to see what happens.
re:java-gcj-compat-dev I must have just missed that one.
I’m not sure what the deal is with the epoch 6.2.0-7 is though a the moment.
Hmm. 4 minutes to download… what’s 4 minutes…
One more time and away we go….
See what it looks like in the morning….
Well it’s morning and it’s still cooking…. I wonder if it’s be done by American Idol?

Ok…Just got home… Missed Syesha.. I heard she knocked it out of the part….. What was Jason thinking??
Anyway Brook is doing ok… Not out of the park though…. Don’t these people ever watch the show…. Never do a ballad. The wife liked it though… anyway…
It seems like the compiler died.. Not a clue at the moment moment here is what went wrong:
(cd /home/jonas/OCC_orig_tar/opencascade-6.2.0/debian/tmp/usr/lib && { ln -s -f || { rm -f && ln -s; }; })
/usr/bin/install -c .libs/libmscmd.lai /home/jonas/OCC_orig_tar/opencascade-6.2.0/debian/tmp/usr/lib/
/usr/bin/install -c .libs/libmscmd.a /home/jonas/OCC_orig_tar/opencascade-6.2.0/debian/tmp/usr/lib/libmscmd.a
chmod 644 /home/jonas/OCC_orig_tar/opencascade-6.2.0/debian/tmp/usr/lib/libmscmd.a
ranlib /home/jonas/OCC_orig_tar/opencascade-6.2.0/debian/tmp/usr/lib/libmscmd.a
libtool: install: warning: remember to run libtool --finish /usr/lib'
make[4]: Nothing to be done for
make[4]: Leaving directory /home/jonas/OCC_orig_tar/opencascade-6.2.0/ros/adm/make/WOKLibs'
make[3]: Leaving directory
make[3]: Entering directory /home/jonas/OCC_orig_tar/opencascade-6.2.0/ros/adm/make'
make[4]: Entering directory
make[4]: Nothing to be done for install-exec-am'.
make[4]: Nothing to be done for
make[4]: Leaving directory /home/jonas/OCC_orig_tar/opencascade-6.2.0/ros/adm/make'
make[3]: Leaving directory
make[2]: Leaving directory /home/jonas/OCC_orig_tar/opencascade-6.2.0/ros/adm/make'
make[2]: Entering directory
make[3]: Entering directory /home/jonas/OCC_orig_tar/opencascade-6.2.0/ros'
make[3]: Nothing to be done for
make[3]: Nothing to be done for install-data-am'.
make[3]: Leaving directory
make[2]: Leaving directory /home/jonas/OCC_orig_tar/opencascade-6.2.0/ros'
make[1]: Leaving directory
# Why doesn’t OpenCASCADE install its own headers??
cp -a ros/inc debian/tmp/usr/
rm -f debian/tmp/usr/inc/config.h
cp -a ros/config.h debian/tmp/usr/inc/
install -d debian/tmp/usr/include
mv debian/tmp/usr/inc debian/tmp/usr/include/opencascade
install -d debian/tmp/usr/share/opencascade/UnitsAPI
cp -p ros/src/UnitsAPI/*.dat debian/tmp/usr/share/opencascade/UnitsAPI/
touch install
dh_testdir -a
dh_testroot -a
dh_testroot: You must run this as root (or use fakeroot).
make: *** [binary-arch] Error 1


Ok… Need to research a little
Hmmm. I think I give this a go and see what happens:

cd opencascade-6.2.0

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *