bugGNU Octave - Bugs: bug #55991, OpenGL deprecation warnings in...

 
 

bug #55991: OpenGL deprecation warnings in build on macOS

Submitter:  Andrew Janke <apjanke>
Submitted:  Sun 24 Mar 2019 07:18:30 PM UTC
   
 
Category:  Configuration and Build System Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Other
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * Mac OS
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 26 Mar 2019 03:58:52 AM UTC, comment #5: 

Checked in the patch including the test on _MACH_ here (https://hg.savannah.gnu.org/hgweb/octave/rev/eebf4b67f012).

Marking as fixed and closing report.

Rik <rik5>
Group administrator
Mon 25 Mar 2019 09:53:51 PM UTC, comment #4: 

That worked. Build succeeds, and all the OpenGL warnings are gone now. Thanks!

Andrew Janke <apjanke>
Mon 25 Mar 2019 08:36:30 PM UTC, comment #3: 

I think technically you're supposed to use _MACH_, too - https://developer.apple.com/library/archive/documentation/Porting/Conceptual/PortingUnix/compiling/compiling.html#//apple_ref/doc/uid/TP40002850-SW13 - or really, pull in Apple's own OS-detection header and use that (https://sourceforge.net/p/predef/mailman/message/34497133/) - but practically, it makes no difference, because there are no non-Mach Apple platforms that Octave supports. And I suspect that Apple has deprecated OpenGL on all its OSes, so just _APPLE_ might be the more "correct" test anyway.

I'll do a test build as soon as I have a machine with spare capacity.

Andrew Janke <apjanke>
Mon 25 Mar 2019 08:25:31 PM UTC, comment #2: 

Here's an attempt at a patch.  I don't know whether I need to test for a define besides _APPLE_ to target the correct operating systems, or whether I should also be testing for _MACH_.

(file #46637)

Rik <rik5>
Group administrator
Mon 25 Mar 2019 04:18:09 AM UTC, comment #1: 

So the definition should be surrounded by #ifdef/#endif to limit it to Mac systems.  It should also probably be defined only if OpenGL is being used.  This sounds like it should go in configure.ac.

Rik <rik5>
Group administrator
Sun 24 Mar 2019 07:18:30 PM UTC, original submission:  

OpenGL has been deprecated on macOS. This causes to Octave build to raise a lot of deprecation warnings.


[...]
In file included from ../../octave/libgui/graphics/gl-select.cc:27:
In file included from ../../octave/libgui/graphics/gl-select.h:30:
../../octave/libinterp/corefcn/oct-opengl.h:423:9: warning: 'glTexParameteri' is deprecated: first deprecated in macOS 10.14 - OpenGL API
      deprecated. (Define GL_SILENCE_DEPRECATION to silence these warnings) [-Wdeprecated-declarations]
      ::glTexParameteri (target, pname, param);
        ^
/Applications/Xcode-10.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/OpenGL.framework/Headers/gl.h:2723:13: note:
      'glTexParameteri' has been explicitly marked deprecated here
extern void glTexParameteri (GLenum target, GLenum pname, GLint param) OPENGL_DEPRECATED(10.0, 10.14);
            ^
In file included from ../../octave/libgui/graphics/gl-select.cc:27:
In file included from ../../octave/libgui/graphics/gl-select.h:30:
../../octave/libinterp/corefcn/oct-opengl.h:428:9: warning: 'glTranslated' is deprecated: first deprecated in macOS 10.14 - OpenGL API
      deprecated. (Define GL_SILENCE_DEPRECATION to silence these warnings) [-Wdeprecated-declarations]
      ::glTranslated (x, y, z);
        ^
[...]


We know about this, and don't care for the moment. Let's silence these warnings by defining GL_SILENCE_DEPRECATION.

Andrew Janke <apjanke>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #46637:  mac.glbuild.cset added by rik5 (997B - application/octet-stream)

 

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 apjanke (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.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-03-26 rik5 StatusPatch Submitted Fixed
        Open/ClosedOpen Closed
    2019-03-25 rik5 Attached File- Added mac.glbuild.cset, #46637
        StatusNone Patch Submitted

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code