1

I'd like to distribute a program through conda (so built using conda-build) that links to MATLAB's libmex.

Is it possible to get the libmex library onto a public build system like conda, GitHub Actions, or Homebrew?

Is there another method for this?

raf
  • 535
  • 4
  • 18
  • Possible licensing issues because MATLAB isn't free? Have you checked that you're allowed to redistribute `libmex`? – Pranav Hosangadi Mar 05 '21 at 21:47
  • 2
    You are not allowed to redistribute libmex, don’t do this. But you might download and install the MCR: https://www.mathworks.com/products/compiler/matlab-runtime.html (though it’s huge!). – Cris Luengo Mar 06 '21 at 00:14
  • No, I don't intend to distribute the libmex binary without some official support and you are both correct that this would be a bad idea. I'm wondering if there is official support or any other way to accomplish my goal of building this package with conda-build on Conda-forge and link to libmex. – raf Mar 06 '21 at 01:07
  • I was curious to see if perhaps at least header files could be distributed, but [apparently that is not the case.](https://es.mathworks.com/help//pdf_doc/matlab/offering.pdf) They clearly disallow header file distribution. Too bad -- that might have enabled you to compile your code without fully linking it (e.g. using `-undefined dynamic_lookup` on Mac). – Stuart Berg Mar 07 '21 at 14:16
  • Although it appears public build systems are out of the question, private build systems are still an option. As long as you don't distribute it, you could probably build your own conda package for `libmex` and its headers, and also build a conda package for your own software. You'd just have to avoid uploading them to anaconda.org, unfortunately. – Stuart Berg Mar 07 '21 at 14:19
  • BTW, I wonder if `Github Actions` would be okay to use if you're using a completely private repository... seems to me like that would be fine, but IANAL. And you'd still need to find a way to download the results without using a public repository like anaconda.org. – Stuart Berg Mar 07 '21 at 14:20
  • @StuartBerg I'm reading through these comments again since I still haven't found a solution for this. Am I understanding correctly that you are not allowed to distribute a binary that has statically linked to libmex? I guess if it's dynamically linked you are probably safe. – raf Jul 12 '22 at 15:27
  • I have no clue. Maybe it's mentioned in the document I linked above. – Stuart Berg Jul 13 '22 at 10:05

0 Answers0