bugGNU Octave - Bugs: bug #45813, geometry-2.0.0 fails to install on...

 
 

bug #45813: geometry-2.0.0 fails to install on windows

Submitted by:  None
Submitted on:  Mon 24 Aug 2015 02:54:02 PM UTC  
 
Category: Octave Forge PackageSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Installation Failure
Status: FixedAssigned to: None
Originator Name: Originator Email: -unavailable-
Open/Closed: ClosedRelease: 4.0.0
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)

Tue 06 Oct 2015 05:50:41 PM UTC, comment #21:

Sure enough, with the latest patches (make_absolute_filename, comment #10) geometry pkg installs fine on Win7 with Octave-3.9.0+ (where I checked that canonicalize_file_name had the old buggy behavior).

I think nothing is in the way of a new geometry pkg release, then?

Philip Nienhuis <philipnienhuis>
Project Member
Sun 27 Sep 2015 10:05:09 PM UTC, comment #20:

OK OK, I'll give it another try. Can't say when, probably early next week.

Philip Nienhuis <philipnienhuis>
Project Member
Sun 27 Sep 2015 08:58:59 PM UTC, comment #19:

Hi,

Ok in dev version now I am using make_absolute_filename and not filesep("all") anymore.

Also fixed some of the typos.

Could anybody check everything works fine in Windoze?

Juan Pablo Carbajal <juanpi>
Project Member
Sun 27 Sep 2015 04:41:57 PM UTC, comment #18:

@Mike:
Sure, simply replacing strsplit by ostrsplit fixes this:

But the canonicalize_file_name fix (bug #45816) also fixes the original bug here.
Replacing canoicalize_file_name by make_absolute_filename would also do as geometry-2.0.0.tar.gz is guaranteed to exist once PKG_ADD is invoked.

So all in all the geometry package maintainer has a lot of options :-)

I retreat from here, I think I (like you) have done my share.

Philip Nienhuis <philipnienhuis>
Project Member
Sat 26 Sep 2015 10:30:03 PM UTC, comment #17:

Okay, I checked and the way the delimiter argument is handled is a difference between the old strsplit (now "ostrsplit") and the Matlab compatible strsplit.

I still think that PKG_ADD could be fixed so that it can work with a mix of slashes and backslashes, using filesep("all").

should give a cell array of possible directory delimiters. This can be given to the strsplit calls.

Mike Miller <mtmiller>
Project Administrator
Sat 26 Sep 2015 11:26:27 AM UTC, comment #16:

OK, tested without Mike's canonicalize_file_name patch and with dev version of geometry.

PKG_ADD:

(never mind the spelling & style things)

and the results:

FYI, a little debug session after inserting "keyboard" statement at l.6 of PKG_ADD (right before the 'strsplit ...filesep("all")...' line:

My conclusions so far:
- invoking filesep ("all") doesn't make any difference, could maybe even work out adversely;
- it is the fix to canonicalize_file_name that makes the difference.

Philip Nienhuis <philipnienhuis>
Project Member
Mon 14 Sep 2015 06:19:40 PM UTC, comment #15:

I've already tested with the canonicalize_file_name patch from bug #45816 (i.e., w/o 'filesep("all")'. All error messages from PKG_ADD during installation were gone then, so 'filesep ("all")' doesn't seem to be required anymore; but might not hurt.

NOTE: before and after the patch, after installation of geometry pkg, when loading it I never saw error messages like the OP reported.
To repeat myself: for me this bug never seemed to affect functioning of the geometry package on Windows, see my comment #4.
IOW, I still wonder if the bug title ("fails to install") really matches the actual situation and the OP just got alarmed by the long list of autoload error messages during installation. Those messages are real (I saw them too) but they may be due to pkg.m issues relating to installation sensu stricto

I'll try the new PKG_ADD/PKG_DEL asap (merely to be sure that 'filesep ("all")' doesn't work adversely) but depending on other priorities it may be only next weekend that I have an opportunity.

Philip Nienhuis <philipnienhuis>
Project Member
Mon 14 Sep 2015 05:13:12 PM UTC, comment #14:

Set status to ready for test, maybe Philip or someone else can test installation from hg if you want to wait for feedback before tagging a new release.

Mike Miller <mtmiller>
Project Administrator
Mon 14 Sep 2015 05:02:04 PM UTC, comment #13:

Ok, it has been pushed to the development version. I guess this bug can be fixed. Although I cannot try it in Windows.

Juan Pablo Carbajal <juanpi>
Project Member
Mon 14 Sep 2015 02:40:16 PM UTC, comment #12:

Yes, the calls to filesep() with strsplit() in PKG_ADD and PKG_DEL should be replaced with filesep("all") to accomodate Windows environments where either file separator is valid, see "help filesep". This should allow this bug to be fixed regardless of whether canonicalize_file_name returns forward or backward slashes.

Mike Miller <mtmiller>
Project Administrator
Mon 14 Sep 2015 02:19:37 PM UTC, comment #11:

Any development on this?

Juan Pablo Carbajal <juanpi>
Project Member
Thu 03 Sep 2015 08:33:18 PM UTC, comment #10:

Another tidbit of information for this bug: the filesep function takes an option string "all" that returns all valid file separators for the operating system. This should probably be used, in the spirit of the robustness principle.

See the function file fileparts.m for an example using filesep("all") as the delimiter to parse a path string.

Mike Miller <mtmiller>
Project Administrator
Mon 31 Aug 2015 06:50:29 PM UTC, comment #9:

I made this bug depend on bug #45816.

Please please follow up comments there. Do not simultaneously discuss in two bug reports + a maintainers ML thread.

Fact remains that I can't reproduce this on Windows=7 64-bit with Octave-4.1.0+ (just tried again).

Philip Nienhuis <philipnienhuis>
Project Member
Mon 31 Aug 2015 02:01:14 PM UTC, comment #8:

Due to communication with gnulib devs, could you try if windows can use "\" and "/" interchangeably?

e.g. whether

is a correct PATH in your windows.

Juan Pablo Carbajal <juanpi>
Project Member
Mon 24 Aug 2015 07:10:27 PM UTC, comment #7:

(OP)
See bug #45816.

Anonymous
Mon 24 Aug 2015 06:10:36 PM UTC, comment #6:

(OP here)
So as canonicalize_file_name gets passed to and from gnulib, maybe they changed something? I can double check this or gather more information if you wish. I downloaded the official 4.0 windows installer today. The change to full gnulib handling was done several months ago, this can't be the culprit. Anyway, this should be in a new ticket which targets canonicalize_file_name. I will check again and open it.

Anonymous
Mon 24 Aug 2015 06:03:59 PM UTC, comment #5:

So, is it correct to open a new bug for canonicalize_* or to fix the script in geometry?

There is nothing in the help of canonicalize_* that indicates that it is a Linux only function.

Juan Pablo Carbajal <juanpi>
Project Member
Mon 24 Aug 2015 05:49:17 PM UTC, comment #4:

BTW I'm surprised this bug happens at all as I've installed geometry-2.0.0 tens of times on Windows systems w/o any issues - but then again, with the development version, not 4.0.0 (I make & install new dev Octave releases for Windows about twice a week.)

So I tend to assign status "Works for me".....

Philip Nienhuis <philipnienhuis>
Project Member
Mon 24 Aug 2015 05:45:46 PM UTC, comment #3:

I think it is rather canonicalize_file_name() that screws up file separators than filesep() itself: it stubbornly morphs native file seps ("\"on Windows) into forward slashes.

I rather use make_absolute_filename() in my scripts as that leaves Windows file seps intact.

Philip Nienhuis <philipnienhuis>
Project Member
Mon 24 Aug 2015 05:25:46 PM UTC, comment #2:

No. filesep() returns a backslash which is the correct separator on Windows. But all backslashes have been converted to slashes by canonicalize_file_name(). So the splitting fails, because there are no backslashes in the canonicalized filename. To me this seems like an error in the installation script. I don't know how other packages handle that, though.

Anonymous
Mon 24 Aug 2015 04:21:07 PM UTC, comment #1:

Thanks for the report.
If I understood correctly, it seems this is a bug in filesep() which should return the correct path separator in each system.

Juan Pablo Carbajal <juanpi>
Project Member
Mon 24 Aug 2015 02:54:02 PM UTC, original submission:

geometry-2.0.0 fails to install on windows because the package path is first canonicalized, then the PKG_ADD and PGK_DEL scripts try to split the dirname with windows file separator which fails and returns the full path.

lines causing the error:

dirname = fileparts (canonicalize_file_name (mfilename ("fullpath")));
pp = strsplit (dirname,filesep (), true);

pp then holds an invalid path consisting of a concatenation of the filepath with itself.

Circumvention: change filesep () in both files to '/'.

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Digest:
   bug dependencies.

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by juanpi (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 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 22 Dec 2015 04:12:01 PM UTCmtmillerStatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
    Mon 14 Sep 2015 05:13:12 PM UTCmtmillerStatusPostponed=>Ready For Test
    Mon 31 Aug 2015 06:50:29 PM UTCphilipnienhuisStatusNone=>Postponed
      Dependencies-=>Depends on bugs #45816

    Back to the top


    Powered by Savane 3.1-cleanup1