FOSSEE Scilab Octave Toolbox
The Scilab team at FOSSEE, IIT Bombay is developing a toolbox to enable Octave functionalities within Scilab.
The toolbox repository is maintained at https://github.com/FOSSEE/fossee-scilab-octave-toolbox. It is also published and available on https://atoms.scilab.org/toolboxes/FSOT
This toolbox has been built and tested using
OS - Ubuntu 23.04, 64-bit
Octave - Version 7.3.0
Scilab - Version 6.1.0
Software prerequisites:
Run the following commands in the linux terminal
sudo apt-get install build-essential (~117 MB download)
sudo apt-get install liboctave-dev (~103 MB download)
sudo apt-get install octave
sudo apt-get install scilab
NOTE: Downloaded scilab binaries will not work with this toolbox due to fftw library mismatch. Scilab HAS to be installed using apt.
Install the required octave packages using the below command in linux terminal
sudo apt-get install octave-<pkg name>
For example, to install signal package in octave, do
sudo apt-get install octave-signal
Launch Scilab and run the following commands inside the scilab console
cd <path to scilab_octave toolbox directory>
exec builder.sce
exec loader.sce
help octave_fun (then execute the examples appearing on the help page)
Building the source
In case if executing the builder and loader files in scilab throw an error regarding .so files, you probably need to build the toolbox from source. Do the following on the linux terminal
Download the fossee-scilab-octave-toolbox source from https://atoms.scilab.org/toolboxes/FSOT
Close scilab, if running
cd <path to fossee-scilab-octave-toolbox/src/ directory>
make clean
make
make install
You should now be able to build and load the toolbox in scilab.
Octave built-in functions:
There are total 1448 functions available with octave without the need of any packages. The list is available at https://octave.sourceforge.io/list_functions.php Almost all of these functions (except plots and structures) can be accessed using this toolbox.
Octave packages:
There are two categories of packages in octave, namely Community Packages and External Packages. Community Packages are maintained by the Octave Forge and Octave developers community. External Packages are maintained by their respective authors. The details can be sought at https://octave.sourceforge.io/packages.php Any of the functions of these packages can be accessed using the scilab_octave toolbox, except those that include structures, plotting and symbolic variables. These will be addressed in the next releases of the toolbox.
Issues with the toolbox:
Throughout this development, we have encountered several key challenges related to version compatibility, dependency management, and build complexity. We are sharing these issues to seek community input and facilitate collaborative problem-solving.
1. Version Compatibility Issues
Problem: Updates in Scilab can alter the behavior of toolboxes, particularly those involving C or C++ code. For instance, our Octave toolbox, which functioned well in Scilab 5.x, failed in Scilab 6 due to changes in the C interface. These changes resulted in crashes of our function calls.
Impact: Each new version of Scilab requires us to validate and potentially modify our toolbox to ensure compatibility, creating a continuous maintenance burden.
2. Dependency Management Challenges
Problem: Toolboxes often rely on specific versions of external libraries. For instance, the current version of the Scilab Octave toolbox requires liboctave6. However, upgrading to a newer version of Octave may necessitate liboctave7 or a higher version, depending on the latest release. This discrepancy can prevent the toolbox from functioning unless the exact older version of liboctave and its dependencies are installed.
Impact: This version mismatch complicates the management of library dependencies and requires careful handling to ensure the toolbox continues to work correctly after an Octave upgrade.
3. Build Process Complications
Problem: Recommending a source-only approach for building the Octave toolbox presents significant challenges. Users must install a complete C/C++ toolchain, Octave headers, and libraries, and properly configure the builder.sce file with system-specific paths. This process varies across different operating systems (Linux, Windows, Mac) and can be particularly challenging for new users.
Impact: The complexity of setup and configuration can discourage users from successfully building the toolbox, making it hard for people to use.
Contributors:
Rupak Rokade, FOSSEE IIT Bombay
Rashmi Patankar, FOSSEE IIT Bombay
Mentors:
Prof. Kumar Appaiah, IIT Bombay
Email us at: toolbox@scilab.in.