bugGNU Octave - Bugs: bug #48671, Windows mkoctfile does not...

 
 

bug #48671: Windows mkoctfile does not substitute Octave installation path correctly

Submitted by:  None
Submitted on:  Mon 01 Aug 2016 08:49:16 AM UTC  
 
Category: Configuration and Build SystemSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: Ready For TestAssigned to: None
Originator Name: michaelquellmalzOriginator Email: -unavailable-
Open/Closed: ClosedRelease: 4.0.3
Operating System: Microsoft Windows

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 Jump to the original submission)

Thu 05 Jan 2017 06:28:17 PM UTC, comment #9:

I applied this change to stable and merged with default.

John W. Eaton <jwe>
Project Administrator
Thu 05 Jan 2017 02:57:54 PM UTC, comment #8:

Found the issue in w32_get_octave_home in shared-fcns.h:

For Windows, if the OCTAVE_HOME env string is not set, It is getting a list of running modules and looking to see which one has octave in its name and using its module path.

For mkoctfile of course, the name isn't 'octave'.

How about using the running modules full path/name using GetModuleFileName [1] and extracting the path ?

Patch attached.

[1] https://msdn.microsoft.com/en-us/library/windows/desktop/ms683197(v=vs.85).aspx

(file #39369)

John Donoghue <lostbard>
Project Member
Tue 02 Aug 2016 03:44:16 PM UTC, comment #7:

@mtmiller: I use the shell of MSYS2 (which is based on mintty) and started it from the link created by the msys2 installation.
Setting the environment variable OCTAVE_HOME changes the result of mkoctfile, but after unsetting it returns the wrong path again.

Anonymous
Tue 02 Aug 2016 03:42:28 PM UTC, comment #6:

@jwe: yes - OCTAVE_HOME gets sets via the cmdshell.bat when using the installer bashshell shortcut.

modifying the script to not set OCTAVE_HOME, I can then see similar displays as the original comment.

John Donoghue <lostbard>
Project Member
Tue 02 Aug 2016 03:02:30 PM UTC, comment #5:

anonymous: it looks like you are running mkoctfile and octave-config from a bash shell, what kind of shell is this and how did you start it? Set and unset OCTAVE_HOME like any other environment variable. Is it already in your environment? Does setting it or unsetting it change anything?

Mike Miller <mtmiller>
Project Administrator
Tue 02 Aug 2016 02:05:47 PM UTC, comment #4:

John: Is OCTAVE_HOME set in the bash environment?

If not, then the programs appear to be working correctly on your system. On Windows systems, they are supposed to determine the value of OCTAVE_HOME from the location where they are installed.

John W. Eaton <jwe>
Project Administrator
Tue 02 Aug 2016 01:55:53 PM UTC, comment #3:

On my win10 box with official 4.0.3 installer installed, using the bash shell:

John Donoghue <lostbard>
Project Member
Tue 02 Aug 2016 08:33:07 AM UTC, comment #2:

Thank you for your response. After deleting liboctave.la and liboctinterp.la the external project NFFT compiles.

Where should I set OCTAVE_HOME? Calling it in Octave itself, it returns the right directory
And also OCTAVE_HOME is different for octave-config and mkoctfile

Anonymous
Mon 01 Aug 2016 05:37:18 PM UTC, comment #1:

Thank you for your bug report. The existence of strings referring to these invalid paths is not in itself a bug. Octave is cross-compiled, and as far as I can tell it will continue to have these references embedded in it as long as it is built this way. However, as long as the OCTAVE_HOME environment variable is set correctly, most things should work.

Does deleting the .la files allow the build of your external project to work? Maybe they should be deleted from the installer.

The difference between octave-config and mkoctfile is curious, they should both be substituting the path to where Octave is installed, if I'm reading the code correctly. Does setting OCTAVE_HOME fix mkoctfile? Is OCTAVE_HOME set when you call one but not the other?

Mike Miller <mtmiller>
Project Administrator
Mon 01 Aug 2016 08:49:16 AM UTC, original submission:

The official Windows builds for Octave 4.0.2 and 4.0.3 contain some references to invalid paths that only exist in Linux. For example the call of mkoctfile
returns an invalid path.

However, octave-config gives the correct path

Furthermore, the .la files in lib/octave/4.0.3 contain invalid references. For example liboctave.la contains the lines
which makes the compilation of some third-party tools crash like we found out for NFFT.

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #39369:  bug48671.patch added by lostbard (2KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by siko1056 (Updated the item)
  • -unavailable- added by jwe (Posted a comment)
  • -unavailable- added by lostbard (Posted a comment)
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by None (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 9 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 24 Feb 2017 10:03:00 PM UTCsiko1056Open/ClosedOpen=>Closed
    Wed 18 Jan 2017 10:53:04 PM UTCjweStatusPatch Submitted=>Ready For Test
    Thu 05 Jan 2017 05:35:23 PM UTClostbardStatusConfirmed=>Patch Submitted
    Thu 05 Jan 2017 02:57:54 PM UTClostbardAttached File-=>Added bug48671.patch, #39369
    Tue 02 Aug 2016 03:57:21 PM UTCmtmillerStatusNeed Info=>Confirmed
      SummaryWindows builds contain references to invalid paths=>Windows mkoctfile does not substitute Octave installation path correctly
    Mon 01 Aug 2016 05:37:18 PM UTCmtmillerCategoryNone=>Configuration and Build System
      Item GroupNone=>Incorrect Result
      StatusNone=>Need Info

    Back to the top


    Powered by Savane 3.1-cleanup1