patchGNU Octave - Patches: patch #8308, Adds --minimal-dependencies flag...


patch #8308: Adds --minimal-dependencies flag to mkoctfile for more portable mex/oct files

Submitter:  Michael C. Grant <mcgrant>
Submitted:  Wed 05 Feb 2014 11:00:45 PM UTC
Category:  Core : new feature Priority:  5 - Normal
Status:  Wont Do Privacy:  Public
Assigned to:  None Open/Closed:  Closed
* Mandatory Fields

Add a New Comment (Rich Markup)

Comment Type & Canned Response:


Thu 07 Mar 2019 02:38:51 AM UTC, comment #1: 

This has actually already been done in the current Octave release. Starting with version 5, mkoctfile only links with liboctinterp and liboctave, unless the user has built Octave with --enable-link-all-dependencies. So closing this because it's been obsoleted by default.

Mike Miller <mtmiller>
Project Administrator
Wed 05 Feb 2014 11:00:45 PM UTC, original submission:  

Currently, mkoctfile links mex/oct files to every external dependency that Octave is built with. Strictly speaking, most if not all of these dependencies will be unnecessary for many mex files; and linking to them may make the resulting binary non-portable. (And see the bug report I've filed where mkoctfile is failing because it forgets to include a library path to X11 libraries; how many mex/oct files need X11?)

I have created a "--minimal-dependencies" option that, when used, causes mkoctfile to link only to liboctave and libinterp. If the user wishes to link to other libraries, it will be his/her responsibility. This is actually the default behavior with Matlab---even if you want to use the built-in BLAS or LAPACK you have to add the -lblas and -llapack flags yourself.

I've built and tested 36 mex files with this option engaged for CVX, including code that externally links to the Mac's BLAS. Adopting this approach, even as an option if not the default, should make it easier for people to build and distribute Octave mex/oct files in binary form.

I'm not wedded to the long option name by the way.

Michael C. Grant <mcgrant>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

Attached Files
file #30465:  mkoctfile.diff added by mcgrant (3KiB - application/octet-stream)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by lachlan (Updated the item)
  • -email is unavailable- added by mcgrant (Submitted the item)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.





    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-03-07 mtmiller StatusNone Wont Do
        Open/ClosedOpen Closed
    2016-07-07 lachlan CategoryNone Core : new feature
    2014-02-05 mcgrant Attached File- Added mkoctfile.diff, #30465

    Back to the top

    Powered by Savane 3.9