2

Scilab 6 seems to have some error on Ubuntu 18.04, so I want to try running 5.5.2. I downloaded the binaries from Scilab website. When I try to run with ./scilab in the bin folder, it gives an authentication problem with something called a libEGL license:

$ ./scilab
libEGL warning: DRI2: failed to authenticate
Segmentation fault (core dumped)

Is there any fix to this?

N0rbert
  • 103,263

1 Answers1

1

On clean VM with Ubuntu MATE 18.04.5 LTS the binary version (scilab-5.5.2.bin.linux-x86_64.tar.gz) crashes with Segmentation fault (core dumped) caused by Java-related problem with thirdparty/java.

So we need to install Scilab 5.5.2 by manually downloading packages from 16.04 LTS repository with all their dependencies. Below is the complete instruction:

cd ~/Downloads
# scilab files
wget -c http://archive.ubuntu.com/ubuntu/pool/universe/s/scilab/scilab_5.5.2-2ubuntu3_all.deb
wget -c http://archive.ubuntu.com/ubuntu/pool/universe/s/scilab/scilab-cli_5.5.2-2ubuntu3_all.deb
wget -c http://archive.ubuntu.com/ubuntu/pool/universe/s/scilab/scilab-data_5.5.2-2ubuntu3_all.deb
wget -c http://archive.ubuntu.com/ubuntu/pool/universe/s/scilab/scilab-doc_5.5.2-2ubuntu3_all.deb
wget -c http://archive.ubuntu.com/ubuntu/pool/universe/s/scilab/scilab-full-bin_5.5.2-2ubuntu3_amd64.deb
wget -c http://archive.ubuntu.com/ubuntu/pool/universe/s/scilab/scilab-include_5.5.2-2ubuntu3_amd64.deb
wget -c http://archive.ubuntu.com/ubuntu/pool/universe/s/scilab/scilab-minimal-bin_5.5.2-2ubuntu3_amd64.deb
wget -c http://archive.ubuntu.com/ubuntu/pool/universe/s/scilab/scilab-test_5.5.2-2ubuntu3_all.deb
# scilab dependencies
wget -c http://security.ubuntu.com/ubuntu/pool/universe/h/hdf5/libhdf5-10_1.8.16+docs-4ubuntu1.1_amd64.deb
wget -c http://archive.ubuntu.com/ubuntu/pool/main/s/suitesparse/libsuitesparseconfig4.4.6_4.4.6-1_amd64.deb
wget -c http://archive.ubuntu.com/ubuntu/pool/main/s/suitesparse/libamd2.4.1_4.4.6-1_amd64.deb
wget -c http://archive.ubuntu.com/ubuntu/pool/universe/libm/libmatio/libmatio2_1.5.3-1_amd64.deb
wget -c http://archive.ubuntu.com/ubuntu/pool/main/s/suitesparse/libcamd2.4.1_4.4.6-1_amd64.deb
wget -c http://archive.ubuntu.com/ubuntu/pool/main/s/suitesparse/libccolamd2.9.1_4.4.6-1_amd64.deb
wget -c http://archive.ubuntu.com/ubuntu/pool/main/s/suitesparse/libcolamd2.9.1_4.4.6-1_amd64.deb
wget -c http://archive.ubuntu.com/ubuntu/pool/main/s/suitesparse/libcholmod3.0.6_4.4.6-1_amd64.deb
wget -c http://archive.ubuntu.com/ubuntu/pool/main/s/suitesparse/libumfpack5.7.1_4.4.6-1_amd64.deb

sudo apt-get update sudo apt-get install libcurl3 sudo apt-get install ./libhdf5-10_1.8.16+docs-4ubuntu1.1_amd64.deb
./libsuitesparseconfig4.4.6_4.4.6-1_amd64.deb
./libamd2.4.1_4.4.6-1_amd64.deb
./libmatio2_1.5.3-1_amd64.deb
./libcamd2.4.1_4.4.6-1_amd64.deb
./libccolamd2.9.1_4.4.6-1_amd64.deb
./libcolamd2.9.1_4.4.6-1_amd64.deb
./libcholmod3.0.6_4.4.6-1_amd64.deb
./libumfpack5.7.1_4.4.6-1_amd64.deb
./scilab*.deb

Then we need to get OpenJDK 8

sudo apt-get install openjdk-8-jre openjdk-8-jre-headless

Then we need to edit Scilab desktop file to use OpenJDK 8:

sudo sed -i "s/^Exec=scilab -f$/Exec=env JAVA_HOME=\/usr\/lib\/jvm\/java-8-openjdk-$(dpkg --print-architecture)\/jre scilab -f/" /usr/share/applications/scilab.desktop
sudo sed -i "s/^Exec=scilab-adv-cli$/Exec=env JAVA_HOME=\/usr\/lib\/jvm\/java-8-openjdk-$(dpkg --print-architecture)\/jre scilab-adv-cli/" /usr/share/applications/scilab-adv-cli.desktop

Optionally we can create an alias for scilab to use OpenJDK 8:

echo "alias scilab='env JAVA_HOME=/usr/lib/jvm/java-8-openjdk-$(dpkg --print-architecture) scilab'" >> ~/.bashrc
echo "alias scilab-adv-cli='env JAVA_HOME=/usr/lib/jvm/java-8-openjdk-$(dpkg --print-architecture) scilab-adv-cli'" >> ~/.bashrc
echo "alias xcos='env JAVA_HOME=/usr/lib/jvm/java-8-openjdk-$(dpkg --print-architecture) xcos'" >> ~/.bashrc

And finally we need to pin/hold all manually installed packages to prevent their upgrades:

cat <<EOF | sudo tee /etc/apt/preferences.d/pin-scilab
Package: libamd2.4.1
Pin: version 4.4.6-1
Pin-Priority: 1337

Package: libcamd2.4.1 Pin: version 4.4.6-1 Pin-Priority: 1337

Package: libccolamd2.9.1 Pin: version 4.4.6-1 Pin-Priority: 1337

Package: libcholmod3.0.6 Pin: version 4.4.6-1 Pin-Priority: 1337

Package: libcolamd2.9.1 Pin: version 4.4.6-1 Pin-Priority: 1337

Package: libhdf5-10 Pin: version 1.8.16+docs-4ubuntu1.1 Pin-Priority: 1337

Package: libmatio2 Pin: version 1.5.3-1 Pin-Priority: 1337

Package: libsuitesparseconfig4.4.6 Pin: version 4.4.6-1 Pin-Priority: 1337

Package: libumfpack5.7.1 Pin: version 4.4.6-1 Pin-Priority: 1337

Package: scilab Pin: version 5.5.2-2ubuntu3 Pin-Priority: 1337

Package: scilab-cli Pin: version 5.5.2-2ubuntu3 Pin-Priority: 1337

Package: scilab-data Pin: version 5.5.2-2ubuntu3 Pin-Priority: 1337

Package: scilab-doc Pin: version 5.5.2-2ubuntu3 Pin-Priority: 1337

Package: scilab-full-bin Pin: version 5.5.2-2ubuntu3 Pin-Priority: 1337

Package: scilab-include Pin: version 5.5.2-2ubuntu3 Pin-Priority: 1337

Package: scilab-minimal-bin Pin: version 5.5.2-2ubuntu3 Pin-Priority: 1337

Package: scilab-test Pin: version 5.5.2-2ubuntu3 Pin-Priority: 1337 EOF

The resulting version is fully-functional - you can use ATOMS, Xcos and so on.


But we still need official reaction from Scilab Ubuntu (or Debian) maintainers.
Scilab is very feature rich application and it is very pity that it is non-well-maintained...

N0rbert
  • 103,263