Tuesday, 24 March 2009

Building Engrid on Ubuntu Hardy

from https://sourceforge.net/mailarchive/forum.php?forum_name=engrid-users&max_rows=100&style=nested&viewmonth=200903&viewday=3

First, make sure you have the build dependencies:
/================
sudo apt-get install libvtk5 libvtk5-dev libvtk5-qt4 libvtk5-qt4-dev
libqt4-dev
================
/
Second, if you have qt3 dev files installed too, there might be a
conflict with qmake-qt3. So just run one of the following commands:
(I used the second command on my laptop. I'm not sure if the first one
works, but it should based on what I've read.)
/================
update-alternatives --install /usr/bin/qmake qmake "/usr/bin/qmake-qt4"
"50" --slave /usr/share/man/man1/qmake.1.gz qmake.1.gz
"/usr/share/man/man1/qmake-qt4.1.gz"
================
/or
/================
ln -sf /usr/bin/qmake-qt4 /usr/bin/qmake
================
/
To make sure the rest will work, check that /usr/bin/qmake is a link to
/usr/bin/qmake-qt4:
/================
[29][~]$ ls -l /usr/bin/qmake
lrwxrwxrwx 1 root root 18 Mar 3 12:04 /usr/bin/qmake -> /usr/bin/qmake-qt4
================
/
Check out the CVS:
/================
cvs -d:pserver:anonymous@en...:/cvsroot/engrid login
cvs -d:pserver:anonymous@en...:/cvsroot/engrid co src
cd src
================
/
Then you'll need to set up the environment before running qmake:
/================
export VTKLIBDIR=/usr/lib/
export VTKINCDIR=/usr/include/vtk-5.0/
export LD_LIBRARY_PATH=$VTKLIBDIR:$LD_LIBRARY_PATH
================
/I wrote a convenience script for this, which you can use instead if you
wish:
/================
source ./setup_paths.sh ubuntu
================
/
And finally, build netgen and engrid:
/================
./build-nglib.sh
qmake
make
================
/


Following an email from Oliver Gloth, I needed to re-compile. I did this,
as:
-----------------------
export VTKLIBDIR=/usr/lib/
export VTKINCDIR=/usr/include/vtk-5.0/
export LD_LIBRARY_PATH=$VTKLIBDIR:$LD_LIBRARY_PATH

and in ~/downloads/newengrid/src/

make clean
qmake
make

No comments:

Post a Comment