patchGNU Octave - Patches: patch #8314, Patch to build system to use...

 
 

patch #8314: Patch to build system to use @rpath for Mac liboctave/libinterp

Submitted by:  Michael C. Grant <mcgrant>
Submitted on:  Thu 13 Feb 2014 04:22:13 PM UTC  
 
Category: NonePriority: 5 - Normal
Status: NonePrivacy: Public
Assigned to: NoneOpen/Closed: Open

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

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

 

Tue 25 Mar 2014 02:22:08 PM UTC, comment #3:

Hey, is there any chance we can get this patch committed to gui-release? Since John has designated that branch as a sort of a "sandbox" for making Octave and CVX play friendly with each other, it would be helpful to have this in there.

This particular makes MEX files portable across Mac installations (assuming no other external dependencies). It has no impact on Linux or Windows. It is similar to the approach employed by Octave-Forge, I believe, when building a Mac app bundle for Octave.

Michael C. Grant <mcgrant>
Sat 22 Feb 2014 05:14:55 PM UTC, comment #2:

Added liboctgui.0.dylib to the @rpath treatment. Necessary if the end goal is to make the package relocatable.

(file #30641)

Michael C. Grant <mcgrant>
Thu 13 Feb 2014 07:33:29 PM UTC, comment #1:

Patch amended slightly to bypass errors that occur if "install_name_tool -add_rpath" is run twice on the same executable (as will happen with, say, "make all; make install"). Please use rpath2.diff instead of rpath.diff.

(file #30541)

Michael C. Grant <mcgrant>
Thu 13 Feb 2014 04:22:13 PM UTC, original submission:

The following patch inserts additional build steps (using "all-local") in libinterp/Makefile, liboctave/Makefile, and src/Makefile so that these internal libraries and the binaries use the @rpath construct.

Specifically, the libraries' "install names" are changed to @rpath/liboctinterp.2.dylib and @rpath/liboctave.2.dylib, and the executables add $(octlibdir) to their RPATH list.

Why does this matter? It enables MEX/OCT files to be shared between users without recompilation and without having to resort to DYLD_LIBRARY_PATH tricks. I believe this is already possible for Linux and/or Windows, but these steps are needed for the Mac. (Indeed, Octave Forge's app bundles have to do something like this on a larger scale).

If you study the patch you will see I attempted to ensure that this is engaged ONLY on a Mac, only when shared libraries are being built, and only when the 'install_name_tool' utility is available. So this should leave builds for all other platforms unchanged.

Michael C. Grant <mcgrant>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #30641:  rpath3.diff added by mcgrant (3kB - application/octet-stream)
file #30541:  rpath2.diff added by mcgrant (3kB - application/octet-stream)
file #30538:  rpath.diff added by mcgrant (3kB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -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 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 22 Feb 2014 05:14:55 PM UTCmcgrantAttached File-=>Added rpath3.diff, #30641
    Thu 13 Feb 2014 07:33:29 PM UTCmcgrantAttached File-=>Added rpath2.diff, #30541
    Thu 13 Feb 2014 04:22:13 PM UTCmcgrantAttached File-=>Added rpath.diff, #30538

    Back to the top


    Powered by Savane 3.1-cleanup