bugGNU Octave - Bugs: bug #55266, deprecation warning about...

 
 

bug #55266: deprecation warning about octave::eval_string just for including parse.h

Submitter:  Hartmut <hardy>
Submitted:  Sat 22 Dec 2018 07:25:57 PM UTC
   
 
Category:  Libraries Severity:  4 - Important
Priority:  5 - Normal Item Group:  Other
Status:  Fixed Assigned to:  mtmiller
Originator Name:  Open/Closed:  * Closed
Release:  * 5.0.0 Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Fri 04 Jan 2019 08:39:13 AM UTC, comment #10: 
Mike Miller <mtmiller>
Group Member
Mon 31 Dec 2018 06:38:13 PM UTC, comment #9: 

I have this change staged to push, just won't have time in the next day or two due to the holiday, will definitely do some more testing and push by the end of this week.

Mike Miller <mtmiller>
Group Member
Sun 30 Dec 2018 09:49:16 PM UTC, comment #8: 

The effect of this basically is to turn the 4.4 deprecation wrappers back into full functions compiled into the liboctinterp library in the Octave 5 release. Makes the library slightly bigger and adds symbols that users shouldn't be using anyway.

And whoever merges this into default (I'll try to do that at the same time) will have to make sure these changes are deleted as part of the merge, since the inline functions have already been deleted on the default branch.

Mike Miller <mtmiller>
Group Member
Sun 30 Dec 2018 09:44:11 PM UTC, comment #7: 

I'm doing some testing of this and bug #55277 right now, will push a change for each soon.

Mike Miller <mtmiller>
Group Member
Sun 30 Dec 2018 09:39:28 PM UTC, comment #6: 

@Mike: Your patch looks fine to me.  Maybe you want to run it by jwe, or maybe this is so minor it doesn't matter.

Rik <rik5>
Group administrator
Fri 28 Dec 2018 11:03:04 PM UTC, comment #5: 

The cleanest way I can see to solve this is to make the inline eval_string deprecation wrappers from Octave 4.4 into compiled functions again, as in the attached diff. With this change on the stable branch, Octave compiles cleanly without warnings and parse.h can be included in user code without any deprecation warnings.

I'll push this after a little more testing here, please object if needed.

AFAICT this is the only deprecation wrapper that called something which was subsequently deprecated in Octave 5. I went through all individual header files and reported a separate bug on type errors (bug #55277), but I haven't seen any other inadvertent deprecation warnings in the public API.

(file #45765)

Mike Miller <mtmiller>
Group Member
Mon 24 Dec 2018 12:54:12 PM UTC, comment #4: 

Mike Miller wrote in comment #3:

> It does look like there is a problem with eval_string in the Octave 5 header files themselves. Is this the only function that gets a warning for this bug report? If so we can turn this into a bug report about Octave's parse.h.


There was another issue on the original bug report (use of long int (octave_idx_type) on printf in a %i), but it was a separate issue an it has already been fixed.  I have adjusted the title and category.

Carnë Draug <carandraug>
Group Member
Mon 24 Dec 2018 05:22:26 AM UTC, comment #3: 

It does look like there is a problem with eval_string in the Octave 5 header files themselves. Is this the only function that gets a warning for this bug report? If so we can turn this into a bug report about Octave's parse.h.

Mike Miller <mtmiller>
Group Member
Mon 24 Dec 2018 04:09:02 AM UTC, comment #2: 

What I don't get about the warning is that we get those deprecation warnings but we're not actually using those deprecated functions.  We include parse.h to get octave::feval but we get warnings about octave::eval_string being deprecated.

Carnë Draug <carandraug>
Group Member
Sat 22 Dec 2018 08:00:30 PM UTC, comment #1: 

My solution for the signal package:

https://hg.mtmxr.com/octave-signal/rev/7018fb4dbd78

If I want to build the package as maintainer and see the warnings, I can use 'make CXXFLAGS_PKG_APPEND=-Wdeprecated-declarations' to temporarily enable the warnings.

Mike Miller <mtmiller>
Group Member
Sat 22 Dec 2018 07:25:57 PM UTC, original submission:  

I see a couple of compiler warnings, when building the upcomeing image-2.10.0 with the upcomeing Octave 5.0.1.

Here is my setup:

  • using Ubuntu 18.04
  • using a self-compiled Octave 5.0.1 (hg-id 9644c0b7efd8)
  • using the stable branch from the current image repo (hg-id dcac3df7936e), intended to be image-2.10.0
  • doing "make release" for the image package


The compiling all succeeds. But I see some ugly compiler warnings during the build process:


g++ -I/opt/octave-5.0/include/octave-5.0.1/octave/.. -I/opt/octave-5.0/include/octave-5.0.1/octave -I/opt/octave-5.0/include  -pthread -fopenmp -g -O2 -g -shared -Wl,-Bsymbolic  -Wall -O2 -o nonmax_supress.oct  /tmp/oct-f7pDCj.o    -L/opt/octave-5.0/lib
In file included from strel.cc:27:0:
/opt/octave-5.0/include/octave-5.0.1/octave/../octave/parse.h: In function ‘octave_value_list eval_string(const string&, bool, int&, int)’:
/opt/octave-5.0/include/octave-5.0.1/octave/../octave/parse.h:673:65: warning: ‘octave_value_list octave::eval_string(const string&, bool, int&, int)’ is deprecated: [5]: use 'octave::interpreter::eval_string' instead [-Wdeprecated-declarations]
   return octave::eval_string (str, silent, parse_status, nargout);
                                                                 ^
/opt/octave-5.0/include/octave-5.0.1/octave/../octave/parse.h:585:3: note: declared here
   eval_string (const std::string&, bool silent, int& parse_status, int nargout);
   ^~~~~~~~~~~
/opt/octave-5.0/include/octave-5.0.1/octave/../octave/parse.h: In function ‘octave_value eval_string(const string&, bool, int&)’:
/opt/octave-5.0/include/octave-5.0.1/octave/../octave/parse.h:680:56: warning: ‘octave_value octave::eval_string(const string&, bool, int&)’ is deprecated: [5]: use 'octave::interpreter::eval_string' instead [-Wdeprecated-declarations]
   return octave::eval_string (str, silent, parse_status);
                                                        ^
/opt/octave-5.0/include/octave-5.0.1/octave/../octave/parse.h:589:3: note: declared here
   eval_string (const std::string&, bool silent, int& parse_status);
   ^~~~~~~~~~~
/opt/octave-5.0/bin/mkoctfile-5.0.1 --verbose  -Wall -g -O2 conndef.cc connectivity.o
/opt/octave-5.0/bin/mkoctfile-5.0.1 --verbose  -Wall -g -O2 bwlabeln.cc connectivity.o
/opt/octave-5.0/bin/mkoctfile-5.0.1 --verbose  -Wall -g -O2 imreconstruct.cc connectivity.o



g++ -c  -fPIC -I/opt/octave-5.0/include/octave-5.0.1/octave/.. -I/opt/octave-5.0/include/octave-5.0.1/octave -I/opt/octave-5.0/include  -pthread -fopenmp -g -O2 -g  -Wall -O2   bwlabeln.cc -o /tmp/oct-AAqeZl.o
conndef.cc: In function ‘octave_value_list Fiptcheckconn(const octave_value_list&, int)’:
conndef.cc:251:59: warning: format ‘%i’ expects argument of type ‘int’, but argument 4 has type ‘octave_idx_type {aka long int}’ [-Wformat=]
                func.c_str (), var.c_str (), pos, e.what ());
                                                           ^
/opt/octave-5.0/bin/mkoctfile-5.0.1 --verbose  -Wall -g -O2 bwconncomp.cc connectivity.o



g++ -c  -fPIC -I/opt/octave-5.0/include/octave-5.0.1/octave/.. -I/opt/octave-5.0/include/octave-5.0.1/octave -I/opt/octave-5.0/include  -pthread -fopenmp -g -O2 -g  -Wall -O2   imerode.cc -o /tmp/oct-zQBn9d.o
In file included from watershed.cc:20:0:
/opt/octave-5.0/include/octave-5.0.1/octave/../octave/parse.h: In function ‘octave_value_list eval_string(const string&, bool, int&, int)’:
/opt/octave-5.0/include/octave-5.0.1/octave/../octave/parse.h:673:65: warning: ‘octave_value_list octave::eval_string(const string&, bool, int&, int)’ is deprecated: [5]: use 'octave::interpreter::eval_string' instead [-Wdeprecated-declarations]
   return octave::eval_string (str, silent, parse_status, nargout);
                                                                 ^
/opt/octave-5.0/include/octave-5.0.1/octave/../octave/parse.h:585:3: note: declared here
   eval_string (const std::string&, bool silent, int& parse_status, int nargout);
   ^~~~~~~~~~~
/opt/octave-5.0/include/octave-5.0.1/octave/../octave/parse.h: In function ‘octave_value eval_string(const string&, bool, int&)’:
/opt/octave-5.0/include/octave-5.0.1/octave/../octave/parse.h:680:56: warning: ‘octave_value octave::eval_string(const string&, bool, int&)’ is deprecated: [5]: use 'octave::interpreter::eval_string' instead [-Wdeprecated-declarations]
   return octave::eval_string (str, silent, parse_status);
                                                        ^
/opt/octave-5.0/include/octave-5.0.1/octave/../octave/parse.h:589:3: note: declared here
   eval_string (const std::string&, bool silent, int& parse_status);
   ^~~~~~~~~~~


@Avinoam @Carne: Do you have an idea how to remove those compiler warnings for Octave 5.0 (and still keep the functionality for Octave 4.2 I hope) ? I don't want all the users to see those warnings when doing "pkg install -forge image" from inside Octave 5.0.

Hartmut <hardy>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #45765:  parse.diff added by mtmiller (2KiB - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by hardy (Submitted the item)
  • -email is unavailable- added by hardy
  • -email is unavailable- added by hardy
  •  

    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 13 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-01-04 mtmiller StatusPatch Reviewed Fixed
        Open/ClosedOpen Closed
    2018-12-30 rik5 StatusPatch Submitted Patch Reviewed
        Assigned toNone mtmiller
    2018-12-28 mtmiller Attached File- Added parse.diff, #45765
        StatusConfirmed Patch Submitted
    2018-12-28 mtmiller Severity3 - Normal 4 - Important
        StatusNone Confirmed
        Summarywarns about eval_string just for including parser.h deprecation warning about octave::eval_string just for including parse.h
    2018-12-24 carandraug CategoryOctave Package Libraries
        Summary[octave forge] (image) compiler warnings when building image-2.10.0 with Octave 5.0.1 warns about eval_string just for including parser.h
    2018-12-22 hardy Carbon-Copy- Added avinoam
        Carbon-Copy- Added carandraug

    Back to the top

    Powered by Savane 3.13-cf05.
    Corresponding source code