octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #59335] [octave forge] (nan) `load_fisheriris`


From: Markus Mützel
Subject: [Octave-bug-tracker] [bug #59335] [octave forge] (nan) `load_fisheriris` fails on Windows
Date: Sat, 24 Oct 2020 13:53:38 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36 Edg/86.0.622.51

URL:
  <https://savannah.gnu.org/bugs/?59335>

                 Summary: [octave forge] (nan) `load_fisheriris` fails on
Windows
                 Project: GNU Octave
            Submitted by: mmuetzel
            Submitted on: Sat 24 Oct 2020 07:53:37 PM CEST
                Category: Octave Forge Package
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: None
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
                 Release: other
         Discussion Lock: Any
        Operating System: Microsoft Windows

    _______________________________________________________

Details:

While running the BISTs of nan 3.5.0 on Windows, the test for
`load_fisheriris` fails with:

  ...92\mingw64\share\octave\packages\nan-3.5.0\load_fisheriris.m --2020-10-24
19:19:50-- 
http://archive.ics.uci.edu/ml/machine-learning-databases/iris/iris.data
Resolving archive.ics.uci.edu (archive.ics.uci.edu)... 128.195.10.252
Connecting to archive.ics.uci.edu (archive.ics.uci.edu)|128.195.10.252|:80...
connected.
HTTP request sent, awaiting response... 200 OK
Length: 4551 (4.4K) [application/x-httpd-php]
iris.data: Permission denied

Cannot write to 'iris.data' (Permission denied).
 pass    0/1


There might be a few issues in that file.

IIUC, the check at the beginning should detect whether Octave is running on
Windows. Is that what is intended?
It currently is:

                if strncmp(computer,'PCWIN',5)


It might better be:

    if ispc ()


FWIW, `computer` returns "x86_64-w64-mingw32" for me.

But actually, it might be a good thing that the check fails because "wget" is
part of msys2 that is installed with Octave on Windows.

Maybe the call to `system("wget ...")` could be replaced by `webread` (if
available) which should also be working cross-platform to download the file.

The actual error is probably because the current directory during the test is
the directory of the .m file. The user might not have write permission for
that directory (without elevated or superuser privileges). It might be a good
idea to store that file in a temporary directory (maybe at what would be
returned by `tempdir ()`).

I've marked the OS as Microsoft Windows. But I believe the error would also
happen on Linux if the package is installed in /usr and Octave runs without
superuser privileges.

The `elseif exist('OCTAVE_VERSION', 'builtin')` in line 44 is inside and `if
exist('OCTAVE_VERSION','builtin')` block (starting in line 29). IIUC, the
`else` block starting in line 52 can never be reached.

CC'ing Alois Schlögl as the package maintainer.




    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?59335>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]