Installing CGAL on Ubuntu 8.04

I just had a hard time installing CGAL from source on a Ubuntu 8.04. First of all, I had to download CGAL (3.6) source.


Untar, it

tar -xzf CGAL-3.6.1.tar.gz

And then configure the installation with cmake

cd CGAL-3.6/
cmake .

Altough I had the required version of boost installed (1.34.1), some examples didn’t compile. So I downloaded boost source (1.43.0):


tar -xzf boost_1_43_0.tar.gz
cd boost_1_43_0

And then configured it


And then built it with

sudo ./bjam install

Some errors arised and researching a little, I found that these two libraries were missing:

sudo apt-get install python-dev libbz2-dev

Then, when compiling cmake, it was not finding the correct version of boost. It was looking in /usr/include and /usr/lib, but the right version was in /usr/local/include and /usr/local/lib. To inform cmake of that, we should add the following parameter when configuring:

cmake -DBOOST_ROOT=/usr/local .

Then I was installing with


And got the following error

$/usr/bin/ld: /usr/local/lib/libz.a(gzio.o): relocation R_X86_64_32 against `a local symbol’ can not be used when making a shared object; recompile with -fPIC
$/usr/local/lib/libz.a: could not read symbols: Bad value

The problem was with the library zlib. The solution I find was here. It basically says to install zlib from source, but compiling with the flags -O3 and -fPIC.

tar -xzf zlib-1.2.5.tar.gz
CFLAGS="-O3 -fPIC" ./configure
sudo make install

going to cgal directory again and typing make, did the job.


2 thoughts on “Installing CGAL on Ubuntu 8.04”

Leave a Reply

Please log in using one of these methods to post your comment: 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