FreeMat build notes

10 views
Skip to first unread message

jdav...@tx.rr.com

unread,
Mar 28, 2008, 3:24:38 PM3/28/08
to freemat-devel
Hello. First, let me just say - awesome tool! Thanks for your
efforts on this; it's clear you've put a lot of time and effort into
creating a truly top-notch open source project.

I just completed a build from source of FreeMat on a Debian Etch
machine, grabbing all unavailable dependencies from source and
building *them* as well. I kept notes on the problems I encountered
and how I worked through them; I thought this might be helpful for
somebody else who might be contemplating building FreeMat from
source. I tried to put this on http://code.google.com/p/freemat/wiki/Building,
but my account doesn't appear to have access to edit wiki pages.

Here are my notes, if anybody thinks that this might be usefully
incorporated into any of the FreeMat documentation.

- FreeMat needed four things that I didn't have readily available - QT
(the widgets library), a fortran compiler, a BLAS library and an
LAPACK library.

- Qt (from source) is freely available from TrollTech; it takes a
*LONG* time to compile,
but for me it was as easy as "./configure, make, make install".
However, on Linux at least, supplying
the "--with-qt4dir=/usr/local/TrollTech/Qt4" as an argument to
FreeMat's configure script didn't work even after I had successfully
installed Qt. Instead, I had to configure pkg-config correctly, which
the Qt install doesn't do by default. I just did this:

# cp lib/pkgconfig/*.pc /usr/local/lib/pkgconfig

and FreeMat was happy. Well, for a second anyway.

I also had to add /usr/local/TrollTech/Qt-4.3.4/bin to my $PATH, so
that the FreeMat build could find "moc"
(some sort of Qt-specific precompiler, I beleive).

- You need g77 (Gnu's fortran compiler). I downloaded gcc-2.8.1 and
g77-0.5.23, merged them and it compiled OK. Note; I wasn't required
to downgrade gcc - I'm still running gcc 4.4 for C, but I also have
g77 available.

- The README refers to a "--with-miniblas" configure option. I tried
it out of desperation, but it didn't work (in fact, "--with-miniblas"
isn't referred to anywhere in the configure script).

- For BLAS (Basic Linear Algebra Subroutines, required by FreeMat), I
found "ATLAS" (recommended by the FreeMat documentation).
I tried (and tried, and tried, and tried) to get this to work with
FreeMat, but I never
got past configuration. I'm sure I'm missing something, but after two
days, I gave up on Atlas.
The problem was always that FreeMat's configure couldn't find the
required function "sgemm_",
which wasn't built by any Atlas build I could come up with.

Instead, I used the slower (according to the README) fortran reference
implementation at
http://www.netlib.org/blas/blas.tgz and the LAPACK from netlib. This
seems to work - and for
what I need, it's fast enough to keep me happy.

my final FreeMat configure call was:

./configure --with-blas=/home/jdavies/projects/math/BLAS/blas_LINUX.a
--with-lapack=/home/jdavies/devl/projects/math/lapack-3.1.1/
lapack_LINUX.a

After that, it was a simple make && make install to get it working.

Finally, I needed to add /usr/local/Trolltech/Qt-4.3.4/lib to my
LD_LIBRARY_PATH before I could run FreeMat.

demetrios...@googlemail.com

unread,
Mar 29, 2008, 4:51:20 AM3/29/08
to freemat-devel
> I tried to put this onhttp://code.google.com/p/freemat/wiki/Building,
> but my account doesn't appear to have access to edit wiki pages.
This is a general google problem: users with registrated google
accounts can't
"subscribe" to wikis like they can do to forums or blogs right now -
they need to have their user names added by someone.
(I hope google will add some simple forms to automate these
operations)
If you send me your google account user, I'll add you right away to
the project to be able to edit the wiki.
You can send it to demetrios DOT kyriakis AT googlemail DOT com

Demetrios.

EI

unread,
Apr 1, 2008, 6:54:36 PM4/1/08
to freema...@googlegroups.com
You can also try building by running buildtool from tools directory. It should download and build all the dependencies on Linux.

Eugene

Reply all
Reply to author
Forward
0 new messages