Update for matlab-igraph toolbox

Hi, I’ve started work on the toolbox again. As suggested in the previous post, I’ve moved from make to cmake, which is much cleaner. The toolbox now builds on macOS, Windows, and Linux. (Windows is not running yet, however, I’m not familiar with how Windows deals with libraries but I think I need to ship some DLLs with it.) On linux/macOS I have it statically compiled so, at runtime, it isn’t dependent on any non-standard libraries. The build process is know automated with github’s actions for each OS. It also runs in MATLAB online and is submitted to their File Exchange, which in theory allows anyone to install it through MATLAB’s add-on interface.

There are still a few issues, for one the File Exchange does not allow me to attach multiple toolboxes so anyone not using linux will have to manual grab the correct toolbox from the github release. I can dump all the compiled files into a single toolbox and let MATLAB sort it out at runtime based on the architecture but that does mean significantly larger toolboxes. I’m also having some issues with runtime dependencies. On linux, MATLAB ships with an old version of stdlibc++ it then gives preference to the libraries it ships with which leads to errors. I can either build igraph with an older version of stdlibc++, but I haven’t managed to get it to compile correctly, or manually remove the lib shipped with MATLAB so the system one is used. I also tried running it on an out-of-date lab computer and had issues with old versions of libm and libc but I assume there’s nothing I can do on the distribution side to handle an end user have too old of libraries.

After figuring out Windows, I intend to replace the use of matrices as the default MATLAB side datatype with MATLAB’s preexisting graph type which allows for multigraphs and supplying attributes/metadata to. After that I will look into stimulus to see how much hand-generated code I can replace with it.

Got Windows figured out by packaging the runtime dlls with it. Thought I could do the same with the Linux issues but it seems like MATLAB isn’t respecting the RPATHs. I can confirm the RPATH is set correctly and ldd displays shared libs I ship with the toolbox but inside MATLAB it looks elsewhere.