bugGNU Octave - Bugs: bug #41574, Current build approach causes...

 
 

bug #41574: Current build approach causes mkoctfile to link to too many libraries on the Mac (patch supplied)

Submitted by:  Michael C. Grant <mcgrant>
Submitted on:  Thu 13 Feb 2014 12:07:22 AM UTC  
 
Category: Configuration and Build SystemSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Regression
Status: Patch SubmittedAssigned to: None
Originator Name: Michael C. GrantOpen/Closed: Open
Release: devOperating System: Mac OS

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

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

 

Fri 28 Mar 2014 01:30:23 AM UTC, comment #5:

Note: this effectively solves the issue in #41460 as well; but if one is to be closed as a duplicate, it should be that one, since this one at least has a patch.

Michael C. Grant <mcgrant>
Tue 25 Mar 2014 02:24:56 PM UTC, comment #4:

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 patch help make MEX files portable across Mac installations (assuming no other external dependencies). In this case, it reduces the number of dependencies that are linked to MEX/Oct files on the Mac. It is designed to have no impact on Linux or Windows.

https://savannah.gnu.org/support/download.php?file_id=30634

Michael C. Grant <mcgrant>
Fri 21 Feb 2014 08:04:44 PM UTC, comment #3:

AMCOND_LINK_GUI_DEPS and AMCOND_LINK_ALL_DEPS diverge on the Mac when Qt is linked in via a non-system framework. In that case, AMCOND_LINK_GUI_DEPS becomes "true" no matter what happens to AMCOND_LINK_ALL_DEPS.

Michael C. Grant <mcgrant>
Fri 21 Feb 2014 08:03:15 PM UTC, comment #2:

Since the new AMCOND_LINK_GUI_DEPS is set by the same variable ($link_all_deps) as AMCOND_LINK_ALL_DEPS, how does that change anything?

John W. Eaton <jwe>
Project Administrator
Fri 21 Feb 2014 07:05:54 PM UTC, comment #1:

I've modified this patch based on new compilation errors that arise when it is combined with the QtHandles additions.

I noted that the "-framework Carbon" and the "-framework OpenGL" flags were wrapped in "-Wl," prefixes so they would be delivered directly to the linker. However, the current build of libtool knows how to handle "-framework" flags; and it needs to handle them so it can propagate dependencies properly.

Removing those prefixes eliminates the OpenGL linking errors I was seeing with the QtHandles library. (To be fair, I could have left -framework Carbon alone, but I do believe it is the right thing to remove them.)

(file #30634)

Michael C. Grant <mcgrant>
Thu 13 Feb 2014 12:07:22 AM UTC, original submission:

Earlier I submitted a patch for bug #41236 that allowed the Mac to properly link octave-gui to Qt when made available as a non-system framework. Effectively, my patch required turning on the "---enable-link-all-deps" whenever this scenario is encountered.

Unfortunately, this had the consequence that mkoctfile would link MEX/OCT files to every Octave dependency. This makes distributing binary OCT/MEX files difficult. On octave-maintainers, JWE agreed this should be fixed, so I have sought a solution.

What I've done is create a new Automake variable AMCOND_LINK_GUI_DEPS that, nominally, obtains the same value as AMCOND_LINK_ALL_DEPS. However, whenever the above Qt scenario is encountered on a Mac, it is set to "true", even if AMCOND_LINK_ALL_DEPS is "false". The downstream Makefiles related to the GUI have been adjusted to include the GUI dependencies in the link list for octave-gui if this scenario is encountered.

This is a much gentler solution to the previous problem, then. I've successfully compiled on the Mac with this patch.

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 #30634:  qtmac2.diff added by mcgrant (3kB - application/octet-stream)
file #30530:  macgui.diff added by mcgrant (2kB - application/octet-stream)

 

Depends on the following items: None found

Digest:
   bug dependencies.

 

Carbon-Copy List
  • -unavailable- added by mtmiller (Updated the item)
  • -unavailable- added by jwe (Posted a comment)
  • -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 project members can vote.

     

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

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 28 Mar 2014 01:52:33 AM UTCmtmillerDependencies-=>bugs #41460 is dependent
    Thu 27 Mar 2014 05:14:51 AM UTCmtmillerStatusNone=>Patch Submitted
    Fri 21 Feb 2014 07:05:54 PM UTCmcgrantAttached File-=>Added qtmac2.diff, #30634
    Thu 13 Feb 2014 12:07:22 AM UTCmcgrantAttached File-=>Added macgui.diff, #30530

    Back to the top


    Powered by Savane 3.1-cleanup