Skip to content

Instantly share code, notes, and snippets.

@dietmarw
Last active January 1, 2016 11:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dietmarw/8140180 to your computer and use it in GitHub Desktop.
Save dietmarw/8140180 to your computer and use it in GitHub Desktop.

Installation instructions of 32bit Dymola for Linux on a 64bit machine

Here the solution (it originates from Martin Sjölund of OM) wich I'm happy to share:

OK so I basically followed the following steps on my 64bit Ubuntu 13.10 bit machine.

Note: I got into trouble trying to get Dymola running with 32bit version of 13.10 so therfore I installed the 32bit version of 13.04 which works fine. There seems to be an issue with the gcc/g++ which is of version 4.8 in 13.10 and of version 4.7 in 13.04

First create the 32bit chroot environment:

$ sudo apt-get install debootstrap schroot
$ CHROOT=/where/I/want/32bit
$ MIRROR=http://no.archive.ubuntu.com/ubuntu/
	# (or what ever mirror is best for you)
$ sudo debootstrap --arch i386 raring "$CHROOT" "$MIRROR"

Then I edited my /etc/schroot/schroot.conf

[32bit]
description= Ubuntu Raring 32-Bit
type=directory
personality=linux32
directory=/var/chroot/raring-i386
	# (or where ever you like to store the chroot environment)
users=<put your uesrname here>
root-groups=adm,root

Now one can simply switch into 32bit mode:

$ schroot -c 32bit

Note in my case the environment is called "32bit". It could be really any name as long as it's defined and set up in schroot.conf

Once in 32bit mode we need to install some dependencies for Dymola (the 32bit machine is basically a "naked" minimal Ubuntu installation which does not have access to the installed 64bit stuff):

$ sudo apt-get install zip g++ alien libice6 libfreetype6 libglu1-mesa \
	                   libqt4-script libfontconfig1 libxrender1 libsm6
$ sudo alien -i -k dymola_install.rpm

Now we can finally start Dymola but behold, our 32bit installation needs to know where to send the graphics:

$ DISPLAY=:0.0 /usr/local/bin/dymola

I've simply added the DISPLAY=:0.0 to the dymola startup script. mine looks like:

$ cat /usr/local/bin/dymola
#!/bin/sh
export DISPLAY=:0.0
export DYMOLA=/opt/dymola
export LD_LIBRARY_PATH=$DYMOLA/bin/lib:$LD_LIBRARY_PATH
exec $DYMOLA/bin/dymola $*

And finally, since I don't want to start schroot manually everytime I want to use Dymola, I simply created this startup script:

$ cat ~/.local/bin/dymola
#!/bin/sh
cd ~/<my working dir>
schroot -c 32bit /usr/local/bin/dymola

(of course ~/.local/bin needs to be in the PATH for this to work)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment