Installing Matlab 7.0 and Femlab 3.1
Антон Хохлов
orvind at mail.ru
Tue Aug 29 09:52:38 UTC 2006
Hi,
I'm a newby in this mailing list so I'm sorry if something is wrong with my letter.
Yesterday I tried to install Matlab 7.0 with the help of the correspondent
FreeBSD handbook's section. I've found out that the section is incomplete
and allows to install and run Matlab with the -nojvm option enabled
which disables X-based gui and some other features.
In addition for my work I need a FEMLAB toolbox for Matlab
(since some time ago it is called COMSOL Multiphysics toolbox),
but I could not find any manual for that anywhere in the internet.
So I wrote a short instruction of how to do that. I hope someone could fix
my english mistakes and append the instruction to FreeBSD handbook.
Installing Matlab 7.0
1. Follow the steps 10.5.1,10.5.2 and 10.5.4 of the FreeBSD handbook (Installing Matlab section). It seems you don't need to perform step 10.5.5 when installing Matlab 7.0. Don't touch $MATLAB/sys/java/jre/glnx86 as it is described in 10.5.3! Since now you can run Matlab in the text mode only (option -nojvm will be enabled automatically when Matlab starting).
2. In order to run Matlab GUI you need to install the following ports (or binary packages):
linux_base, linux-glib2, linux-xorg-libs, linux_dri and linux-openmotif.
3. Delete all files from $MATLAB/sys/os/glnx86 and $MATLAB/sys/opengl/lib, type as root:
ln -s /compat/linux/usr/X11R6/lib/libXm.so.3 $MATLAB/sys/os/glnx86/libXm.so.2
ln -s /compat/linux/usr/X11R6/lib/libGL.so.1 $MATLAB/sys/opengl/lib/glnx86/libGL.so
ln -s /compat/linux/usr/X11R6/lib/libGLU.so.1 $MATLAB/sys/opengl/lib/glnx86/libGLU.so
ln -s $MATLAB/sys/opengl/lib/libMesaGL.so $MATLAB/sys/opengl/lib/glnx86/libGL.so
ln -s $MATLAB/sys/opengl/lib/libMesaGLU.so $MATLAB/sys/opengl/lib/glnx86/libGLU.so
4. Done!
Note, after completing step 3 check that created links point to the existent libraries. If some links are broken, go to your /compat/linux/usr/X11R6/lib folder and fix them by creating symbolic links to your version of libXm.so.*, libGL.so.* and libGLU.so.*
Installing Femlab 3.1
1. Execute Femlab installer with
/compat/linux/bin/sh ./install
or just with
./install
and complete the installation process.
Point to Matlab installation path when asked (if Matlab is needed).
2. Open $FEMLAB/bin/femlab and find the line containing Linux*. Add FreeBSD* there. It's 231st line for me.
Before:
linux*|Linux*)
After:
linux*|Linux*|FreeBSD*)
If you need to run Femlab standalone (without connection to Matlab), you may skip steps 3-4 and go to 5.
3. Fetch java3d-sdk-1.3.1-linux-i386.bin or later version from anywhere. I've installed java/java3d port first and then copied the file from /usr/ports/distfiles. Unpack the file (just run with /bin/sh and accept the agreement), copy contents of created jre/lib folder to $MATLAB/sys/java/jre/glnx86/jre1.5.0/lib.
4. Check that your hostname is correct and that the correspondent line in
/etc/hosts exist, add the line in opposite case.
5. Create Femlab startup script in /usr/local/bin/
#!/bin/sh
/compat/linux/bin/sh $WHERE_FEMLAB_IS_INSTALLED/bin/femlab "$@"
6. Enjoy ;)
Yours,
Anton Khokhlov
More information about the freebsd-doc
mailing list