bugGNU Octave - Bugs: bug #58791, Compilation warning messages


bug #58791: Compilation warning messages

Submitted by:  Michael Godfrey <godfrey>
Submitted on:  Mon 20 Jul 2020 02:36:09 PM UTC  
Category:  Configuration and Build System Severity:  2 - Minor
Priority:  5 - Normal Item Group:  Other
Status:  Fixed Assigned to:  None
Originator Name:  godfrey Open/Closed:  Closed
Release:  dev Operating System:  GNU/Linux

Add a New Comment (Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


( Jump to the original submission)

Fri 04 Sep 2020 09:14:56 PM UTC, comment #12: 

I think David may have added the code in order to tackle bug #32877 from 2011 where a request was made to have lsode() expanded to support single precision.  That bug has been open forever.

I don't think it would be terribly difficult, but we would need to ascertain whether one of the inputs to lsode() was a single and then call the appropriate routines.  Right now, everything in libinterp/corefcn/lsode.cc assumes double precision.  Maybe one could be clever with templates for lsode_user_function and lsode_user_jacobian so that this just worked with T = <double> or <float>.

Rik <rik5>
Project Administrator
Fri 04 Sep 2020 06:52:35 PM UTC, comment #11: 

It looks like the DBLE conversion was accidentally omitted from the changeset ac5e5da675e3 that I made last year.  I fixed that on stable in changeset a927fe30358d.

I don't know what the plans were back in 2008 when David Batemen added the single precision ODEPACK fucntions in changeset 96ba591be50f, but I don't think they are actually used.  I'm also not sure why, but he changed the calls to XERRWD from XERRWV (the single precision version) in changeset 2b458dfe31ae.  I added xerrwv.f and changed those calls back to XERRWV in changeset 17fc4f5ee1ef.

ODEPACK doesn't change often and we distribute it directly with Octave because as far as I know, no one packages it.  But the double precision version on netlib appears to be newer than what we have, so I updated our files in changeset eb35003c3851.  The single versions appear to be current, with no update from netlib that I can see since David imported them in 2008.  So I think we are up to date now.

John W. Eaton <jwe>
Project Administrator
Fri 04 Sep 2020 03:16:07 PM UTC, comment #10: 


Very good! The remaining warning is "not our department".
The ODEPACK folks may fix it someday...

Time to close the report.


Michael Godfrey <godfrey>
Project Member
Fri 04 Sep 2020 03:06:08 PM UTC, comment #9: 

Glad the warnings went away.

The one remaining, interestingly enough, is correct.  ODEPACK is an external library though, so the fix should really be made upstream.

The issue is that the error handling routine XERRWD declares the last two function parameters as double precision values.  The file sintdy.f is for single precision calculations so variables TP and TN are declared as REAL (single precision).  What's interesting is that some programmer somewhere understood a bit and used DBLE() to cast TP to double precision.  If you want to test my hypothesis you could add DBLE (TN) on line 107 of sintdy.f and check that the warning message goes away.

This is unlikely ever to be a problem because XERRWD is only called when something has gone wrong and my guess is that single to double conversion probably is gracefully handled by the compiler.  At worst, maybe the reporting would be slightly bad.

Rik <rik5>
Project Administrator
Fri 04 Sep 2020 12:51:25 PM UTC, comment #8: 


I ran:  make all > compile_out.txt 2>&1  on current system:

In the meantime the warnings that I noticed have disappeared.
There is just one Warning which is probably not a problem:

2130:   F77      liboctave/external/odepack/libexternal_la-sintdy.lo
2131: liboctave/external/odepack/sintdy.f:107:44:
2133:   100 |      1     30, 51, 0, 1, K, 0, 0, 0.0D0, 0.0D0)
2134:       |                                         2
2135: ......
2136:   107 |      1    60, 52, 0, 0, 0, 0, 2, DBLE (TP), TN)
2137:       |                                            1
2138: Warning: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(4)/REAL(8)).
2139:   F77      liboctave/external/odepack/libexternal_la-slsode.lo

Do you need any more information about this?

Michael Godfrey <godfrey>
Project Member
Fri 04 Sep 2020 10:03:51 AM UTC, comment #7: 

Sorry. Something went wrong with my attempt to reduce the file size. Will recheck.

Michael Godfrey <godfrey>
Project Member
Fri 04 Sep 2020 01:28:51 AM UTC, comment #6: 

@Michael: I was off for a bit, but back to looking at Octave bugs again.  I downloaded your compile.log.zip and there are no warnings in it.  Is it possible that when you compiled you didn't capture stderr and send it to the file as well?

Rik <rik5>
Project Administrator
Mon 03 Aug 2020 12:38:54 AM UTC, comment #5: 

Sorry for the noise over up loading the files. The .zip
copies should be what you want.

Michael Godfrey <godfrey>
Project Member
Sun 02 Aug 2020 11:14:04 PM UTC, comment #4: 

compile.log and config.log files are attached.

Michael Godfrey <godfrey>
Project Member
Sun 02 Aug 2020 05:13:26 PM UTC, comment #3: 

I created the files, but they are too big for uploading
Should I just upload the warnings only?

(file #49611)

Michael Godfrey <godfrey>
Project Member
Sun 02 Aug 2020 12:17:54 AM UTC, comment #2: 

OK. Coming soon. I have to do a full rebuild to get the warnings

Michael Godfrey <godfrey>
Project Member
Fri 24 Jul 2020 03:34:49 AM UTC, comment #1: 

Could you upload the full log?  I think I have an idea about what is going on, but the full set of warning messages would help.

Rik <rik5>
Project Administrator
Mon 20 Jul 2020 02:36:09 PM UTC, original submission:  

On Fedora 32 for some time I have noticed the following compilation warning messages. They do not seem to cause harm,
but may deserve some cleanup. These occur about 10 times during full rebuild:

  CXX      libinterp/octave-value/liboctave_value_la-ov-int16.lo
In file included from libinterp/octave-value/ov-base-int.cc:70,
                 from libinterp/octave-value/ov-int16.cc:49:
./liboctave/util/byte-swap.h: In member function ‘bool octave_base_int_scalar<T>::load_binary(std::istream&, bool, octave::mach_info::float_format) [with T = octave_int<short int>]’:
./liboctave/util/byte-swap.h:37:13: warning: array subscript 7 is outside array bounds of ‘octave_int<short int> [1]’ [-Warray-bounds]
   37 |   t[i] = t[j];
      |          ~~~^

Michael Godfrey <godfrey>
Project Member


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

Attach Files:

Attached Files
file #49615:  compile.log.zip added by godfrey (567KiB - application/zip)
file #49616:  config.log.zip added by godfrey (114KiB - application/zip)


Depends on the following items: None found

Items that depend on this one: None found


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

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.




    Follow 9 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-09-04 jwe StatusNeed Info => Fixed
    2020-09-04 godfrey Open/ClosedOpen => Closed
    2020-08-02 godfrey Attached File- => Added compile.log.zip, #49615
        Attached File- => Added config.log.zip, #49616
    2020-08-02 godfrey Attached File#49614 => Removed
    2020-08-02 godfrey Attached File- => Added config.log, #49614
    2020-08-02 godfrey Attached File#49611 => Removed
    2020-08-02 godfrey Attached File- => Added config.log, #49611
    2020-07-24 rik5 StatusNone => Need Info

    Back to the top

    Powered by Savane 3.5