bugGNU Octave - Bugs: bug #48511, mxe-octave: mex library...

 
 

bug #48511: mxe-octave: mex library dependencies not picked up

Submitted by:  Joris Gillis <jgillis42>
Submitted on:  Thu 14 Jul 2016 12:48:26 PM UTC  
 
Category: Configuration and Build SystemSeverity: 1 - Wish
Priority: 5 - NormalItem Group: Feature Request
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: devOperating System: Microsoft Windows

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Wed 23 Nov 2016 01:10:06 AM UTC, comment #4:

No response. I'm going to assume jwe's patch fixed this back in July.

Rik <rik5>
Project Administrator
Tue 19 Jul 2016 04:19:02 PM UTC, comment #3:

I checked in the following changeset:

http://hg.savannah.gnu.org/hgweb/octave/rev/ef91e43f162a

Reading

https://msdn.microsoft.com/en-us/library/windows/desktop/ms686203%28v=vs.85%29.aspx

it seems that calling SetDllDirectory is all that should be required so that's all the new code in oct-shlib.cc does. But the previous code in ov-java.cc also called chdir to temporarily set the current working directory. Could someone test this and determine whether that is actually needed?

John W. Eaton <jwe>
Project Administrator
Thu 14 Jul 2016 08:41:55 PM UTC, comment #2:

There is already code in ov-java.cc that should do what we want:

http://hg.savannah.gnu.org/hgweb/octave/file/d534a3014fd7/libinterp/octave-value/ov-java.cc#l333

It should probably just be added to Octave's dynamic library loading class so that it always happens for Windows DLLs. I'll take a look at doing that.

John W. Eaton <jwe>
Project Administrator
Thu 14 Jul 2016 05:20:20 PM UTC, comment #1:

Thank you for reporting this feature request. I'm not sure I fully understand dynamic linking on Windows systems, so I can't contribute much to adding this capability. My understanding is that Windows loads dlls from the executable path by default. So if you run a problem in a directory, dlls are searched in that directory, correct? Are they also searched for in the complete PATH environment variable (similarly to the LD_LIBRARY_PATH variable on GNU systems)? Would using setenv("PATH",dir) in Octave be a workaround for this?

If not then please suggest what mechanism would be used on Windows to ensure that the directory containing the .mex file (and probably .oct files as well) gets added to a dynamic load search path.

Mike Miller <mtmiller>
Project Administrator
Thu 14 Jul 2016 12:48:26 PM UTC, original submission:

Consider a mex file linked with a dll file, both living in some directory.

After simply addpath-ing the directory, calling the mex file works in Matlab yet fails in Octave.
For Matlab, the loader searches for dlls in the same directory as where the mex file resides.
It would make sense if Octave copied this behaviour.

I'm aware that EXEC_PATH allows Octave to run the mex file, but it just feels cleaner if a binary package can be made available in an Octave session with just one atomic action, an addpath command.

For linux, this is not an issue, since you have the RPATH property for shared libraries there.

Joris Gillis <jgillis42>

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by jwe (Posted a comment)
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by jgillis42 (Submitted the item)
  • -unavailable- added by jgillis42
  •  

    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 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 23 Nov 2016 01:10:06 AM UTCrik5StatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
    Tue 19 Jul 2016 04:19:02 PM UTCjweStatusNeed Info=>Ready For Test
    Thu 14 Jul 2016 05:20:20 PM UTCmtmillerSeverity3 - Normal=>1 - Wish
      Item GroupMatlab Compatibility=>Feature Request
      StatusNone=>Need Info
      Release4.0.2=>dev
    Thu 14 Jul 2016 12:48:26 PM UTCjgillis42Carbon-Copy-=>Added jgillis42

    Back to the top


    Powered by Savane 3.1-cleanup1