[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Concurrently providing mex files for multiple platforms

From: Qianqian Fang
Subject: Concurrently providing mex files for multiple platforms
Date: Wed, 20 Apr 2022 23:26:41 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0

Dear group,

I have been writing various toolboxes for octave and matlab - both as part of my research and hobby. I especially care about portability of my toolboxes, and often times spent quite a bit effort to ensure they can run across matlab and octave, as well as various OSes.

One challenge I am facing is to deploy mex-based toolboxes. For example, when deploying my ZMat toolbox (, I have provided precompiled mex files for MATLAB users so that the toolbox can be ready-to-use across various OSes. These precompiled files are stored by OS-sensitive extensions (mexext) and can be conveniently placed under the same folder, see

unfortunately, I am not aware of a way to do the same for Octave, and had to require users to manually add path to the .mex files built for each platform

I am wondering if there is way to organize or name these files so that they can be easily aggregated to create easily to deploy packages?

Another issue related to deploying these precompiled binaries is the .so file. I recognize that the mex files created by MATLAB's mex command links to a library that is not version dependent, however, the mex file produced by mkoctfile -mex links to specific version of When the octave version on the user's system is different from the one at compile time, the mex file throws an error. Although I can create symbolic links to the compile-time, it requires sudo and can not be automated.

I wonder if there is any workaround to this?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]