Index of /windows/releases/1.4/5/Linux
OpenModelica 1.4.5 for Linux (Debian)
=====================================
2009-01-31
Many thanks to Robert Wotzlaw, Robert Wotzlaw web de
for building the Linux (Debian) OpenModelica installer!
The Linux installer is here:
http://openmodelica.ida.liu.se:8080/cb/proj/doc.do?doc_id=1227
IMPORTANT NOTES:
1. The operation system and Linux distribution
The Debian packages of OpenModelica are build and tested on a Debian GNU/
Linux distribution with following specification:
- Debian version: Debian GNU/Linux testing "Lenny"
Official Snapshot i386 DVD Binary-1 to 5
20081201-10:34
- Kernel version: Linux version 2.6.26-1-686
(Debian 2.6.26-10) (waldi@debian.org)
(
gcc version 4.1.3 20080623 (prerelease) (Debian 4.1.2-23)
)
#1 SMP Sat Nov 8 19:00:26 UTC 2008
- GNU C++ version: 4.3.2
- Java (JRE): Sun Java Runtime Environment sun-java6-jre 6.07-4
- Java (JDK): Sun Java Development Kit sun-java6-jdk 6.07-4
- Desktop: GNOME 2.22.3
2. The storage of the OpenModelica Debian packages on PELAB
All OpenModelica Debian packages of the new version 1.4.5 are listed in the
following table. The places of the directories are relative to the following
link:
http://openmodelica.ida.liu.se:8080/cb/proj/doc.do?doc_id=1227
Name Directory
--------------------------------------------------------------------------
omc_1.4.5-1_i386.deb ./Linux/openmodelica/1.4.5/
omlibrary_1.4.5-1_all.deb ./Linux/openmodelica/1.4.5/
omnotebook_1.4.5-1_i386.deb ./Linux/openmodelica/1.4.5/
omshell_1.4.5-1_i386.deb ./Linux/openmodelica/1.4.5/
omshell-terminal_1.4.5-1_i386.deb ./Linux/openmodelica/1.4.5/
openmodelica_1.4.5-1_i386.deb ./Linux/openmodelica/1.4.5/
libcoin60_3.0.0-1_i386.deb ./Linux/coin3/3.0.0/
libsoqt4-20_1.4.1+nod-1_i386.deb ./Linux/soqt/1.4.1+nod/
libmico2.3.13_2.3.13-1_i386.deb ./Linux/mico2.3.13/2.3.13/
3. Hint how to install the external Debian packages:
All the above mentioned Debian packages needs some special treatment. Eight
of the packages are not members of the official Debian repository. The
package libcoin60 is from the official Debian sid aka unstable repository.
You can't get the eight packages with apt-get or synaptic. In the next
steps I will show You, how You can install all the above packages. You must
do this thinks as user root:
1. Go in the directory /etc/apt/sources.list.d.
2. Create a file localepkg.list.
3. Insert the following text:
# locale packages in directory /root/cache/apt/archives
deb file:/root/cache/apt/archives/ ./
4. Change in the directory /root.
5. Make the subdirectory ./cache/apt/archives/.
6. Copy the following external packages into the subdirectory
/root/cache/apt/archives:
omc_1.4.5-1_i386.deb
omlibrary_1.4.5-1_all.deb
omnotebook_1.4.5-1_i386.deb
omshell_1.4.5-1_i386.deb
omshell-terminal_1.4.5-1_i386.deb
openmodelica_1.4.5-1_i386.deb
libcoin60_3.0.0-1_i386.deb
libsoqt4-20_1.4.1+nod-1_i386.deb
libmico2.3.13_2.3.13-1_i386.deb
7. In the directory /root/cache/apt/archives/ run the following command:
#> dpkg-scanpackages . /dev/null | gzip > Packages.gz && apt-get update
! Obey the point between the letter s and the slash.
Now the debian package repository knows Your external packages.
Hint: If the above command dpkg-scanpackages does not exist. You must
install the Debian binary package dpkg-dev. The package dpkg-dev
will give You the command dpkg-scanpackages.
8. In this step You will install the nine packages. You can use the console
program apt-get or under GNOME the program synaptic. But both uses root
privileges. With apt-get do the following:
#> apt-get install openmodelica
In synaptic You have a window surface and You can easier follow what the
package manager pulls in. You can start synaptic as normal user. It will
ask Your root password:
$> su-to-root -X -c /usr/sbin/synaptic
In synaptic You must only mark the Debian package openmodelica. This will
pull in all the other dependent packages. After installing the packages
the package openmodelica can safely removed.
9. After installing all the packages, You can delete all files in the sub-
directory /root/cache/apt/archives/.
Hint: Every time You want install external packages, You must follow the
above procedure. You must only go through the steps six until nine.
But there exist many ways to go at Rom. The above procedure has an
advantage, it solves the dependencies between the packages.
4. Hint installing OpenModelica on a Debian system with installed OpenJDK Java
runtime environment
OpenModelica for Debian depends on the Sun Java Runtime Environment 6.07 and
above. I never tested OpenModelica under the OpenJDK Java runtime environ-
ment. But for the impatient and experienced user the following instructions
gives hints how to install OpenModelica under OpenJDK. The only OpenModelica
Debian package that depend on Sun Java is omc. In the following steps I will
show You how to manipulate the control file inside the Debian package omc.
1. Make a directory in Your home directory with the name chdeb:
$> mkdir chdeb
2. Copy the Debian package omc_1.4.5-1_i386.deb into the directory chdeb.
3. The following command will extract the Debian package in the sub direc-
tory omc:
$> dpkg-deb -x omc_1.4.5-1_i386.deb omc/
Hint: If the above command dpkg-deb does not exist. You must install the
Debian binary package dpkg. The package dpkg will give You the com-
mand dpkg-deb.
4. Debian control directory DEBIAN extraction:
$> dpkg-deb -e omc_1.4.5-1_i386.deb omc/DEBIAN
5. Now change in the sub directory ./omc/DEBIAN. Use a text editor like
vim and add in the file control the following text:
- text before editing
Depends: omlibrary (= 1.4.5-1), sun-java6-jre (>= 6-07-04), ...
- text after editing
Depends: omlibrary (= 1.4.5-1), sun-java6-jre (>= 6-07-04) | openjdk-6-jre
With the new entry " | openjdk-6-jre" the OpenModelica Debian package omc
depends now on the Debian packages sun-java6-jre or openjdk-6-jre. Store
the new changes and close the editor.
6. Go back in the directory chdeb and rename the Debian package
omc_1.4.5-1_i386.deb in omc_1.4.5-1_i386.deb.old. The next command will
rebuild the Debian package omc:
$> fakeroot dpkg-deb -b omc .
! The point after omc is necessary.
You will find the changed omc Debian package under Your current directory.
The package should now be ready for installation under Debian with in-
cluded OpenJDK Java runtime environment.
7. Changes under ./omc/usr/
If You made changes in the directory ./omc/usr/, You must generate a
new md5sums file. After the generation of the md5sums file You can re-
build the Debian package omc. But step seven is only necessary if You
have changed one or more files under ./omc/user/. The following command
shows how to generate the md5sums file. The command will overwrite the
md5sums file under ./omc/DEBIAN/. First change in the sub directory
omc:
$> find ./usr -type f -print0 | xargs -0 md5sum | \
sed 's\ ./\ \g' > ./DEBIAN/md5sums
! Between "s\ ./" and "\ \g" are two spaces.
Now You must go to step six and rebuild the Debian omc package.
5. Hint OpenModelica environment variables are different in the Debian
packages:
In the Debian packages of the OpenModelica simulation software the environ-
ment variables have the following values:
- OPENMODELICAHOME=/usr/lib/omc
- OPENMODELICALIBRARY=/usr/share/omlibrary/modelicalib/
The storage structure differs in the Debian packages.
6. Hint running SimForge with OpenModelica Debian packages, the following must
be done:
The compiler/interpreter OMC needs the environment variable QTHOME. Before
starting Simforge the variable QTHOME must be set:
$> export QTHOME=/usr/lib/omc/lib
A symbolic link must be created in the directory /usr/lib/. The name of the
link is libmico.so and points to the library libmico2.3.13.so.0. This is a
job from the user root:
#> ln -s libmico2.3.13.so.0 libmico.so
Now the user can run SimForge from the console. In the setting menu of
SimForge the user must input the following values:
OPENMODELICAHOME : /usr/lib/omc
OPENMODELICALIBRARY : /usr/share/omlibrary/modelicalib/
LD_LIBRARY_PATH : /usr/lib
Regards,
Robert Wotzlaw