bugGNU Octave - Bugs: bug #54124, Build fails against Qt 5.11.0 with...

 
 

bug #54124: Build fails against Qt 5.11.0 with "incomplete type 'QButtonGroup'" error

Submitter:  Andrew Janke <andrewjanke>
Submitted:  Sat 16 Jun 2018 11:59:45 AM UTC
   
 
Category:  Configuration and Build System Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Build Failure
Status:  Duplicate Assigned to:  None
Originator Name:  Andrew Janke Open/Closed:  * Closed
Release:  * 4.4.0 Operating System:  * Mac OS
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 17 Jun 2018 07:33:35 AM UTC, comment #3: 

Great; thanks! Sorry for the duplicate bug.

Andrew Janke <andrewjanke>
Sat 16 Jun 2018 04:00:17 PM UTC, comment #2: 

This was indeed the only fix needed to build against Qt 5.11

https://hg.savannah.gnu.org/hgweb/octave/rev/cdaa884568b1

Mike Miller <mtmiller>
Group Member
Sat 16 Jun 2018 03:58:50 PM UTC, comment #1: 

Thanks for the bug report. This has already been reported and fixed on the stable branch for the next bug fix release of Octave, see bug #53978.

Mike Miller <mtmiller>
Group Member
Sat 16 Jun 2018 11:59:45 AM UTC, original submission:  

When attempting to build Octave 4.4.0 on macOS against Qt 5.11.0, the build is erroring out with a complaint about "error: allocation of incomplete type 'QButtonGroup'".


libtool: compile:  clang++ -std=gnu++11 -DHAVE_CONFIG_H -I. -I/usr/local/opt/freetype/include/freetype2 -I/usr/local/opt/freetype/include/freetype2 -I/usr/local/Cellar/fontconfig/2.13.0/include -I/usr/local/Cellar/qt/5.11.0/include/QtNetwork -I/usr/local/Cellar/qt/5.11.0/include -I/usr/local/Cellar/qt/5.11.0/include/QtOpenGL -I/usr/local/Cellar/qt/5.11.0/include -I/usr/local/Cellar/qt/5.11.0/include/QtPrintSupport -I/usr/local/Cellar/qt/5.11.0/include -I/usr/local/Cellar/qt/5.11.0/include/QtHelp -I/usr/local/Cellar/qt/5.11.0/include -I/usr/local/Cellar/qt/5.11.0/include/QtWidgets -I/usr/local/Cellar/qt/5.11.0/include -I/usr/local/Cellar/qt/5.11.0/include/QtGui -I/usr/local/Cellar/qt/5.11.0/include -I/usr/local/Cellar/qt/5.11.0/include/QtSql -I/usr/local/Cellar/qt/5.11.0/include -I/usr/local/Cellar/qt/5.11.0/include/QtCore -I/usr/local/Cellar/qt/5.11.0/include -I./libgui/qterminal/libqterminal -Ilibgui/src -I./libgui/src -I./libgui/src/m-editor -I./libgui/src/qtinfo -I./libgui/graphics -I./liboctave/array -Iliboctave/numeric -I./liboctave/numeric -Iliboctave/operators -I./liboctave/operators -I./liboctave/system -I./liboctave/util -Ilibinterp -I./libinterp -Ilibinterp/parse-tree -I./libinterp/parse-tree -Ilibinterp/corefcn -I./libinterp/corefcn -I./libinterp/octave-value -I./liboctave/wrappers -fPIC -D_THREAD_SAFE -pthread -Wall -W -Wshadow -Wold-style-cast -Wformat -Wpointer-arith -Wwrite-strings -Wcast-align -Wcast-qual -I/Library/Java/JavaVirtualMachines/jdk-10.0.1.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/jdk-10.0.1.jdk/Contents/Home/include/darwin -c libgui/src/settings-dialog.cc  -fno-common -DPIC -o libgui/src/.libs/libgui_src_libgui_src_la-settings-dialog.o
libgui/src/settings-dialog.cc:302:39: error: allocation of incomplete type 'QButtonGroup'
  QButtonGroup *icon_size_group = new QButtonGroup (this);
                                      ^~~~~~~~~~~~
/usr/local/Cellar/qt/5.11.0/include/QtWidgets/qabstractbutton.h:53:7: note: forward declaration of 'QButtonGroup'
class QButtonGroup;
      ^
libgui/src/settings-dialog.cc:303:18: error: member access into incomplete type 'QButtonGroup'
  icon_size_group->addButton (ui->icon_size_small);
                 ^
/usr/local/Cellar/qt/5.11.0/include/QtWidgets/qabstractbutton.h:53:7: note: forward declaration of 'QButtonGroup'
class QButtonGroup;
      ^
libgui/src/settings-dialog.cc:304:18: error: member access into incomplete type 'QButtonGroup'
  icon_size_group->addButton (ui->icon_size_normal);
                 ^
/usr/local/Cellar/qt/5.11.0/include/QtWidgets/qabstractbutton.h:53:7: note: forward declaration of 'QButtonGroup'
class QButtonGroup;
      ^
libgui/src/settings-dialog.cc:305:18: error: member access into incomplete type 'QButtonGroup'
  icon_size_group->addButton (ui->icon_size_large);
                 ^
/usr/local/Cellar/qt/5.11.0/include/QtWidgets/qabstractbutton.h:53:7: note: forward declaration of 'QButtonGroup'
class QButtonGroup;
      ^
libgui/src/settings-dialog.cc:312:34: error: allocation of incomplete type 'QButtonGroup'
  QButtonGroup *icon_group = new QButtonGroup (this);
                                 ^~~~~~~~~~~~
/usr/local/Cellar/qt/5.11.0/include/QtWidgets/qabstractbutton.h:53:7: note: forward declaration of 'QButtonGroup'
class QButtonGroup;
      ^
libgui/src/settings-dialog.cc:313:13: error: member access into incomplete type 'QButtonGroup'
  icon_group->addButton (ui->general_icon_octave);
            ^
/usr/local/Cellar/qt/5.11.0/include/QtWidgets/qabstractbutton.h:53:7: note: forward declaration of 'QButtonGroup'
class QButtonGroup;
      ^
libgui/src/settings-dialog.cc:314:13: error: member access into incomplete type 'QButtonGroup'
  icon_group->addButton (ui->general_icon_graphic);
            ^
/usr/local/Cellar/qt/5.11.0/include/QtWidgets/qabstractbutton.h:53:7: note: forward declaration of 'QButtonGroup'
class QButtonGroup;
      ^
libgui/src/settings-dialog.cc:315:13: error: member access into incomplete type 'QButtonGroup'
  icon_group->addButton (ui->general_icon_letter);
            ^
/usr/local/Cellar/qt/5.11.0/include/QtWidgets/qabstractbutton.h:53:7: note: forward declaration of 'QButtonGroup'
class QButtonGroup;
      ^
8 errors generated.
make[2]: *** [libgui/src/libgui_src_libgui_src_la-settings-dialog.lo] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2


I suspect this is because Qt 5.11.0 rearranged some of their internal includes, so a previously indirectly-included <QButtonGroup> is no longer being picked up. I think it could be fixed by adding an explicit "#include <QButtonGroup>" to libgui/src/settings-dialog.h.


diff --git a/libgui/src/settings-dialog.h b/libgui/src/settings-dialog.h
index b66f5b0..61d5a1c 100644
--- a/libgui/src/settings-dialog.h
+++ b/libgui/src/settings-dialog.h
@@ -23,6 +23,7 @@ along with Octave; see the file COPYING.  If not, see
 #if ! defined (octave_settings_dialog_h)
 #define octave_settings_dialog_h 1

+#include <QButtonGroup>
 #include <QDialog>
 #include <QSettings>
 #include <QLineEdit>


Andrew Janke <andrewjanke>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Digest:
   bug dependencies.

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 andrewjanke (Submitted the item)
  • -email is unavailable- added by andrewjanke
  •  

    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
    2018-06-16 mtmiller StatusNone Duplicate
        Open/ClosedOpen Closed
        Dependencies- Depends on bugs #53978
    2018-06-16 andrewjanke Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code