How to Install EMSO on Modern GNU/Linux Distributions
This post arose when I needed to help my girlfriend install the Environment for Modelling, Simulation and Optimisation (EMSO), a programme used for the simulation of models in chemical engineering, on a GNU/Linux environment, particularly Debian-based systems, as was the case on her laptop, a Lenovo with Pop!OS 24.04 LTS. I believe it should work on any distribution, provided the appropriate adjustments are made. Although the procedure involves installing legacy dependencies, it is safe and reliable. Thus, I am writing this manual for future students and lecturers interested in using EMSO on the free side of the Force, rather than resorting to Microsoft Windows.
The installation of EMSO on modern GNU/Linux systems requires a few
additional steps due to the reliance on legacy libraries. The publicly
available EMSO was compiled with older versions of the GNU Compiler
Collection (gcc), which means that it is necessary to manually
install some libraries that are no longer included by default in
current distributions.
The first step involves updating the system's package list and installing the basic dependencies required for operation. Among these are the FOX Toolkit-based graphics library and the sparse linear algebra suite provided by SuiteSparse. These libraries ensure the operation of EMSO's graphical user interface and its numerical modules.
sudo apt update
sudo apt install libfox-1.6-0 libsuitesparse-dev wget
Next, the latest version of EMSO is downloaded and extracted to a
standard system directory, such as /usr/local. Creating a symbolic
link to the executable allows the programme to be invoked directly
from the terminal, simplifying its day-to-day use.
wget https://www.enq.ufrgs.br/alsoc/download/emso/bin-linux/emso-academic-beta-linux2-x86_64-0.10.11.tar.gz
tar -xzvf emso-academic-beta-linux2-x86_64-0.10.11.tar.gz sudo mv emso /usr/local sudo ln -sf /usr/local/emso/bin/emso /usr/local/bin/emso
An important step in the process is the creation of a symbolic link
for the libumfpack library, as newer system versions provide only
the .so.6 version, whereas EMSO explicitly requires the
.so.5. This adjustment ensures compatibility without the need to
recompile the software.
sudo ln -s /usr/lib/x86_64-linux-gnu/libumfpack.so.6 /usr/lib/x86_64-linux-gnu/libumfpack.so.5
Additionally, it is necessary to manually install the library
libgfortran4, together with the package gcc-7-base, both from
older versions of the gcc. In modern systems, the standard library
(libgfortran.so.5) does not provide some symbols expected by EMSO,
such as GFORTRAN_7. For this reason, unlike the case of
libumfpack, creating symbolic links does not solve the problem,
since it is not merely a matter of the file name but of the absence of
these symbols in the newer version of the library. Therefore, the
reliable solution is to install the correct legacy version, ensuring
that all necessary dependencies are available at run time.
wget http://archive.ubuntu.com/ubuntu/pool/main/g/gcc-7/gcc-7-base_7.5.0-3ubuntu1~18.04_amd64.deb sudo dpkg -i gcc-7-base_7.5.0-3ubuntu1~18.04_amd64.deb
wget http://archive.ubuntu.com/ubuntu/pool/main/g/gcc-7/libgfortran4_7.5.0-3ubuntu1~18.04_amd64.deb sudo dpkg -i libgfortran4_7.5.0-3ubuntu1~18.04_amd64.deb sudo apt -f install
Finally, it is recommended to update the linker cache with ldconfig,
ensuring that all newly installed libraries are correctly recognised
by the system. After these steps, EMSO will be ready for use and can
be run directly from the terminal, or via the application shortcuts.
sudo ldconfig