bugGNU Octave - Bugs: bug #55277, some public Octave header files...


bug #55277: some public Octave header files include private header file oct-opengl.h

Submitter:  Mike Miller <mtmiller>
Submitted:  Mon 24 Dec 2018 10:19:53 PM UTC
Category:  Libraries Severity:  4 - Important
Priority:  5 - Normal Item Group:  Build Failure
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)

Comment Type & Canned Response:


( Jump to the original submission )

Thu 03 Jan 2019 11:49:24 PM UTC, comment #7: 

This should be fixed now on the stable branch with


This change also removes a HAVE_OPENGL that was snuck into the public API a few months ago.

Mike Miller <mtmiller>
Project Administrator
Mon 31 Dec 2018 06:39:54 PM UTC, comment #6: 

Actually the remaining issue with oct-opengl.h might be as easy as a few forward declarations also. I'll look into it by the end of this week.

Mike Miller <mtmiller>
Project Administrator
Mon 31 Dec 2018 12:42:54 AM UTC, comment #5: 

I suppose the proper thing to do would be to deprecate them for two releases, but if no one is obviously using them (like Octave Forge packages) then I think it is very low probability that anyone else will notice when we remove them.  And the upgrade path for users, simply deleting the "#include gl-render.h", does not seem onderous.  Hence, my vote would be to just stop distributing them and make a note of it in the NEWS file.  But I will defer to jwe if he wants to be more cautious.

Rik <rik5>
Project Administrator
Sun 30 Dec 2018 11:06:06 PM UTC, comment #4: 

I pushed a change on default to address the missing types in most of these header files (load-save.h, oct-hist.h, pager.h, settings.h, pt-tm-const.h).


The remaining issue is the two installed public header files, gl-render.h and gl2ps-print.h, which both include a private not-installed header file, oct-opengl.h. These header files have been part of the public Octave API for many releases, but AFAICT no existing third-party code actually includes these header files. May still be considered risky to remove them from the public API at the last minute before the release.

Mike Miller <mtmiller>
Project Administrator
Sun 30 Dec 2018 08:47:09 PM UTC, comment #3: 

I would like to err on the side of removing more header files from the Octave include directory, making more header files private that don't need to be exposed to the user.

I have searched through all Debian source packages and all current Octave Forge packages, and no code outside of Octave itself uses the gl-render.h and gl2ps-print.h header files, so I would like to move them to the NOINSTALL list.

Mike Miller <mtmiller>
Project Administrator
Sun 30 Dec 2018 06:40:24 PM UTC, comment #2: 

Agree, jwe, both header files gl-render.h and gl2ps-print.h include oct-opengl.h. Are these header files also private? Can the include be deleted?

For the rest, I think it's a matter of adding either forward decls or #include statements to fix the undefined types, I'll start looking at those.

Mike Miller <mtmiller>
Project Administrator
Sun 30 Dec 2018 12:28:49 PM UTC, comment #1: 

@Mike: This is a relatively short list.  What is the resolution protocol?

For the first two, I looked at oct-opengl.h and it is a Mercurial-controlled file in libinterp/corefcn.  In the module.mk file for that directory there is

  %reldir%/interpreter-private.h \
  %reldir%/oct-hdf5.h \

I think you might need to ask jwe about it since he introduced the file in 2016.

Rik <rik5>
Project Administrator
Mon 24 Dec 2018 10:19:53 PM UTC, original submission:  

Some of Octave's public header files do not include the necessary headers or forward declarations for types used in their own declarations.

  • gl-render.h: include file oct-opengl.h not found, private header?
  • gl2ps-print.h: ditto
  • load-save.h: octave_value_list not defined
  • oct-hist.h: interpreter, octave_value, and octave_value_list not defined
  • pager.h: octave_value_list not defined
  • pt-tm-const.h: octave::tree_matrix incomplete type (forward decl not good enough)
  • settings.h: octave_value and size_t not defined

The file settings.h is new in Octave 5. The rest of these files all included cleanly in Octave 4.4.1.

The following shell code was used to test all include files:

for f in $(find $octincludedir -type f -name '*.h' -print | grep -Ev 'mex|ov-intx'); do
  n=$(basename $f)
  echo "#include <$n>" > foo.cc
  cat foo.cc
  mkoctfile-5.0.1 -c foo.cc

Mike Miller <mtmiller>
Project Administrator


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

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by mtmiller
  • -email is unavailable- added by rik5 (Posted a comment)

    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 project members can vote.





    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-01-03 mtmiller StatusIn Progress Fixed
        Open/ClosedOpen Closed
    2018-12-31 mtmiller Assigned toNone mtmiller
    2018-12-30 mtmiller StatusNone In Progress
        Summarysome public Octave header files are missing type includes or forward decls some public Octave header files include private header file oct-opengl.h
    2018-12-30 mtmiller Carbon-Copy- Added jwe
    2018-12-24 mtmiller Carbon-CopyRemoved 80942 -

    Back to the top

    Powered by Savane 3.9