bugGNU Octave - Bugs: bug #57348, [octave forge] (statistics)...

 
 

bug #57348: [octave forge] (statistics) package fails installation because of a parse error in linkage.m

Submitter:  None
Submitted:  Tue 03 Dec 2019 01:07:41 PM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Installation Failure
Status:  Fixed Assigned to:  None
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * dev
Operating System:  * Any Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Wed 25 Dec 2019 04:06:28 PM UTC, comment #11: 

Closing report as fixed as the statistics repo is fixed - and will appear in the next release of statistics

John Donoghue <lostbard>
Group Member
Tue 03 Dec 2019 09:24:10 PM UTC, comment #10: 
John Donoghue <lostbard>
Group Member
Tue 03 Dec 2019 09:16:22 PM UTC, comment #9: 

Patch to to statistics for fix from comment #3, and checking for the function names rather than catching the error from comment #6



(file #47984)

John Donoghue <lostbard>
Group Member
Tue 03 Dec 2019 09:04:42 PM UTC, comment #8: 

John-- I think what you found is a different problem, since I get it also with my earlier version of dev Octave, which doesn't have the linkage.m compile error:

> test kolmogorov_smirnov_test

*** assert (kolmogorov_smirnov_test (0:100, "logistic"), 0)
!!!!! test failed
logisticcdf: invalid function handle


Can you open another bug report for it?

Nir Krakauer <nir_krakauer>
Tue 03 Dec 2019 09:00:12 PM UTC, comment #7: 

I uploaded the linkage.m fix to the repo.

Nir Krakauer <nir_krakauer>
Tue 03 Dec 2019 08:47:00 PM UTC, comment #6: 

Likely related, I get some failures in tests of the statistcs package when testing kolmogorov_smirnov_test.

The issue is that str2func used to error if attempting to assign to an invalid function name, but now doesnt

ie:

str2func('invalid_func_name')

Doesnt error

the kolmogorov_smirnov_test was relying on catching the error to and decide which function name to use.

John Donoghue <lostbard>
Group Member
Tue 03 Dec 2019 05:23:35 PM UTC, comment #5: 

I see the same error occuring in fedora using a dev octave I built today.

Changing per comment #3 allows it to install ok.


John Donoghue <lostbard>
Group Member
Tue 03 Dec 2019 03:42:04 PM UTC, comment #4: 

I can confirm that exchanging Line 110 in linkage.m by the suggestion in Comment #3 leads to a correct installation of the statistics package. Though downloading the archive, unzipping, editing linkage.m, zipping the archive and then installing the package manually might be the only workaround until a new version of statistics or the dev is released. Thank you for the quick confirmation!

Anonymous
Tue 03 Dec 2019 03:04:11 PM UTC, comment #3: 

This change in behavior might be caused by this change for bug #57255:
https://hg.savannah.gnu.org/hgweb/octave/rev/5e92bff668d6

A fix in the statistics package would probably be to replace the failing line by:

                (@(x,i,j,w) sum(diag(w([i,j]))*x)/sum(w([i,j])))  # average


Markus Mützel <mmuetzel>
Group administrator
Tue 03 Dec 2019 01:51:41 PM UTC, comment #2: 

Thank you for testing, that's kind of unexpected. Apart from our OS version, I don't see any difference. Do you have any idea what else could cause that parse error, since it doesn't seem to be the actual line in linkage.m?
I also got those two warnings when I tested linkage, sorry I didn't include this in the original submission.

Anonymous
Tue 03 Dec 2019 01:40:53 PM UTC, comment #1: 

Thanks for reporting. I can install statistics with no error in a recent dev version. My details are

> ver

GNU Octave Version: 6.0.0 (hg id: 7b68c080723d)
GNU Octave License: GNU General Public License
Operating System: Linux 5.3.0-23-generic #25-Ubuntu SMP Tue Nov 12 09:22:33 UTC 2019 x86_64
Package Name  | Version | Installation directory
--------------+---------+-----------------------
          io *|  2.4.13 | ~/octave/io-2.4.13
  statistics *|   1.4.1 | ~/octave/statistics-1.4.1

I do get a warning message, not sure if there's any connection:

> test linkage

warning: clustering
warning: called from
    linkage at line 169 column 5
    _test_ at line 3 column 3
    test at line 660 column 11

warning: clustering
warning: called from
    linkage at line 169 column 5
    _test_ at line 3 column 3
    test at line 660 column 11

PASSES 12 out of 12 tests


Nir Krakauer <nir_krakauer>
Tue 03 Dec 2019 01:07:41 PM UTC, original submission:  

I'm working with the current dev version as of last week, and uninstalled my statistics package (for a different error). Then I wanted to reinstall it but all I get is a parse error in linkage.m:


>> pkg install -forge statistics
warning: doc_cache_create: unusable help text found in file 'gmdistribution'
warning: called from
    doc_cache_create>handle_function at line 91 column 5
    doc_cache_create>create_cache at line 111 column 36
    gen_doc_cache_in_dir>@<anonymous> at line 143 column 16
    doc_cache_create>gen_doc_cache_in_dir at line 144 column 9
    doc_cache_create at line 55 column 12
    install>generate_lookfor_cache at line 809 column 5
    install at line 228 column 7
    pkg at line 475 column 9

error: parse error near line 110 of file /home/IT/jzimmer/octave/statistics-1.4.1/linkage.m

  invalid use of operator = in anonymous function

>>>                 (@(x,i,j,w) sum(diag(q=w([i,j]))*x)/sum(q))  # average
                                          ^
error: called from
    doc_cache_create>create_cache at line 109 column 20
    gen_doc_cache_in_dir>@<anonymous> at line 143 column 16
    doc_cache_create>gen_doc_cache_in_dir at line 144 column 9
    doc_cache_create at line 55 column 12
    install>generate_lookfor_cache at line 809 column 5
    install at line 228 column 7
    pkg at line 475 column 9


Some additional info on this

  • this line in linkage.m also exists in a couple of previous versions of statistics
  • I also can't install any of the previous statistics versions
  • I do have an octaverc-file to load at startup but the statistics package is not in that file
  • I also tried this on a Linux machine with the current dev version, only the io package installed and no octaverc-file - leads to the same error
  • I have access to Octave 5.1 running on a Windows 10 machine - I can install the package on there with no error message (checked with statistics-1.4.0 and statistics-1.4.1)
  • with Octave 5.1, 'test linkage' leads to 12 out of 12 passed tests, so the parser can clearly interpret that line after all


The versions on the machines are the following:

ver
----------------------------------------------------------------------
GNU Octave Version: 6.0.0 (hg id: 7ae72862b542)
GNU Octave License: GNU General Public License
Operating System: Linux 5.0.0-36-generic #39~18.04.1-Ubuntu SMP Tue Nov 12 11:09:50 UTC2019 x86_64
----------------------------------------------------------------------
Package Name  | Version | Installation directory
--------------+---------+-----------------------
     control *|   3.2.0 | /home/IT/jzimmer/octave/control-3.2.0
       image *|  2.10.0 | /home/IT/jzimmer/octave/image-2.10.0
          io *|  2.4.13 | /home/IT/jzimmer/octave/io-2.4.13
       optim *|   1.5.2 | /home/IT/jzimmer/octave/optim-1.5.2
      signal *|   1.4.1 | /home/IT/jzimmer/octave/signal-1.4.1
      struct *|  1.0.16 | /home/IT/jzimmer/octave/struct-1.0.16



ver
----------------------------------------------------------------------
GNU Octave Version: 5.1.0 (hg id: d05d6eebde10)
GNU Octave License: GNU General Public License
Operating System: MINGW32_NT-6.2 Windows 6.2  x86_64
----------------------------------------------------------------------
Package Name         | Version | Installation directory
---------------------+---------+-----------------------
     communications  |   1.2.1 | C:\Octave\OCTAVE~1.0\mingw64\share\octave\packages\communications-1.2.1
            control *|   3.1.0 | C:\Octave\OCTAVE~1.0\mingw64\share\octave\packages\control-3.1.0
     data-smoothing  |   1.3.0 | C:\Octave\OCTAVE~1.0\mingw64\share\octave\packages\data-smoothing-1.3.0
           database  |   2.4.3 | C:\Octave\OCTAVE~1.0\mingw64\share\octave\packages\database-2.4.3
          dataframe  |   1.2.0 | C:\Octave\OCTAVE~1.0\mingw64\share\octave\packages\dataframe-1.2.0
              dicom  |   0.2.1 | C:\Octave\OCTAVE~1.0\mingw64\share\octave\packages\dicom-0.2.1
          financial  |   0.5.3 | C:\Octave\OCTAVE~1.0\mingw64\share\octave\packages\financial-0.5.3
               fits  |   1.0.7 | C:\Octave\OCTAVE~1.0\mingw64\share\octave\packages\fits-1.0.7
fuzzy-logic-toolkit  |   0.4.5 | C:\Octave\OCTAVE~1.0\mingw64\share\octave\packages\fuzzy-logic-toolkit-0.4.5
                 ga  |  0.10.0 | C:\Octave\OCTAVE~1.0\mingw64\share\octave\packages\ga-0.10.0
            general  |   2.1.0 | C:\Octave\OCTAVE~1.0\mingw64\share\octave\packages\general-2.1.0
      generate_html  |   0.3.1 | C:\Octave\OCTAVE~1.0\mingw64\share\octave\packages\generate_html-0.3.1
           geometry  |   3.0.0 | C:\Octave\OCTAVE~1.0\mingw64\share\octave\packages\geometry-3.0.0
                gsl  |   2.1.1 | C:\Octave\OCTAVE~1.0\mingw64\share\octave\packages\gsl-2.1.1
              image *|  2.10.0 | C:\Octave\OCTAVE~1.0\mingw64\share\octave\packages\image-2.10.0
 instrument-control  |   0.3.1 | C:\Octave\OCTAVE~1.0\mingw64\share\octave\packages\instrument-control-0.3.1
           interval  |   3.2.0 | C:\Octave\OCTAVE~1.0\mingw64\share\octave\packages\interval-3.2.0
                 io *|  2.4.12 | C:\Octave\OCTAVE~1.0\mingw64\share\octave\packages\io-2.4.12
     linear-algebra  |   2.2.2 | C:\Octave\OCTAVE~1.0\mingw64\share\octave\packages\linear-algebra-2.2.2
               lssa  |   0.1.3 | C:\Octave\OCTAVE~1.0\mingw64\share\octave\packages\lssa-0.1.3
              ltfat  |   2.3.1 | C:\Octave\OCTAVE~1.0\mingw64\share\octave\packages\ltfat-2.3.1
            mapping  |   1.2.1 | C:\Octave\OCTAVE~1.0\mingw64\share\octave\packages\mapping-1.2.1
      miscellaneous  |   1.2.1 | C:\Octave\OCTAVE~1.0\mingw64\share\octave\packages\miscellaneous-1.2.1
                nan  |   3.1.4 | C:\Octave\OCTAVE~1.0\mingw64\share\octave\packages\nan-3.1.4
             netcdf  |  1.0.12 | C:\Octave\OCTAVE~1.0\mingw64\share\octave\packages\netcdf-1.0.12
              nurbs  |  1.3.13 | C:\Octave\OCTAVE~1.0\mingw64\share\octave\packages\nurbs-1.3.13
                ocs  |   0.1.5 | C:\Octave\OCTAVE~1.0\mingw64\share\octave\packages\ocs-0.1.5
             odepkg  |   0.9.1 | C:\Octave\OCTAVE~1.0\mingw64\share\octave\packages\odepkg-0.9.1
              optim *|   1.5.3 | C:\Octave\OCTAVE~1.0\mingw64\share\octave\packages\optim-1.5.3
        optiminterp  |   0.3.5 | C:\Octave\OCTAVE~1.0\mingw64\share\octave\packages\optiminterp-0.3.5
         quaternion  |   2.4.0 | C:\Octave\OCTAVE~1.0\mingw64\share\octave\packages\quaternion-2.4.0
           queueing  |   1.2.6 | C:\Octave\OCTAVE~1.0\mingw64\share\octave\packages\queueing-1.2.6
             signal *|   1.4.0 | C:\Octave\OCTAVE~1.0\mingw64\share\octave\packages\signal-1.4.0
            sockets  |   1.2.0 | C:\Octave\OCTAVE~1.0\mingw64\share\octave\packages\sockets-1.2.0
          sparsersb  |   1.0.6 | C:\Octave\OCTAVE~1.0\mingw64\share\octave\packages\sparsersb-1.0.6
            specfun  |   1.1.0 | C:\Octave\OCTAVE~1.0\mingw64\share\octave\packages\specfun-1.1.0
            splines  |   1.3.2 | C:\Octave\OCTAVE~1.0\mingw64\share\octave\packages\splines-1.3.2
         statistics *|   1.4.1 | C:\Octave\OCTAVE~1.0\mingw64\share\octave\packages\statistics-1.4.1
                stk  |   2.5.1 | C:\Octave\OCTAVE~1.0\mingw64\share\octave\packages\stk-2.5.1
            strings  |   1.2.0 | C:\Octave\OCTAVE~1.0\mingw64\share\octave\packages\strings-1.2.0
             struct *|  1.0.15 | C:\Octave\OCTAVE~1.0\mingw64\share\octave\packages\struct-1.0.15
             tisean  |   0.2.3 | C:\Octave\OCTAVE~1.0\mingw64\share\octave\packages\tisean-0.2.3
                tsa  |   4.4.5 | C:\Octave\OCTAVE~1.0\mingw64\share\octave\packages\tsa-4.4.5
              video  |   1.2.4 | C:\Octave\OCTAVE~1.0\mingw64\share\octave\packages\video-1.2.4
            windows  |   1.3.0 | C:\Octave\OCTAVE~1.0\mingw64\share\octave\packages\windows-1.3.0
             zeromq  |   1.3.0 | C:\Octave\OCTAVE~1.0\mingw64\share\octave\packages\zeromq-1.3.0


... and with the dev version of back in late September / October it used to work.

Anonymous

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #47984:  bug57348.patch added by lostbard (3KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by lostbard (Posted a comment)
  • -email is unavailable- added by lostbard
  • -email is unavailable- added by mmuetzel (Posted a comment)
  • -email is unavailable- added by nir_krakauer (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-12-25 lostbard StatusNone Fixed
        Open/ClosedOpen Closed
    2019-12-03 lostbard Attached File- Added bug57348.patch, #47984
    2019-12-03 lostbard Carbon-Copy- Added lostbard
    2019-12-03 mmuetzel Operating SystemGNU/Linux Any
        Summarystatistics package fails installation because of a parse error in linkage.m [octave forge] (statistics) package fails installation because of a parse error in linkage.m

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code