bugGNU Octave - Bugs: bug #53627, build: oct files should not need...


bug #53627: build: oct files should not need to link with -loctinterp -loctave

Submitted by:  Mike Miller <mtmiller>
Submitted on:  Thu 12 Apr 2018 06:52:15 PM UTC  
Category:  Configuration and Build System Severity:  2 - Minor
Priority:  5 - Normal Item Group:  Feature Request
Status:  Ready For Test Assigned to:  None
Originator Name:  Open/Closed:  Open
Release:  dev Operating System:  GNU/Linux

Add a New Comment(Rich Markup)

You are not logged in

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


( Jump to the original submission)

Sat 14 Jul 2018 06:24:30 AM UTC, comment #10:

I'm getting a different, apparently unrelated build failure on macOS now, so I can't confirm the fix.

Will look in to this when I have time.

Andrew Janke <apjanke>
Wed 11 Jul 2018 11:51:23 PM UTC, comment #9:

Is this still a problem for MacOS builds? Or can we close this report?

Rik <rik5>
Project Administrator
Sun 01 Jul 2018 08:13:20 AM UTC, comment #8:

I think this may have broken the build on Mac, too.

I am building Octave on macOS 10.13.5. I can build the 4.4.0 release okay, but building from the tip of the Hg repo is broken with the following build error.

I'm configuring using the following:

Switching to shared libs doesn't fix it; and doing --enable-link-all-dependencies breaks the build with a different error.

Maybe this needs to be conditionalized for macOS as well as Windows?

Andrew Janke <apjanke>
Thu 14 Jun 2018 08:33:40 PM UTC, comment #7:

I pushed this changeset:


John W. Eaton <jwe>
Project Administrator
Wed 13 Jun 2018 08:31:49 PM UTC, comment #6:

Same issue is seen when cross compiling any of the octave forge packages .oct files using mkoctfile in windows, so I guess it does need be conditional for windows.

John Donoghue <lostbard>
Project Member
Wed 13 Jun 2018 08:14:45 PM UTC, comment #5:

Yes, I assume so. If there is no better solution, then I can make the change conditional so it works as before on Windows systems.

John W. Eaton <jwe>
Project Administrator
Wed 13 Jun 2018 11:43:10 AM UTC, comment #4:

Im assing this is directlt related to this change.

In mxe with latest dev (1c4ffd4f9404: create valid tmp scope for who -file )

John Donoghue <lostbard>
Project Member
Mon 11 Jun 2018 07:14:48 PM UTC, comment #3:

I pushed the following changeset:


If this causes trouble on Mac or Windows systems, then we can undo whatever is needed and make it conditional. It would also be unfortunate, since it will make building and testing MEX files in the build directory a little more complicated.

John W. Eaton <jwe>
Project Administrator
Mon 11 Jun 2018 06:10:19 PM UTC, comment #2:

If we remove "-loctinterp -loctave" from the link command, then I think we can also eliminate the DEFAULT_LFLAGS variable. We can still accept LFLAGS from the environment, but there is no need for a default.

Since I'm looking at a way to build MEX files for testing and it would be most convenient if we didn't have to worry about linking with liboctave and liboctinterp, I can look at making these changes now.

John W. Eaton <jwe>
Project Administrator
Wed 23 May 2018 09:20:58 PM UTC, comment #1:

What is the minimum unit of change here?

It seems like we could start with modifying the mkoctfile command to remave '-loctinterp -loctave'. Is that expected to be safe on all platforms, or just Linux?

The next step would be to remove LIBADD from the .oct files, and then test on Linux, macOS, and Windows.

Final step would be to eliminate DLD_LIBOCTINTERP_LIBADD as well.

Does that sound right?

Rik <rik5>
Project Administrator
Thu 12 Apr 2018 06:52:15 PM UTC, original submission:

This applies equally to the .oct files that are built as part of Octave, as well as the mkoctfile rules for building external .oct files.

On GNU/Linux, a shared object that is a plugin or loadable module doesn't need to link with the base libraries of the program that is loading it. Since Octave is doing the loading, all .oct files will have access to the functions in Octave's executable image.

I propose that we drop DLD_LIBOCTINTERP_LIBADD and remove both liboctinterp.la and liboctave.la from the LIBADD of each of the .oct files built in libinterp/dldfcn. I also propose that "-loctinterp -loctave" be removed from the mkoctfile build command.

But this will definitely need some testing on macOS and Windows to see whether this is safe or needs to be made conditional.

Mike Miller <mtmiller>
Project Administrator


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

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by apjanke (Posted a comment)
  • -email is unavailable- added by lostbard (Posted a comment)
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by mtmiller (Submitted the item)

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

    Only project members can vote.




    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-06-14 jwe StatusPostponed => Ready For Test

    Back to the top

    Powered by Savane 3.3