# MacOS Sequoia 15.1 installing Geant4

**URL:** <https://geant4-forum.web.cern.ch/t/macos-sequoia-15-1-installing-geant4/13255>\
**Category:** Getting Started\
**Created:** [November 24, 2024, 2:31pm UTC](https://geant4-forum.web.cern.ch/t/macos-sequoia-15-1-installing-geant4/13255 "2024-11-24T14:31:45Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![guest\_edward.taylor](https://geant4-forum.web.cern.ch/letter_avatar_proxy/v4/letter/g/e0b2c6/32.png) [@guest\_edward.taylor](https://geant4-forum.web.cern.ch/u/guest_edward.taylor)\
**Post date:** [November 25, 2024, 2:32pm UTC](https://geant4-forum.web.cern.ch/t/macos-sequoia-15-1-installing-geant4/13255/7 "2024-11-25T14:32:55Z")

</div>

Thanks Ben, I did this, I also realised that I hadn’t installed any of the visualisation stuff:

```auto
edwardt@onc-0986 build % geant4-config --help
....
Known Features:
 staticlibs[no]
 multithreading[yes]
 smartstack[no]
 php_as_hp[no]
 clhep[yes]
 expat[no]
 zlib[yes]
 gdml[no]
 ptl[yes]
 usolids[no]
 freetype[no]
 hdf5[no]
 g3tog4[no]
 qt[no]
 qt3d[no]
 motif[no]
 raytracer-x11[no]
 opengl-x11[no]
 openinventor[no]
 vtk[no]
...

```

I went to /Users/edwardt/Documents/Geant4/geant4-v11.2.2-build folder and did

```auto
cmake -DCMAKE_INSTALL_PREFIX=/Users/edwardt/Documents/Geant4/geant4-v11.2.2-install /Users/edwardt/Documents/Geant4/geant4-v11.2.2 -DGEANT4_INSTALL_DATA=ON -DGEANT4_USE_QT=ON -DGEANT4_USE_OPENGL_X11=ON

```

```auto
make -j 10

```

which resulted in:

```auto
[97%] Building CXX object source/CMakeFiles/G4ToolsSG.dir/visualization/ToolsSG/src/G4ToolsSGQtZB.cc.o
In file included from /Users/edwardt/Documents/Geant4/geant4-v11.2.2/source/visualization/ToolsSG/src/G4ToolsSGQtGLESViewer.cc:28:
/Users/edwardt/Documents/Geant4/geant4-v11.2.2-build/source/G4ToolsSG_autogen/include/moc_G4ToolsSGQtGLESViewer.cpp:16:2: error: "This file was generated using the moc from 5.15.16. It"
   16 | #error "This file was generated using the moc from 5.15.16. It"
      | ^
/Users/edwardt/Documents/Geant4/geant4-v11.2.2-build/source/G4ToolsSG_autogen/include/moc_G4ToolsSGQtGLESViewer.cpp:17:2: error: "cannot be used with the include files from this version of Qt."
   17 | #error "cannot be used with the include files from this version of Qt."
      | ^
/Users/edwardt/Documents/Geant4/geant4-v11.2.2-build/source/G4ToolsSG_autogen/include/moc_G4ToolsSGQtGLESViewer.cpp:18:2: error: "(The moc has changed too much.)"
   18 | #error "(The moc has changed too much.)"
      | ^
/Users/edwardt/Documents/Geant4/geant4-v11.2.2-build/source/G4ToolsSG_autogen/include/moc_G4ToolsSGQtGLESViewer.cpp:35:1: error: use of undeclared identifier 'Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET'
   35 | QT_MOC_LITERAL(0, 0, 26), // "G4ToolsSGQtDestroyCallback"
      | ^
/Users/edwardt/Documents/Geant4/geant4-v11.2.2-build/source/G4ToolsSG_autogen/include/moc_G4ToolsSGQtGLESViewer.cpp:29:5: note: expanded from macro 'QT_MOC_LITERAL'
   29 | Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
      | ^
/Users/edwardt/Documents/Geant4/geant4-v11.2.2-build/source/G4ToolsSG_autogen/include/moc_G4ToolsSGQtGLESViewer.cpp:36:1: error: use of undeclared identifier 'Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET'
   36 | QT_MOC_LITERAL(1, 27, 7), // "execute"
      | ^
/Users/edwardt/Documents/Geant4/geant4-v11.2.2-build/source/G4ToolsSG_autogen/include/moc_G4ToolsSGQtGLESViewer.cpp:29:5: note: expanded from macro 'QT_MOC_LITERAL'
   29 | Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
      | ^
/Users/edwardt/Documents/Geant4/geant4-v11.2.2-build/source/G4ToolsSG_autogen/include/moc_G4ToolsSGQtGLESViewer.cpp:37:1: error: use of undeclared identifier 'Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET'
   37 | QT_MOC_LITERAL(2, 35, 0) // ""
      | ^
/Users/edwardt/Documents/Geant4/geant4-v11.2.2-build/source/G4ToolsSG_autogen/include/moc_G4ToolsSGQtGLESViewer.cpp:29:5: note: expanded from macro 'QT_MOC_LITERAL'
   29 | Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
      | ^
/Users/edwardt/Documents/Geant4/geant4-v11.2.2-build/source/G4ToolsSG_autogen/include/moc_G4ToolsSGQtGLESViewer.cpp:79:1: error: unknown type name 'QT_INIT_METAOBJECT'
   79 | QT_INIT_METAOBJECT const QMetaObject G4ToolsSGQtDestroyCallback::staticMetaObject = { {
      | ^
/Users/edwardt/Documents/Geant4/geant4-v11.2.2-build/source/G4ToolsSG_autogen/include/moc_G4ToolsSGQtGLESViewer.cpp:79:37: error: expected ';' after top level declarator
   79 | QT_INIT_METAOBJECT const QMetaObject G4ToolsSGQtDestroyCallback::staticMetaObject = { {
      | ^
[97%] Building CXX object source/CMakeFiles/G4physicslists.dir/physics_lists/constructors/hadron_inelastic/src/G4HadronPhysicsNuBeam.cc.o
[97%] Building CXX object source/CMakeFiles/G4OpenGL.dir/visualization/OpenGL/src/G4OpenGLStoredX.cc.o
8 errors generated.
make[2]: *** [source/CMakeFiles/G4ToolsSG.dir/build.make:149: source/CMakeFiles/G4ToolsSG.dir/visualization/ToolsSG/src/G4ToolsSGQtGLESViewer.cc.o] Error 1
make[2]: *** Waiting for unfinished jobs....
[97%] Building CXX object source/CMakeFiles/G4OpenGL.dir/visualization/OpenGL/src/G4OpenGLStoredXViewer.cc.o
[97%] Building CXX object source/CMakeFiles/G4OpenGL.dir/visualization/OpenGL/src/G4OpenGLXViewer.cc.o
[97%] Building CXX object source/CMakeFiles/G4OpenGL.dir/visualization/OpenGL/src/G4OpenGLImmediateQt.cc.o
[97%] Building CXX object source/CMakeFiles/G4OpenGL.dir/visualization/OpenGL/src/G4OpenGLImmediateQtViewer.cc.o
[97%] Building CXX object source/CMakeFiles/G4physicslists.dir/physics_lists/constructors/hadron_inelastic/src/G4HadronPhysicsQGS_BIC.cc.o
[97%] Building CXX object source/CMakeFiles/G4physicslists.dir/physics_lists/constructors/hadron_inelastic/src/G4HadronPhysicsQGSP_BERT.cc.o
[98%] Building CXX object source/CMakeFiles/G4OpenGL.dir/visualization/OpenGL/src/G4OpenGLQt.cc.o
[98%] Building CXX object source/CMakeFiles/G4OpenGL.dir/visualization/OpenGL/src/G4OpenGLQtExportDialog.cc.o
[98%] Building CXX object source/CMakeFiles/G4physicslists.dir/physics_lists/constructors/hadron_inelastic/src/G4HadronPhysicsQGSP_BERT_HP.cc.o
In file included from /Users/edwardt/Documents/Geant4/geant4-v11.2.2/source/visualization/OpenGL/src/G4OpenGLImmediateQt.cc:36:
In file included from /Users/edwardt/Documents/Geant4/geant4-v11.2.2/source/visualization/OpenGL/include/G4OpenGLImmediateQtViewer.hh:36:
In file included from /Users/edwardt/Documents/Geant4/geant4-v11.2.2/source/visualization/OpenGL/include/G4OpenGLQtViewer.hh:43:
/opt/homebrew/Cellar/qt@5/5.15.16/lib/QtCore.framework/Headers/qobject.h:266:43: error: no template named 'QSlotObject' in namespace 'QtPrivate'
  266 | new QtPrivate::QSlotObject<Func2, typename QtPrivate::List_Left<typename SignalType::Arguments, SlotType::ArgumentCount>::Value,
      | ~~~~~~~~~~~ ^
/opt/homebrew/Cellar/qt@5/5.15.16/lib/QtCore.framework/Headers/qobject.h:305:43: error: no template named 'QStaticSlotObject' in namespace 'QtPrivate'
  305 | new QtPrivate::QStaticSlotObject<Func2,
      | ~~~~~~~~~~~ ^
/opt/homebrew/Cellar/qt@5/5.15.16/lib/QtCore.framework/Headers/qobject.h:344:43: error: no template named 'QFunctorSlotObject' in namespace 'QtPrivate'
  344 | new QtPrivate::QFunctorSlotObject<Func2, SlotArgumentCount,
      | ~~~~~~~~~~~ ^
In file included from /Users/edwardt/Documents/Geant4/geant4-v11.2.2/source/visualization/OpenGL/src/G4OpenGLImmediateQt.cc:36:
In file included from /Users/edwardt/Documents/Geant4/geant4-v11.2.2/source/visualization/OpenGL/include/G4OpenGLImmediateQtViewer.hh:36:
In file included from /Users/edwardt/Documents/Geant4/geant4-v11.2.2/source/visualization/OpenGL/include/G4OpenGLQtViewer.hh:45:
/opt/homebrew/Cellar/qt@5/5.15.16/lib/QtGui.framework/Headers/qpixmap.h:134:31: error: unknown type name 'QMatrix'
  134 | QPixmap transformed(const QMatrix &, Qt::TransformationMode mode = Qt::FastTransformation) const;
      | ^
/opt/homebrew/Cellar/qt@5/5.15.16/lib/QtGui.framework/Headers/qpixmap.h:136:12: error: unknown type name 'QMatrix'
  136 | static QMatrix trueMatrix(const QMatrix &m, int w, int h);
      | ^
/opt/homebrew/Cellar/qt@5/5.15.16/lib/QtGui.framework/Headers/qpixmap.h:136:37: error: unknown type name 'QMatrix'
  136 | static QMatrix trueMatrix(const QMatrix &m, int w, int h);
      | ^
/opt/homebrew/Cellar/qt@5/5.15.16/lib/QtGui.framework/Headers/qpixmap.h:193:5: error: unknown type name 'Q_DUMMY_COMPARISON_OPERATOR'
  193 | Q_DUMMY_COMPARISON_OPERATOR(QPixmap)
      | ^
/opt/homebrew/Cellar/qt@5/5.15.16/lib/QtGui.framework/Headers/qpixmap.h:193:41: error: expected ';' at end of declaration list
  193 | Q_DUMMY_COMPARISON_OPERATOR(QPixmap)
      | ^
In file included from /Users/edwardt/Documents/Geant4/geant4-v11.2.2/source/visualization/OpenGL/src/G4OpenGLImmediateQt.cc:36:
In file included from /Users/edwardt/Documents/Geant4/geant4-v11.2.2/source/visualization/OpenGL/include/G4OpenGLImmediateQtViewer.hh:36:
In file included from /Users/edwardt/Documents/Geant4/geant4-v11.2.2/source/visualization/OpenGL/include/G4OpenGLQtViewer.hh:57:
In file included from /opt/homebrew/Cellar/qt@5/5.15.16/lib/QtWidgets.framework/Headers/QOpenGLWidget:1:
In file included from /opt/homebrew/Cellar/qt@5/5.15.16/lib/QtWidgets.framework/Headers/qopenglwidget.h:47:
In file included from /opt/homebrew/include/QtWidgets/QWidget:1:
In file included from /opt/homebrew/include/QtWidgets/qwidget.h:22:
In file included from /opt/homebrew/include/QtGui/qcursor.h:10:
/opt/homebrew/include/QtGui/qbitmap.h:30:49: error: cannot initialize object parameter of type 'QPixmap' with an expression of type 'QBitmap'
   30 | inline void swap(QBitmap &other) { QPixmap::swap(other); } // prevent QBitmap<->QPixmap swaps
      | ^~~~
/opt/homebrew/include/QtGui/qbitmap.h:33:27: error: no matching member function for call to 'fill'
   33 | inline void clear() { fill(Qt::color0); }
      | ^~~~
/opt/homebrew/Cellar/qt@5/5.15.16/lib/QtGui.framework/Headers/qpixmap.h:94:10: note: candidate function not viable: no known conversion from 'QBitmap' to 'QPixmap' for object argument
   94 | void fill(const QColor &fillColor = Qt::white);
      | ^
/opt/homebrew/Cellar/qt@5/5.15.16/lib/QtGui.framework/Headers/qpixmap.h:97:10: note: candidate function not viable: requires 2 arguments, but 1 was provided
   97 | void fill(const QPaintDevice *device, const QPoint &ofs);
      | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/homebrew/Cellar/qt@5/5.15.16/lib/QtGui.framework/Headers/qpixmap.h:99:10: note: candidate function not viable: requires 3 arguments, but 1 was provided
   99 | void fill(const QPaintDevice *device, int xofs, int yofs);
      | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /Users/edwardt/Documents/Geant4/geant4-v11.2.2/source/visualization/OpenGL/src/G4OpenGLImmediateQtViewer.cc:32:
In file included from /Users/edwardt/Documents/Geant4/geant4-v11.2.2/source/visualization/OpenGL/include/G4OpenGLImmediateQtViewer.hh:36:
In file included from /Users/edwardt/Documents/Geant4/geant4-v11.2.2/source/visualization/OpenGL/include/G4OpenGLQtViewer.hh:43:
/opt/homebrew/Cellar/qt@5/5.15.16/lib/QtCore.framework/Headers/qobject.h:266:43: error: no template named 'QSlotObject' in namespace 'QtPrivate'
  266 | new QtPrivate::QSlotObject<Func2, typename QtPrivate::List_Left<typename SignalType::Arguments, SlotType::ArgumentCount>::Value,
      | ~~~~~~~~~~~ ^
/opt/homebrew/Cellar/qt@5/5.15.16/lib/QtCore.framework/Headers/qobject.h:305:43: error: no template named 'QStaticSlotObject' in namespace 'QtPrivate'
  305 | new QtPrivate::QStaticSlotObject<Func2,
      | ~~~~~~~~~~~ ^
/opt/homebrew/Cellar/qt@5/5.15.16/lib/QtCore.framework/Headers/qobject.h:344:43: error: no template named 'QFunctorSlotObject' in namespace 'QtPrivate'
  344 | new QtPrivate::QFunctorSlotObject<Func2, SlotArgumentCount,
      | ~~~~~~~~~~~ ^
10 errors generated.
make[2]: *** [source/CMakeFiles/G4OpenGL.dir/build.make:317: source/CMakeFiles/G4OpenGL.dir/visualization/OpenGL/src/G4OpenGLImmediateQt.cc.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /Users/edwardt/Documents/Geant4/geant4-v11.2.2/source/visualization/OpenGL/src/G4OpenGLImmediateQtViewer.cc:32:
In file included from /Users/edwardt/Documents/Geant4/geant4-v11.2.2/source/visualization/OpenGL/include/G4OpenGLImmediateQtViewer.hh:36:
In file included from /Users/edwardt/Documents/Geant4/geant4-v11.2.2/source/visualization/OpenGL/include/G4OpenGLQtViewer.hh:45:
/opt/homebrew/Cellar/qt@5/5.15.16/lib/QtGui.framework/Headers/qpixmap.h:134:31: error: unknown type name 'QMatrix'
  134 | QPixmap transformed(const QMatrix &, Qt::TransformationMode mode = Qt::FastTransformation) const;
      | ^
/opt/homebrew/Cellar/qt@5/5.15.16/lib/QtGui.framework/Headers/qpixmap.h:136:12: error: unknown type name 'QMatrix'
  136 | static QMatrix trueMatrix(const QMatrix &m, int w, int h);
      | ^
/opt/homebrew/Cellar/qt@5/5.15.16/lib/QtGui.framework/Headers/qpixmap.h:136:37: error: unknown type name 'QMatrix'
  136 | static QMatrix trueMatrix(const QMatrix &m, int w, int h);
      | ^
/opt/homebrew/Cellar/qt@5/5.15.16/lib/QtGui.framework/Headers/qpixmap.h:193:5: error: unknown type name 'Q_DUMMY_COMPARISON_OPERATOR'
  193 | Q_DUMMY_COMPARISON_OPERATOR(QPixmap)
      | ^
/opt/homebrew/Cellar/qt@5/5.15.16/lib/QtGui.framework/Headers/qpixmap.h:193:41: error: expected ';' at end of declaration list
  193 | Q_DUMMY_COMPARISON_OPERATOR(QPixmap)
      | ^
In file included from /Users/edwardt/Documents/Geant4/geant4-v11.2.2/source/visualization/OpenGL/src/G4OpenGLImmediateQtViewer.cc:32:
In file included from /Users/edwardt/Documents/Geant4/geant4-v11.2.2/source/visualization/OpenGL/include/G4OpenGLImmediateQtViewer.hh:36:
In file included from /Users/edwardt/Documents/Geant4/geant4-v11.2.2/source/visualization/OpenGL/include/G4OpenGLQtViewer.hh:57:
In file included from /opt/homebrew/Cellar/qt@5/5.15.16/lib/QtWidgets.framework/Headers/QOpenGLWidget:1:
In file included from /opt/homebrew/Cellar/qt@5/5.15.16/lib/QtWidgets.framework/Headers/qopenglwidget.h:47:
In file included from /opt/homebrew/include/QtWidgets/QWidget:1:
In file included from /opt/homebrew/include/QtWidgets/qwidget.h:22:
In file included from /opt/homebrew/include/QtGui/qcursor.h:10:
/opt/homebrew/include/QtGui/qbitmap.h:30:49: error: cannot initialize object parameter of type 'QPixmap' with an expression of type 'QBitmap'
   30 | inline void swap(QBitmap &other) { QPixmap::swap(other); } // prevent QBitmap<->QPixmap swaps
      | ^~~~
/opt/homebrew/include/QtGui/qbitmap.h:33:27: error: no matching member function for call to 'fill'
   33 | inline void clear() { fill(Qt::color0); }
      | ^~~~
/opt/homebrew/Cellar/qt@5/5.15.16/lib/QtGui.framework/Headers/qpixmap.h:94:10: note: candidate function not viable: no known conversion from 'QBitmap' to 'QPixmap' for object argument
   94 | void fill(const QColor &fillColor = Qt::white);
      | ^
/opt/homebrew/Cellar/qt@5/5.15.16/lib/QtGui.framework/Headers/qpixmap.h:97:10: note: candidate function not viable: requires 2 arguments, but 1 was provided
   97 | void fill(const QPaintDevice *device, const QPoint &ofs);
      | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/homebrew/Cellar/qt@5/5.15.16/lib/QtGui.framework/Headers/qpixmap.h:99:10: note: candidate function not viable: requires 3 arguments, but 1 was provided
   99 | void fill(const QPaintDevice *device, int xofs, int yofs);
      | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[98%] Building CXX object source/CMakeFiles/G4physicslists.dir/physics_lists/constructors/hadron_inelastic/src/G4HadronPhysicsQGSP_BIC.cc.o
[98%] Building CXX object source/CMakeFiles/G4physicslists.dir/physics_lists/constructors/hadron_inelastic/src/G4HadronPhysicsQGSP_BIC_HP.cc.o
10 errors generated.
make[2]: *** [source/CMakeFiles/G4OpenGL.dir/build.make:331: source/CMakeFiles/G4OpenGL.dir/visualization/OpenGL/src/G4OpenGLImmediateQtViewer.cc.o] Error 1
[98%] Building CXX object source/CMakeFiles/G4physicslists.dir/physics_lists/constructors/hadron_inelastic/src/G4HadronPhysicsQGSP_FTFP_BERT.cc.o
[98%] Building CXX object source/CMakeFiles/G4physicslists.dir/physics_lists/constructors/hadron_inelastic/src/G4HadronPhysicsINCLXX.cc.o
In file included from /Users/edwardt/Documents/Geant4/geant4-v11.2.2/source/visualization/OpenGL/src/G4OpenGLQtExportDialog.cc:38:
/opt/homebrew/Cellar/qt@5/5.15.16/lib/QtWidgets.framework/Headers/qlayout.h:129:5: error: unknown type name 'QT6_VIRTUAL'
  129 | QT6_VIRTUAL int indexOf(QLayoutItem *) const;
      | ^
/opt/homebrew/Cellar/qt@5/5.15.16/lib/QtWidgets.framework/Headers/qlayout.h:134:5: error: unknown type name 'QT6_VIRTUAL'
  134 | QT6_VIRTUAL QLayoutItem *replaceWidget(QWidget *from, QWidget *to,
      | ^
/opt/homebrew/Cellar/qt@5/5.15.16/lib/QtWidgets.framework/Headers/qlayout.h:134:28: error: expected ';' at end of declaration list
  134 | QT6_VIRTUAL QLayoutItem *replaceWidget(QWidget *from, QWidget *to,
      | ^
/opt/homebrew/Cellar/qt@5/5.15.16/lib/QtWidgets.framework/Headers/qlayout.h:163:41: error: must use 'class' tag to refer to type 'QLayoutItem' in this scope
  163 | static void activateRecursiveHelper(QLayoutItem *item);
      | ^
/opt/homebrew/Cellar/qt@5/5.15.16/lib/QtWidgets.framework/Headers/qlayout.h:134:17: note: class 'QLayoutItem' is hidden by a non-type declaration of 'QLayoutItem' here
  134 | QT6_VIRTUAL QLayoutItem *replaceWidget(QWidget *from, QWidget *to,
      | ^
In file included from /Users/edwardt/Documents/Geant4/geant4-v11.2.2/source/visualization/OpenGL/src/G4OpenGLQtExportDialog.cc:38:
In file included from /opt/homebrew/Cellar/qt@5/5.15.16/lib/QtWidgets.framework/Headers/qlayout.h:173:
/opt/homebrew/include/QtWidgets/qboxlayout.h:41:18: error: must use 'class' tag to refer to type 'QLayoutItem' in this scope
   41 | void addItem(QLayoutItem *) override;
      | ^
/opt/homebrew/Cellar/qt@5/5.15.16/lib/QtWidgets.framework/Headers/qlayout.h:134:17: note: class 'QLayoutItem' is hidden by a non-type declaration of 'QLayoutItem' here
  134 | QT6_VIRTUAL QLayoutItem *replaceWidget(QWidget *from, QWidget *to,
      | ^
In file included from /Users/edwardt/Documents/Geant4/geant4-v11.2.2/source/visualization/OpenGL/src/G4OpenGLQtExportDialog.cc:38:
In file included from /opt/homebrew/Cellar/qt@5/5.15.16/lib/QtWidgets.framework/Headers/qlayout.h:173:
/opt/homebrew/include/QtWidgets/qboxlayout.h:48:32: error: must use 'class' tag to refer to type 'QLayoutItem' in this scope
   48 | void insertItem(int index, QLayoutItem *);
      | ^
/opt/homebrew/Cellar/qt@5/5.15.16/lib/QtWidgets.framework/Headers/qlayout.h:134:17: note: class 'QLayoutItem' is hidden by a non-type declaration of 'QLayoutItem' here
  134 | QT6_VIRTUAL QLayoutItem *replaceWidget(QWidget *from, QWidget *to,
      | ^
In file included from /Users/edwardt/Documents/Geant4/geant4-v11.2.2/source/visualization/OpenGL/src/G4OpenGLQtExportDialog.cc:38:
In file included from /opt/homebrew/Cellar/qt@5/5.15.16/lib/QtWidgets.framework/Headers/qlayout.h:173:
/opt/homebrew/include/QtWidgets/qboxlayout.h:50:25: error: only virtual member functions can be marked 'override'
   50 | int spacing() const override;
      | ^
/opt/homebrew/include/QtWidgets/qboxlayout.h:51:34: error: only virtual member functions can be marked 'override'
   51 | void setSpacing(int spacing) override;
      | ^
/opt/homebrew/include/QtWidgets/qboxlayout.h:68:5: error: must use 'class' tag to refer to type 'QLayoutItem' in this scope
   68 | QLayoutItem *itemAt(int) const override;
      | ^
/opt/homebrew/Cellar/qt@5/5.15.16/lib/QtWidgets.framework/Headers/qlayout.h:134:17: note: class 'QLayoutItem' is hidden by a non-type declaration of 'QLayoutItem' here
  134 | QT6_VIRTUAL QLayoutItem *replaceWidget(QWidget *from, QWidget *to,
      | ^
In file included from /Users/edwardt/Documents/Geant4/geant4-v11.2.2/source/visualization/OpenGL/src/G4OpenGLQtExportDialog.cc:38:
In file included from /opt/homebrew/Cellar/qt@5/5.15.16/lib/QtWidgets.framework/Headers/qlayout.h:173:
/opt/homebrew/include/QtWidgets/qboxlayout.h:69:5: error: must use 'class' tag to refer to type 'QLayoutItem' in this scope
   69 | QLayoutItem *takeAt(int) override;
      | ^
/opt/homebrew/Cellar/qt@5/5.15.16/lib/QtWidgets.framework/Headers/qlayout.h:134:17: note: class 'QLayoutItem' is hidden by a non-type declaration of 'QLayoutItem' here
  134 | QT6_VIRTUAL QLayoutItem *replaceWidget(QWidget *from, QWidget *to,
      | ^
In file included from /Users/edwardt/Documents/Geant4/geant4-v11.2.2/source/visualization/OpenGL/src/G4OpenGLQtExportDialog.cc:38:
In file included from /opt/homebrew/Cellar/qt@5/5.15.16/lib/QtWidgets.framework/Headers/qlayout.h:174:
/opt/homebrew/include/QtWidgets/qgridlayout.h:39:34: error: only virtual member functions can be marked 'override'
   39 | void setSpacing(int spacing) override;
      | ^
/opt/homebrew/include/QtWidgets/qgridlayout.h:40:25: error: only virtual member functions can be marked 'override'
   40 | int spacing() const override;
      | ^
/opt/homebrew/include/QtWidgets/qgridlayout.h:73:5: error: must use 'class' tag to refer to type 'QLayoutItem' in this scope
   73 | QLayoutItem *itemAt(int index) const override;
      | ^
/opt/homebrew/Cellar/qt@5/5.15.16/lib/QtWidgets.framework/Headers/qlayout.h:134:17: note: class 'QLayoutItem' is hidden by a non-type declaration of 'QLayoutItem' here
  134 | QT6_VIRTUAL QLayoutItem *replaceWidget(QWidget *from, QWidget *to,
      | ^
In file included from /Users/edwardt/Documents/Geant4/geant4-v11.2.2/source/visualization/OpenGL/src/G4OpenGLQtExportDialog.cc:38:
In file included from /opt/homebrew/Cellar/qt@5/5.15.16/lib/QtWidgets.framework/Headers/qlayout.h:174:
/opt/homebrew/include/QtWidgets/qgridlayout.h:74:5: error: must use 'class' tag to refer to type 'QLayoutItem' in this scope
   74 | QLayoutItem *itemAtPosition(int row, int column) const;
      | ^
/opt/homebrew/Cellar/qt@5/5.15.16/lib/QtWidgets.framework/Headers/qlayout.h:134:17: note: class 'QLayoutItem' is hidden by a non-type declaration of 'QLayoutItem' here
  134 | QT6_VIRTUAL QLayoutItem *replaceWidget(QWidget *from, QWidget *to,
      | ^
In file included from /Users/edwardt/Documents/Geant4/geant4-v11.2.2/source/visualization/OpenGL/src/G4OpenGLQtExportDialog.cc:38:
In file included from /opt/homebrew/Cellar/qt@5/5.15.16/lib/QtWidgets.framework/Headers/qlayout.h:174:
/opt/homebrew/include/QtWidgets/qgridlayout.h:75:5: error: must use 'class' tag to refer to type 'QLayoutItem' in this scope
   75 | QLayoutItem *takeAt(int index) override;
      | ^
/opt/homebrew/Cellar/qt@5/5.15.16/lib/QtWidgets.framework/Headers/qlayout.h:134:17: note: class 'QLayoutItem' is hidden by a non-type declaration of 'QLayoutItem' here
  134 | QT6_VIRTUAL QLayoutItem *replaceWidget(QWidget *from, QWidget *to,
      | ^
In file included from /Users/edwardt/Documents/Geant4/geant4-v11.2.2/source/visualization/OpenGL/src/G4OpenGLQtExportDialog.cc:38:
In file included from /opt/homebrew/Cellar/qt@5/5.15.16/lib/QtWidgets.framework/Headers/qlayout.h:174:
/opt/homebrew/include/QtWidgets/qgridlayout.h:79:18: error: must use 'class' tag to refer to type 'QLayoutItem' in this scope
   79 | void addItem(QLayoutItem *item, int row, int column, int rowSpan = 1, int columnSpan = 1, Qt::Alignment = Qt::Alignment());
      | ^
/opt/homebrew/Cellar/qt@5/5.15.16/lib/QtWidgets.framework/Headers/qlayout.h:134:17: note: class 'QLayoutItem' is hidden by a non-type declaration of 'QLayoutItem' here
  134 | QT6_VIRTUAL QLayoutItem *replaceWidget(QWidget *from, QWidget *to,
      | ^
In file included from /Users/edwardt/Documents/Geant4/geant4-v11.2.2/source/visualization/OpenGL/src/G4OpenGLQtExportDialog.cc:38:
In file included from /opt/homebrew/Cellar/qt@5/5.15.16/lib/QtWidgets.framework/Headers/qlayout.h:174:
/opt/homebrew/include/QtWidgets/qgridlayout.h:85:18: error: must use 'class' tag to refer to type 'QLayoutItem' in this scope
   85 | void addItem(QLayoutItem *) override;
      | ^
/opt/homebrew/Cellar/qt@5/5.15.16/lib/QtWidgets.framework/Headers/qlayout.h:134:17: note: class 'QLayoutItem' is hidden by a non-type declaration of 'QLayoutItem' here
  134 | QT6_VIRTUAL QLayoutItem *replaceWidget(QWidget *from, QWidget *to,
      | ^
In file included from /Users/edwardt/Documents/Geant4/geant4-v11.2.2/source/visualization/OpenGL/src/G4OpenGLQtExportDialog.cc:38:
In file included from /opt/homebrew/Cellar/qt@5/5.15.16/lib/QtWidgets.framework/Headers/qlayout.h:174:
/opt/homebrew/include/QtWidgets/qgridlayout.h:64:50: error: cannot initialize object parameter of type 'QLayout' with an expression of type 'QGridLayout'
   64 | inline void addWidget(QWidget *w) { QLayout::addWidget(w); }
      | ^ ~~~~~~~~
In file included from /Users/edwardt/Documents/Geant4/geant4-v11.2.2/source/visualization/OpenGL/src/G4OpenGLQtExportDialog.cc:46:
/Users/edwardt/Documents/Geant4/geant4-v11.2.2-build/source/G4OpenGL_autogen/include/moc_G4OpenGLQtExportDialog.cpp:16:2: error: "This file was generated using the moc from 5.15.16. It"
   16 | #error "This file was generated using the moc from 5.15.16. It"
      | ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
[98%] Building CXX object source/CMakeFiles/G4physicslists.dir/physics_lists/constructors/hadron_inelastic/src/G4HadronPhysicsShielding.cc.o
make[2]: *** [source/CMakeFiles/G4OpenGL.dir/build.make:359: source/CMakeFiles/G4OpenGL.dir/visualization/OpenGL/src/G4OpenGLQtExportDialog.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:2358: source/CMakeFiles/G4OpenGL.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

```

and  
`make install`

which resulted in:

```auto
[97%] Building CXX object source/CMakeFiles/G4ToolsSG.dir/visualization/ToolsSG/src/G4ToolsSGQtGLESViewer.cc.o
In file included from /Users/edwardt/Documents/Geant4/geant4-v11.2.2/source/visualization/ToolsSG/src/G4ToolsSGQtGLESViewer.cc:28:
/Users/edwardt/Documents/Geant4/geant4-v11.2.2-build/source/G4ToolsSG_autogen/include/moc_G4ToolsSGQtGLESViewer.cpp:16:2: error: "This file was generated using the moc from 5.15.16. It"
   16 | #error "This file was generated using the moc from 5.15.16. It"
      | ^
/Users/edwardt/Documents/Geant4/geant4-v11.2.2-build/source/G4ToolsSG_autogen/include/moc_G4ToolsSGQtGLESViewer.cpp:17:2: error: "cannot be used with the include files from this version of Qt."
   17 | #error "cannot be used with the include files from this version of Qt."
      | ^
/Users/edwardt/Documents/Geant4/geant4-v11.2.2-build/source/G4ToolsSG_autogen/include/moc_G4ToolsSGQtGLESViewer.cpp:18:2: error: "(The moc has changed too much.)"
   18 | #error "(The moc has changed too much.)"
      | ^
/Users/edwardt/Documents/Geant4/geant4-v11.2.2-build/source/G4ToolsSG_autogen/include/moc_G4ToolsSGQtGLESViewer.cpp:35:1: error: use of undeclared identifier 'Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET'
   35 | QT_MOC_LITERAL(0, 0, 26), // "G4ToolsSGQtDestroyCallback"
      | ^
/Users/edwardt/Documents/Geant4/geant4-v11.2.2-build/source/G4ToolsSG_autogen/include/moc_G4ToolsSGQtGLESViewer.cpp:29:5: note: expanded from macro 'QT_MOC_LITERAL'
   29 | Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
      | ^
/Users/edwardt/Documents/Geant4/geant4-v11.2.2-build/source/G4ToolsSG_autogen/include/moc_G4ToolsSGQtGLESViewer.cpp:36:1: error: use of undeclared identifier 'Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET'
   36 | QT_MOC_LITERAL(1, 27, 7), // "execute"
      | ^
/Users/edwardt/Documents/Geant4/geant4-v11.2.2-build/source/G4ToolsSG_autogen/include/moc_G4ToolsSGQtGLESViewer.cpp:29:5: note: expanded from macro 'QT_MOC_LITERAL'
   29 | Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
      | ^
/Users/edwardt/Documents/Geant4/geant4-v11.2.2-build/source/G4ToolsSG_autogen/include/moc_G4ToolsSGQtGLESViewer.cpp:37:1: error: use of undeclared identifier 'Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET'
   37 | QT_MOC_LITERAL(2, 35, 0) // ""
      | ^
/Users/edwardt/Documents/Geant4/geant4-v11.2.2-build/source/G4ToolsSG_autogen/include/moc_G4ToolsSGQtGLESViewer.cpp:29:5: note: expanded from macro 'QT_MOC_LITERAL'
   29 | Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
      | ^
/Users/edwardt/Documents/Geant4/geant4-v11.2.2-build/source/G4ToolsSG_autogen/include/moc_G4ToolsSGQtGLESViewer.cpp:79:1: error: unknown type name 'QT_INIT_METAOBJECT'
   79 | QT_INIT_METAOBJECT const QMetaObject G4ToolsSGQtDestroyCallback::staticMetaObject = { {
      | ^
/Users/edwardt/Documents/Geant4/geant4-v11.2.2-build/source/G4ToolsSG_autogen/include/moc_G4ToolsSGQtGLESViewer.cpp:79:37: error: expected ';' after top level declarator
   79 | QT_INIT_METAOBJECT const QMetaObject G4ToolsSGQtDestroyCallback::staticMetaObject = { {
      | ^
8 errors generated.
make[2]: *** [source/CMakeFiles/G4ToolsSG.dir/build.make:149: source/CMakeFiles/G4ToolsSG.dir/visualization/ToolsSG/src/G4ToolsSGQtGLESViewer.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:2310: source/CMakeFiles/G4ToolsSG.dir/all] Error 2
make: *** [Makefile:156: all] Error 2

```

is this a problem with qt5? - I remember there was an issue about this - I assume I have to do: [Errors while building geant4 with qt5 - #6 by bmorgan](https://geant4-forum.web.cern.ch/t/errors-while-building-geant4-with-qt5/7031/6)

doing

```auto
edwardt@onc-0986 geant4-v11.2.2-build % ccmake -S ../geant4-v11.2.2

```

```auto
 QT_DIR /opt/homebrew/Cellar/qt@5/5.15.16/lib/cmake/Qt5                                                                                                                                                                                              
... (ran out of characters to give the rest) ...                                                                                                                                                                                 
 Qt5_DIR /opt/homebrew/Cellar/qt@5/5.15.16/lib/cmake/Qt5  

```

---

_[View the full topic](https://geant4-forum.web.cern.ch/t/macos-sequoia-15-1-installing-geant4/13255)._
