New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support 3rd-party apps that build against Octave #225
Comments
Would be very nice to have Dynare included in Octave.app. Currently, if one wants to use Dynare with Octave on macOS it is needed to install it via Homebrew. I was able to install everything but then installing the statistics package in Octave such that I can use Dynare with it I did not succeed. If anyone is interested the problem described in more detail can be found here, here and related to that also here. |
Thanks for the input @mzerobin! We're gonna ruminate on this a bit and see if there's anything we can do here. |
I came across this old and closed bug report: https://savannah.gnu.org/bugs/?53627 Do you think that that change (or a similar one) would allow having "portable" .oct (and .mex) files on macOS? |
Oh! I think so? I think that would make it so that OCT and MEX files that were just built against Octave would be "portable" and no longer have this problem. I don't know what it would do for OCT and MEX files that also linked against additional libraries besides Octave; I'm not enough of a linker expert. Maybe it would even fix the whole problem because all their linked libs would be bind-at-load? |
I pushed your change to upstream Octave here: I'm not sure how "-bundle_loader" on macOS works though. |
There are some 3rd-party applications and libraries that need to be built against Octave. This is probably mostly in the form of MEX or OCT file bindings for Octave. An example is Dynare, an economic modeling application that has Matlab/Octave bindings.
Code built against Octave needs to be linked against the exact installation location of Octave (unlike Matlab MEX files, which are portable in that regard). So if you want to use one of these built-against-octave applications with Octave.app, it needs to be built against your Octave.app specifically. And that includes being built against all the libs in Octave.app's bundled Homebrewed userland; you can't build them against your main Homebrew installation.
Let's consider adding support for this in Octave.app.
This will be nontrivial, because it basically means setting up Octave.app as a full Unix build environment for programs to be built against.
What we do for things like Octave Forge packages that have library dependencies is to just unconditionally build them into the main Octave.app build. I don't think that's the right approach here, though: I don't want to end up pulling in everything under the sun that has Octave bindings. And then you're stuck with a fixed version. And developers of those packages won't be able to do development of them using Octave.app.
Questions
Requirements
/opt/octave-app
directory is a no-go in my view.For 2, I mean that our mechanism must not interfere with a system-level Homebrew or MacPorts installation, and it should also work in their presence, with no additional work on the part of the user.
Thoughts
My initial inclination is that the built packages should live under
/Library/Application Support/
or~/Library/Application Support/
, in a version-specificOctave.app/<version>/userland
directory.You could just install them into the Homebrewed userland under
/Applications/Octave-<ver>.app
, including using thebrew
command from there. But I don't think that's the right approach: macOS app bundles are supposed to be immutable. It would break app signing, if nothing else. (If we ever get app signing working, that is.)The text was updated successfully, but these errors were encountered: