bugGNU Octave - Bugs: bug #54389, warnings when building on Solaris

 
 

bug #54389: warnings when building on Solaris

Submitted by:  John W. Eaton <jwe>
Submitted on:  Thu 26 Jul 2018 04:33:17 PM UTC  
 
Category:  Configuration and Build System Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Other
Status:  In Progress Assigned to:  None
Originator Name:  Open/Closed:  Open
Release:  dev Operating System:  Solaris/SunOS

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)

Mon 30 Jul 2018 07:22:37 PM UTC, comment #18:

I think the alignas change would work, but this change makes more sense to me:

http://hg.savannah.gnu.org/hgweb/octave/rev/96584a825b0f

Pushed on stable and merged with default. I don't see the warning on the Solaris system now.

John W. Eaton <jwe>
Project Administrator
Mon 30 Jul 2018 04:38:37 AM UTC, comment #17:

Did the alignas diff I posted in comment #15 work? That is the last warning of the original post that needs fixing. You could post the next round of warnings to this bug report as well.

Rik <rik5>
Project Administrator
Thu 26 Jul 2018 10:57:56 PM UTC, comment #16:

Maybe run configure with --disable-fltk. The focus is now on the qt toolkit and it probably isn't worth developer time to suppress those errors.

Rik <rik5>
Project Administrator
Thu 26 Jul 2018 09:59:53 PM UTC, comment #15:

Attached is a possible fix for the alignment warning in oct-base64.cc. It doesn't provoke any problems on my Linux build, but I can't tell if it does anything towards solving the problem on Solaris.

(file #44632)

Rik <rik5>
Project Administrator
Thu 26 Jul 2018 09:22:31 PM UTC, comment #14:

Also many warnings from FLTK because this time I didn't explicitly disable anything and it found packages in /opt/csw/...

John W. Eaton <jwe>
Project Administrator
Thu 26 Jul 2018 09:21:33 PM UTC, comment #13:

For the alignment warnings, would it be possible to use C++11 alignas() keyword? See https://en.cppreference.com/w/cpp/language/alignas.

Rik <rik5>
Project Administrator
Thu 26 Jul 2018 09:12:31 PM UTC, comment #12:

Yeah, the ultra-minimal build was disabling a lot of code such as that associated with freetype and fontconfig. You will probably discover a few more warnings as you back off the number of features that are disabled in configure.

Rik <rik5>
Project Administrator
Thu 26 Jul 2018 09:05:48 PM UTC, comment #11:

I started a new build and these popped up:

John W. Eaton <jwe>
Project Administrator
Thu 26 Jul 2018 08:34:44 PM UTC, comment #10:

Yes, I think those are the only ones left.

John W. Eaton <jwe>
Project Administrator
Thu 26 Jul 2018 08:26:08 PM UTC, comment #9:

What remains? Some -Wcast-align warnings?

Rik <rik5>
Project Administrator
Thu 26 Jul 2018 08:17:06 PM UTC, comment #8:

I pushed two more changes:

http://hg.savannah.gnu.org/hgweb/octave/rev/bbbf0d961a94
http://hg.savannah.gnu.org/hgweb/octave/rev/a5263875ffdc

John W. Eaton <jwe>
Project Administrator
Thu 26 Jul 2018 07:58:09 PM UTC, comment #7:

Yes, on the Solaris system we are using for testing, pthread_t is uint_t. I don't see anything requiring it to be unsigned. Or even to be an integral type. These functions for printing the sigset and sigmask are not used in Octave. I think I added them for debugging purposes and never removed them since they could be useful. I still think they could be useful for debugging, so we might as well keep them. To silence the warning it would be safe enough to cast to long int. It's a C file though, so no static_cast. I'll fix it.

John W. Eaton <jwe>
Project Administrator
Thu 26 Jul 2018 07:36:30 PM UTC, comment #6:

Much better solution to just delete the cruft of sun-utils.h.

Rik <rik5>
Project Administrator
Thu 26 Jul 2018 07:35:33 PM UTC, comment #5:

For the warnings related to printf and pthread_t, if I check /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h I find

so on my Linux system "%ld" is an okay printf specifier. I assume if you check on Solaris you will find that pthread_t is defined as just unsigned int. In this case, we could throw in a static_cast to <unsigned long int> to guarantee the format works out.

Rik <rik5>
Project Administrator
Thu 26 Jul 2018 07:34:04 PM UTC, comment #4:

How about just make it irrelevant instead? I pushed the following changeset on stable and merged with default:

http://hg.savannah.gnu.org/hgweb/octave/rev/bef21ac72618

John W. Eaton <jwe>
Project Administrator
Thu 26 Jul 2018 07:12:24 PM UTC, comment #3:

The old-style casts in sun-utils.h should be easy to resove by switching them to static_cast.

Rik <rik5>
Project Administrator
Thu 26 Jul 2018 06:58:54 PM UTC, comment #2:

The END_LONG_DOUBLE_ROUNDING macro is also conditional. It's defined to an empty expression on non-x86 systems, so oldcw is indeed unused.

Mike Miller <mtmiller>
Project Administrator
Thu 26 Jul 2018 06:46:08 PM UTC, comment #1:

The first one seems like a problem with either gcc or cpp expansion.

In fpucw-wrappers.c the code is

So the parameter oldcw isn't used per se. But if you look at gnulib/lib/fpucw.h there is a definition for END_LONG_DOUBLE_ROUNDING which is

so oldcw is getting used. Maybe the fact that SET_FPUCW is in turn a macro is causing problems in that it isn't fully expanding all macros before passing the results to gcc.

Rik <rik5>
Project Administrator
Thu 26 Jul 2018 04:33:17 PM UTC, original submission:

The following warnings occur when building on Solaris with GCC 7.3:

John W. Eaton <jwe>
Project Administrator

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #44632:  oct-base64.diff added by rik5 (411B - 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 mtmiller (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by jwe (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 11 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-07-26 rik5 Attached File- => Added oct-base64.diff, #44632
    2018-07-26 rik5 CategoryNone => Configuration and Build System
        Item GroupNone => Other
        StatusNone => In Progress
    2018-07-26 jwe CategoryConfiguration and Build System => None
        Item GroupOther => None
        StatusIn Progress => None
    2018-07-26 rik5 CategoryNone => Configuration and Build System
        Item GroupNone => Other
        StatusNone => In Progress
    2018-07-26 jwe Summarycast warnings when building on Solaris => warnings when building on Solaris

    Back to the top


    Powered by Savane 3.3