Ubuntu 9.04/9.10 Compile From Source

12 views
Skip to first unread message

Timothy Cyders

unread,
Nov 2, 2009, 5:07:37 PM11/2/09
to freemat-devel, fre...@googlegroups.com
All,

I've successfully compiled on both Ubuntu Jaunty and Karmic. The instructions for both are pretty much the same. I'll upload a simple sh file to the google group that automates as much of this as possible when I get the chance.

Step 1: Install QT4

sudo apt-get install libqt4-dev

Step 2: Install fftw and fftwf - here, you may be able to get away with installing from the repo's (sudo apt-get install libfftw3-dev), but I forgot to try before following the below instructions. Can someone try this from a fresh install?

wget http://www.fftw.org/fftw-3.2.2.tar.gz
tar xvfz fftw-3.2.2.tar.gz
cd fftw-3.2.2
mkdir build_fftw
cd build_fftw
../configure
make && sudo make install
mkdir build_fftwf
cd build_fftwf
../configure --enable-single
make && make install

Step 3: Install cmake & ccmake

sudo apt-get install cmake cmake-curses-gui

Step 4: Install other libraries

sudo apt-get install libncurses5-dev build-essential llvm-dev gfortran liblapack-dev libsuitesparse libpcre3-dev libportaudio-dev

Step 5: Download and Unpack FreeMat Source Package

cd ~
wget http://downloads.sourceforge.net/freemat/FreeMat-4.0-Source.tar.gz
tar xvfz FreeMat-4.0.1-Source.tar.gz

Step 6: Configure FreeMat


mkdir cbuild && cd cbuild

Important Note: Ubuntu Karmic has llvm 2.6 (instead of 2.5). To reflect this, replace your CMakeLists.txt file in the FreeMat-4.0.1-Source directory with the one I've uploaded to the freemat google group. I simply changed '2.5' in the file to '2.6' so it wouldn't give me any errors using the new build (otherwise the configure wont find it).

ccmake ../FreeMat-4.0.1-Source

Type 'c' (sans quotes) to configure your install. You shouldn't come up with any errors, although it does regularly warn that using compiler optimization may bork your lapack install. I ignored this. Hit 'e' to get back to the original screen, then scroll down to the option 'Force_Bundled_portaudio' and hit 'enter' to change it to 'yes'. Configure again (so it ignores the error and lets you generate your makefiles - I had to do this twice for some reason). Hit 'g' to generate your makefiles, and it should put you back at your prompt.

Step 7: Compile and Install

make
sudo make install

I used make -j8 since I have 8 cores available (if you have a dual core, you can use -j2, quad core -j4, etc.) - this speeds up the process a LOT.

That's it.

Reply all
Reply to author
Forward
0 new messages