If like me you have some trouble to get SIVP working on Scilab, I thought I could share this notice I wrote a few years ago. I hope it can save some frustration for some of you.
If you don't yet have Scilab you just need to do:
sudo apt install scilab
Once this is done, launch Scilab, and execute:
atomsInstall("SIVP")
Reboot Scilab. If no error appears, congratulation, you're done! Read further if you are not that lucky.
If the following error is displayed:
atomsLoad: An error occurred while loading 'SIVP-0.X':
link: The shared archive was not loaded: libtiff.so.4: cannot open shared object file: No such file or directory
Or in the french version of Scilab:
atomsLoad : Une erreur est survenue au cours du chargement de 'SIVP-0.X' :
link : La bibliothèque partagée n'a pas été chargée: libtiff.so.4: Ne peut ouvrir le fichier d'objet partagé: Aucun fichier ou dossier de ce type.
That's probably because your computer possess libtiff5 when Scilab is trying to use libtiff4. The 4 is not available anymore with apt so don't try to install it like that. You have two choices:
- install libtiff4 with
wget
directly from an archived package website (I'll let you search how to do that) - (easier but dirtier, still my favourite) create a symbolic link to alias libtiff5 as libtiff4. You can do it this way:
sudo ln -s /usr/lib/x86_64-linux-gnu/libtiff.so.5 /usr/lib/x86_64-linux-gnu/libtiff.so.4
(You may need to adapt the paths depending on your install directory for libtiff5)
Reboot Scilab. If no error appears, congratulation, you're done! Read further if you are not that lucky.
If the following error is displayed:
atomsLoad: An error occurred while loading 'SIVP-0.X':
link: The shared archive was not loaded: libjpeg.so.62: cannot open shared object file: No such file or directory
Or in the french version of Scilab:
atomsLoad : Une erreur est survenue au cours du chargement de 'SIVP-0.X' :
link : La bibliothèque partagée n'a pas été chargée: libjpeg.so.62: Ne peut ouvrir le fichier d'objet partagé: Aucun fichier ou dossier de ce type.
You are just missing libjpeg62. Install it normally (sudo apt install libjpeg62-dev
)
Reboot Scilab. If no error appears, congratulations, you're done! Read further if you are not that lucky.
If the following error is displayed:
atomsLoad: An error occurred while loading 'SIVP-0.X':
link: The shared archive was not loaded: /home/USERNAME/.Scilab/scilab-5.X/atoms/SIVP/0.X/sci_gateway/c//../../thirdparty/opencv/linux/x64/libavformat.so: file too short
Or in the french version of Scilab:
atomsLoad : Une erreur est survenue au cours du chargement de 'SIVP-0.X' :
link : La bibliothèque partagée n'a pas été chargée: /home/USERNAME/.Scilab/scilab-5.X/atoms/SIVP/0.X/sci_gateway/c//../../thirdparty/opencv/linux/x64/libavformat.so: fichier trop court
This one is the weirdest. The install wasn't done correctly ; in the installation folder the files that atomsLoad tries to read only contains the name of the actual corresponding library file. You first need to go the the given path with:
cd /home/USERNAME/.Scilab/scilab-5.X/atoms/SIVP/0.5.X/thirdparty/opencv/linux/x64/`
(take care when you adapt this path to your system, Scilab gives you a path with lots of indirections).
Then, for each invalid library file in the folder (all of them) you need to extract the correct filename from inside of it, delete it and create a link to alias the valid file as the expected library filename (you can also probably just rename it but I didn't test it in case the original names are used elsewhere). You can do it with this command:
for F in *.so; do LIB=$(cat $F) ; rm $F ; ln -s $LIB $F; done
Reboot Scilab.
Et voilà! You are done! If you happen to have another error after all that that's not just another missing library... then may the force be with you. Otherwise, enjoy the beginning of your adventure with this great? tool.