octave-maintainers
[Top][All Lists]
Advanced

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

Re: changes to "range"


From: Markus Mützel
Subject: Re: changes to "range"
Date: Sat, 19 Nov 2022 10:21:39 +0100

See, e.g., this patch in MXE Octave for possible fixes:
https://hg.octave.org/mxe-octave/file/tip/src/of-control-2-octave-9-compat.patch

But note that some of those changes will break compatibility with Octave 
versions before 7. MXE Octave only cares about compatibility with the latest 
released version and newer.

Markus


Am 19. November 2022 um 04:51 Uhr schrieb "John W. Eaton":
> The Range class was deprecated in Octave 7 and was recently removed from 
> the development sources that will become Octave 9.
> 
> I guess this wasn't noticed in some (many?) packages because at some 
> point, package maintainers started adding -Wno-deprecated-declarations 
> to the compiler flags in package Makefiles.
> 
> For Range, the replacement is octave::range<double>.  For this class, we 
> decided to not make Range a typedef for range<double> because the 
> classes do not have identical behavior.
> 
> Now that the functions have been removed, you'll just get "not declared" 
> errors with no clues about how to fix things.  But if you go back to 
> Octave 7 or 8 and remove teh -Wno-deprecated-declarations flag from 
> PKG_CXXFLAGS in the package Makefile, you should get more helpful 
> messages pointing to replacements for deprecated functions.  In many 
> cases, the changes are probably just that functions have been moved into 
> the octave namespace.
> 
> See also 
> https://octave.discourse.group/t/packages-failing-to-build-after-removing-deprecated-functions/3588
> 
> jwe
> 
> On 11/18/22 20:58, Doug Stewart wrote:
> > 
> > With the recent changes to "range"  I now cannot install the control pkg.
> > this is the error message i get.
> > 
> > pkg install -forge  control signal
> > In file included from __control_helper_functions__.cc:7:
> > lti_input_idx.cc: In function ‘octave_value_list 
> > F__lti_input_idx__(const octave_value_list&, int)’:
> > lti_input_idx.cc:96:5: error: ‘Range’ was not declared in this scope
> >     96 |     Range mat_idx (1, idx-offset);
> >        |     ^~~~~
> > lti_input_idx.cc:97:10: error: expected ‘;’ before ‘opt_idx’
> >     97 |     Range opt_idx (idx+1-offset, len);
> >        |          ^~~~~~~~
> >        |          ;
> > lti_input_idx.cc:100:17: error: ‘opt_idx’ was not declared in this scope
> >    100 |     retval(1) = opt_idx;
> >        |                 ^~~~~~~
> > lti_input_idx.cc:101:17: error: ‘mat_idx’ was not declared in this scope
> >    101 |     retval(0) = mat_idx;
> > 
> > -- 
> > DASCertificate for 206392
> > 
> > <https://linuxcounter.net/user/206392.html>
> > 
> > 
> > ----------
> > We are transitioning to a web based forum
> > for maintainer discussions at
> > https://octave.discourse.group/c/maintainers
> 
> 
> 
> ----------
> We are transitioning to a web based forum
> for maintainer discussions at
> https://octave.discourse.group/c/maintainers
>



reply via email to

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