bugGNU Octave - Bugs: bug #65526, (optim) ‘class...

 
 

bug #65526: (optim) ‘class octave::tree_parameter_list’ has no member named ‘length’

Submitter:  Dmitri A. Sergatskov <dasergatskov>
Submitted:  Thu 28 Mar 2024 06:22:21 PM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  None Assigned to:  None
Originator Name:  Open/Closed:  * Open
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 28 Mar 2024 06:41:01 PM UTC, comment #3: 

Adding the package maintainer to the CC list.

Markus Mützel <mmuetzel>
Group administrator
Thu 28 Mar 2024 06:35:04 PM UTC, comment #2: 

That patch may avoid the error, but I really think there has to be a better solution here.  Very little code outside of Octave core should need access to the parse tree.  What is the intent of this code?

John W. Eaton <jwe>
Group administrator
Thu 28 Mar 2024 06:26:21 PM UTC, comment #1: 

See also bug #65295

A.R. Burgers <arb>
Thu 28 Mar 2024 06:22:21 PM UTC, original submission:  

Due to some changes in Octave 10 (dev), optim package failed to compile with:

g++ -std=gnu++17 -c  -fPIC -I/usr/local/include/octave-10.0.0/octave/.. -I/usr/local/include/octave-10.0.0/octave -I/usr/local/include  -pthread -fopenmp -ggdb3 -O2 -march=native -mtune=native -mavx -mavx2 -flto=auto -Wall -Wno-deprecated-declarations    __disna_optim__.cc -o /tmp/oct-Xze0Ro.o
__max_nargin_optim__.cc: In function ‘octave_value_list F__max_nargin_optim__(const octave_value_list&, int)’:
__max_nargin_optim__.cc:74:55: error: ‘class octave::tree_parameter_list’ has no member named ‘length’
   74 |       (fcn.user_function_value ()->parameter_list ()->length ());
      |                                                       ^~~~~~
make[1]: *** [Makefile:78: __max_nargin_optim__.oct] Error 1


The patch from mxe-octave fixes that:
https://hg.octave.org/mxe-octave/file/tip/src/of-optim-2-list.patch


+

diff -r d5e565611871 -r 2254b71b9c11 src/__max_nargin_optim__.cc
--- a/src/__max_nargin_optim__.cc        Sun Jul 09 14:11:23 2023 +0200
+++ b/src/__max_nargin_optim__.cc        Wed Feb 07 20:30:33 2024 +0100
@@ -71,7 +71,7 @@
   else {

     retval = octave_value
-      (fcn.user_function_value ()->parameter_list ()->length ());
+      (fcn.user_function_value ()->parameter_list ()->size ());
   }

   return retval;


Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by mmuetzel (Posted a comment)
  • -email is unavailable- added by mmuetzel
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by arb (Posted a comment)
  • -email is unavailable- added by dasergatskov (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.

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2024-03-28 mmuetzel Carbon-Copy- Added i7tiol

    Back to the top

    Powered by Savane 3.14-79a4.
    Corresponding source code