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


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

Submitted by:  Michael C. Grant <mcgrant>
Submitted on:  Wed 05 Feb 2014 11:00:45 PM UTC  
Category: Core : new featurePriority: 5 - Normal
Status: NonePrivacy: Public
Assigned to: NoneOpen/Closed: Open

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


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 File(s):

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
  • -unavailable- added by lachlan (Updated the item)
  • -unavailable- added by mcgrant (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 07 Jul 2016 11:17:09 PM UTClachlanCategoryNone=>Core : new feature
    Wed 05 Feb 2014 11:00:45 PM UTCmcgrantAttached File-=>Added mkoctfile.diff, #30465

    Back to the top

    Powered by Savane 3.1-cleanup1