Please fill out the following information to help in answering your question, and also see tips for posting code snippets. If you don’t provide this information it will take more time to help with your problem!
_Geant4 Version:11.2.2
_Operating System: macos
I’ve recently upgrade qt@5 from homebrew, it cause errors.
─ make -j4
[ 5%] Building CXX object B3b/CMakeFiles/exampleB3b.dir/exampleB3b.cc.o
[ 11%] Building CXX object B3b/CMakeFiles/exampleB3b.dir/src/ActionInitialization.cc.o
[ 22%] Building CXX object B3a/CMakeFiles/exampleB3a.dir/exampleB3a.cc.o
[ 22%] Building CXX object B3a/CMakeFiles/exampleB3a.dir/src/ActionInitialization.cc.o
[ 33%] Building CXX object B3a/CMakeFiles/exampleB3a.dir/src/DetectorConstruction.cc.o
[ 33%] Building CXX object B3b/CMakeFiles/exampleB3b.dir/src/DetectorConstruction.cc.o
In file included from In file included from /Users/chenxu/software/Geant4/g4/install/share/Geant4/examples/basic/B3/B3b/exampleB3b.cc/Users/chenxu/software/Geant4/g4/install/share/Geant4/examples/basic/B3/B3a/exampleB3a.cc::3535:
:
In file included from In file included from /Users/chenxu/software/Geant4/install/include/Geant4/G4VisExecutive.hh/Users/chenxu/software/Geant4/install/include/Geant4/G4VisExecutive.hh:141:
In file included from /Users/chenxu/software/Geant4/install/include/Geant4/G4VisExecutive.icc:142:141:
In file included from /Users/chenxu/software/Geant4/install/include/Geant4/G4VisExecutive.icc:142:
:
In file included from /opt/homebrew/opt/qt@5/lib/QtCore.framework/Headers/QtGlobal:1In file included from :
/opt/homebrew/opt/qt@5/lib/QtCore.framework/Headers/QtGlobal:/opt/homebrew/opt/qt@5/lib/QtCore.framework/Headers/qglobal.h1:
:401/opt/homebrew/opt/qt@5/lib/QtCore.framework/Headers/qglobal.h::401:11: error: 'maybe_unused' attribute cannot be applied to types
11: 401error: | co'maybe_unused' attribute cannot be applied to typesns
texp 401 | constexprr Q_DECL _QU_NDUESCELD_ UNUSED Deprecated_t Deprecated = {};
| ^
/opt/homebrew/include/QtCore/qcompilerdetection.h:984:27: note: expanded from macro 'Q_DECL_UNUSED'
984 | # define Q_DECL_UNUSED [[maybe_unused]]
| ^
Deprecated_t Deprecated = {};
| ^
/opt/homebrew/include/QtCore/qcompilerdetection.h:984:27: note: expanded from macro 'Q_DECL_UNUSED'
984 | # define Q_DECL_UNUSED [[maybe_unused]]
| ^
In file included from /Users/chenxu/software/Geant4/g4/install/share/Geant4/examples/basic/B3/B3a/exampleB3a.cc:35:
In file included from /Users/chenxu/software/Geant4/install/include/Geant4/G4VisExecutive.hh:141:
In file included from /Users/chenxu/software/Geant4/install/include/Geant4/G4VisExecutive.icc:142:
In file included from /opt/homebrew/opt/qt@5/lib/QtCore.framework/Headers/QtGlobal:1:
/opt/homebrew/opt/qt@5/lib/QtCore.framework/Headers/qglobal.h:902:50: error: an attribute list cannot appear here
902 | Q_REQUIRED_RESULT Q_DECL_CONSTEXPR static inline Q_DECL_UNUSED bool qFuzzyCompare(double p1, double p2)
| ^~~~~~~~~~~~~
/opt/homebrew/include/QtCore/qcompilerdetection.h:984:25: note: expanded from macro 'Q_DECL_UNUSED'
984 | # define Q_DECL_UNUSED [[maybe_uIn file included from /Users/chenxu/software/Geant4/g4/install/share/Geant4/examples/basic/B3/B3b/exampleB3b.cc:35nused]:
In file included from /Users/chenxu/software/Geant4/install/include/Geant4/G4VisExecutive.hh:]141
| :
In file included from ^~~~~~~~~~~~~~~~/Users/chenxu/software/Geant4/install/include/Geant4/G4VisExecutive.icc
:142:
In file included from /opt/homebrew/opt/qt@5/lib/QtCore.framework/Headers/QtGlobal:1:
/opt/homebrew/opt/qt@5/lib/QtCore.framework/Headers/qglobal.h:902:50: error: an attribute list cannot appear here
902 | Q_REQUIRED_RESULT Q_DECL_CONSTEXPR static inline Q_DECL_UNUSED bool qFuzzyCompare(double p1, double p2)
| In file included from /Users/chenxu/software/Geant4/g4/install/share/Geant4/examples/basic/B3/B3a/exampleB3a.cc:35:
In file included from /Users/chenxu/software/Geant4/install/include/Geant4/G4VisExecutive.hh:141:
In file included from /Users/chenxu/software/Geant4/install/include/Geant4/G4VisExecutive.icc:142:
In file included from /opt/homebrew/opt/qt@5/lib/QtCore.framework/Headers/QtGlobal:1:
/opt/homebrew/opt/qt@5/lib/QtCore.framework/Headers/qglobal.h:907:50: error: an attribute list cannot appear here
907 | Q_REQUIRED_RESULT Q_DECL_CONSTEXPR static inline Q_DECL_UNUSED ^~~~~~~~~~~~~ bool qFuzzyCo
mpare(flo/opt/homebrew/include/QtCore/qcompilerdetection.ha:984:25:t pnote: expanded from macro 'Q_DECL_UNUSED'1,
flo 984a | # t p2)define Q_DE
| ^~~~~~~~~~~~~
CL_UNU/opt/homebrew/include/QtCore/qcompilerdetection.hS:E984D:25: note: expanded from macro 'Q_DECL_UNUSED'
984 | # d[e[maybfei_nuen Qu_sDeEdC]L_UNUSED [[maybe_u]nu
s e| d] ^~~~~~~~~~~~~~~~]
| ^~~~~~~~~~~~~~~~
In file included from /Users/chenxu/software/Geant4/g4/install/share/Geant4/examples/basic/B3/B3a/exampleB3a.cc:35:
In file included from /Users/chenxu/software/Geant4/install/include/Geant4/G4VisExecutive.hh:141:
In file included from /Users/chenxu/software/Geant4/install/include/Geant4/G4VisExecutive.icc:142:
In file included from /opt/homebrew/opt/qt@5/lib/QtCore.framework/Headers/QtGlobal:1:
/opt/homebrew/opt/qt@5/lib/QtCore.framework/Headers/qglobal.h:912:50: error: an attribute list cannot appear here
In file included from 912 | Q_REQUIRED/Users/chenxu/software/Geant4/g4/install/share/Geant4/examples/basic/B3/B3b/exampleB3b.cc_RESULT Q_DECL_:CONSTEXPR static inline Q_DECL35_:
UIn file included from N/Users/chenxu/software/Geant4/install/include/Geant4/G4VisExecutive.hhU:S141:
In file included from /Users/chenxu/software/Geant4/install/include/Geant4/G4VisExecutive.icc:142ED:
In file included from /opt/homebrew/opt/qt@5/lib/QtCore.framework/Headers/QtGlobal:1:
bool qFuzzyIsNull(double d)
| ^~~~~~~~~~~~~
/opt/homebrew/include/QtCore/qcompilerdetection.h:984:25: note: expanded from macro 'Q_DECL_UNUSED'
984 | # de/opt/homebrew/opt/qt@5/lib/QtCore.framework/Headers/qglobal.h:907:50: error: an attribute list cannot appear here
fine 907Q | _QDECL_UNUS_REQUIED [[RED_mayRbEeSULT _Qu_nDuEsCeLd_]C]ON
S T| EX ^~~~~~~~~~~~~~~~P
R static inline Q_DECIn file included from L/Users/chenxu/software/Geant4/g4/install/share/Geant4/examples/basic/B3/B3a/exampleB3a.cc_:U35N:
UIn file included from S/Users/chenxu/software/Geant4/install/include/Geant4/G4VisExecutive.hhE:D141 :
bIn file included from o/Users/chenxu/software/Geant4/install/include/Geant4/G4VisExecutive.icco:l142 :
qIn file included from F/opt/homebrew/opt/qt@5/lib/QtCore.framework/Headers/QtGlobalu:z1z:
yC/opt/homebrew/opt/qt@5/lib/QtCore.framework/Headers/qglobal.ho:m917p:a50r:e (flerror: oatan attribute list cannot appear here p
1, f l917o | aQt_ RpE2Q)U
| ^~~~~~~~~~~~~
IRED_RESULT Q_DECL_CONSTEXPR stat/opt/homebrew/include/QtCore/qcompilerdetection.hi:c984 :i25: note: expanded from macro 'Q_DECL_UNUSED'
n 984 | # l idneefin eQ _QD_EDCELC_LU_NUUNSUESED [D boo[mal qFuzzyIsNyublel_(unused]]
| ^~~~~~~~~~~~~~~~
float f)
| ^~~~~~~~~~~~~
/opt/homebrew/include/QtCore/qcompilerdetection.h:984:25: note: expanded from macro 'Q_DECL_UNUSED'
984 | # define Q_DECL_UNUSED [[maybe_unused]]
| ^~~~~~~~~~~~~~~~
In file included from /Users/chenxu/software/Geant4/g4/install/share/Geant4/examples/basic/B3/B3b/exampleB3b.cc:35:
In file included from /Users/chenxu/software/Geant4/install/include/Geant4/G4VisExecutive.hh:141:
In file included from /Users/chenxu/software/Geant4/install/include/Geant4/G4VisExecutive.icc:142:
In file included from /opt/homebrew/opt/qt@5/lib/QtCore.framework/Headers/QtGlobal:1:
/opt/homebrew/opt/qt@5/lib/QtCore.framework/Headers/qglobal.h:912:50: error: an attribute list cannot appear here
In file included from /Users/chenxu/software/Geant4/g4/install/share/Geant4/examples/basic/B3/B3a/exampleB3a.cc:35 912 | Q_R:
EIn file included from Q/Users/chenxu/software/Geant4/install/include/Geant4/G4VisExecutive.hhU:I141R:
EIn file included from D/Users/chenxu/software/Geant4/install/include/Geant4/G4VisExecutive.icc_:R142E:
SIn file included from U/opt/homebrew/opt/qt@5/lib/QtCore.framework/Headers/QtGlobalL:T1 :
Q_/opt/homebrew/opt/qt@5/lib/QtCore.framework/Headers/qglobal.hD:E927C:L50_:C ONSerror: TEXan attribute list cannot appear herePR
stat i927c | Qi_nRlEiQnUeI RQE_DD_RESUELCTL _QU_NDUESCELD_ CbOoNoSlT EqXFPuRz zsytIastNic inluilnle( douQ_bDlECL_UNUSED eb d)ool
q| Is ^~~~~~~~~~~~~N
ull(do/opt/homebrew/include/QtCore/qcompilerdetection.hu:ble d984:25: note: ) noexpanded from macro 'Q_DECL_UNUSED'
e x984c | e#pt
| ^~~~~~~~~~~~~
/opt/homebrew/include/QtCore/qcompilerdetection.h :d984e:f25i:n enote: expanded from macro 'Q_DECL_UNUSED'Q_
984 | # define QDEC_LD_EUCNLU_SUENUSEDD [[m [[maybe_uanuybes_eudn]u]
| ^~~~~~~~~~~~~~~~
sed]]
| ^~~~~~~~~~~~~~~~
In file included from /Users/chenxu/software/Geant4/g4/install/share/Geant4/examples/basic/B3/B3a/exampleB3a.cc:35:
In file included from /Users/chenxu/software/Geant4/install/include/Geant4/G4VisExecutive.hh:141:
In file included from /Users/chenxu/software/Geant4/install/include/Geant4/G4VisExecutive.icc:142:
In file included from /opt/homebrew/opt/qt@5/lib/QtCore.framework/Headers/QtGlobal:1:
/opt/homebrew/opt/qt@5/lib/QtCore.framework/Headers/qglobal.h:932:50: error: an attribute list cannot appear here
932 | In file included from Q/Users/chenxu/software/Geant4/g4/install/share/Geant4/examples/basic/B3/B3b/exampleB3b.cc:35_:
REQUIn file included from I/Users/chenxu/software/Geant4/install/include/Geant4/G4VisExecutive.hhR:E141D:
_In file included from R/Users/chenxu/software/Geant4/install/include/Geant4/G4VisExecutive.iccESUL:T142 :
QIn file included from _/opt/homebrew/opt/qt@5/lib/QtCore.framework/Headers/QtGlobalD:E1CL_CONSTEXPR static in:
line Q_DECL_UNUSED bool qIsNull(float/opt/homebrew/opt/qt@5/lib/QtCore.framework/Headers/qglobal.h:917:50: f) error: noexcepan attribute list cannot appear here
t
| 917 | Q_ ^~~~~~~~~~~~~R
EQUI/opt/homebrew/include/QtCore/qcompilerdetection.h:984RED_:25:RESU note: expanded from macro 'Q_DECL_UNUSED'
L 984 | T# Q _dDeECL_CONSTfEXiPnRe sQt_aDtEiCcL _iUnNlUine Q_SED [[mDaECL_Uybe_NUSED booul nuseqFud]]
| ^~~~~~~~~~~~~~~~
zzyIsNull(float f)
| ^~~~~~~~~~~~~
/opt/homebrew/include/QtCore/qcompilerdetection.h:984:25: note: expanded from macro 'Q_DECL_UNUSED'
984 | # define Q_DECL_UNUSED [[maybe_unused]]
| ^~~~~~~~~~~~~~~~
In file included from /Users/chenxu/software/Geant4/g4/install/share/Geant4/examples/basic/B3/B3b/exampleB3b.cc:35:
In file included from /Users/chenxu/software/Geant4/install/include/Geant4/G4VisExecutive.hh:141:
In file included from /Users/chenxu/software/Geant4/install/include/Geant4/G4VisExecutive.icc:142:
In file included from /opt/homebrew/opt/qt@5/lib/QtCore.framework/Headers/QtGlobal:1:
/opt/homebrew/opt/qt@5/lib/QtCore.framework/Headers/qglobal.h:927:50: error: an attribute list cannot appear here
927 | Q_REQUIRED_RESULT Q_DECL_CONSTEXPR static inline Q_DECL_UNUSED bool qIsNull(double d) noexcept
| ^~~~~~~~~~~~~
/opt/homebrew/include/QtCore/qcompilerdetection.h:984:25: note: expanded from macro 'Q_DECL_UNUSED'
984 | # define Q_DECL_UNUSED [[maybe_unused]]
| ^~~~~~~~~~~~~~~~
In file included from /Users/chenxu/software/Geant4/g4/install/share/Geant4/examples/basic/B3/B3b/exampleB3b.cc:35:
In file included from /Users/chenxu/software/Geant4/install/include/Geant4/G4VisExecutive.hh:141:
In file included from /Users/chenxu/software/Geant4/install/include/Geant4/G4VisExecutive.icc:142:
In file included from /opt/homebrew/opt/qt@5/lib/QtCore.framework/Headers/QtGlobal:1:
/opt/homebrew/opt/qt@5/lib/QtCore.framework/Headers/qglobal.h:932:50: error: an attribute list cannot appear here
932 | Q_REQUIRED_RESULT Q_DECL_CONSTEXPR static inline Q_DECL_UNUSED bool qIsNull(float f) noexcept
| ^~~~~~~~~~~~~
/opt/homebrew/include/QtCore/qcompilerdetection.h:984:25: note: expanded from macro 'Q_DECL_UNUSED'
984 | # define Q_DECL_UNUSED [[maybe_unused]]
| ^~~~~~~~~~~~~~~~
In file included from /Users/chenxu/software/Geant4/g4/install/share/Geant4/examples/basic/B3/B3a/exampleB3a.cc:35:
In file included from /Users/chenxu/software/Geant4/install/include/Geant4/G4VisExecutive.hh:141:
In file included from /Users/chenxu/software/Geant4/install/include/Geant4/G4VisExecutive.icc:142:
In file included from /opt/homebrew/opt/qt@5/lib/QtCore.framework/Headers/QtGlobal:1:
/opt/homebrew/opt/qt@5/lib/QtCore.framework/Headers/qglobal.h:1254:41: error: 'maybe_unused' attribute cannot be applied to types
1254 | template <typename... Args> Q_CONSTEXPR Q_DECL_UNUSED QOverload<Args...> qOverload = {};
| ^
/opt/homebrew/include/QtCore/qcompilerdetection.h:984:27: note: expanded from macro 'Q_DECL_UNUSED'
984 | # define Q_DECL_UNUSED [[maybe_unused]]
| ^
In file included from /Users/chenxu/software/Geant4/g4/install/share/Geant4/examples/basic/B3/B3a/exampleB3a.cc:35:
In file included from /Users/chenxu/software/Geant4/install/include/Geant4/G4VisExecutive.hh:141:
In file included from /Users/chenxu/software/Geant4/install/include/Geant4/G4VisExecutive.icc:142:
In file included from /opt/homebrew/opt/qt@5/lib/QtCore.framework/Headers/QtGlobal:1:
/opt/homebrew/opt/qt@5/lib/QtCore.framework/Headers/qglobal.h:1255:41: error: 'maybe_unused' attribute cannot be applied to types
1255 | template <typename... Args> Q_CONSTEXPR Q_DECL_UNUSED QConstOverload<Args...> qConstOverload = {};
| ^
/opt/homebrew/include/QtCore/qcompilerdetection.h:984:27: note: expanded from macro 'Q_DECL_UNUSED'
984 | # define Q_DECL_UNUSED [[maybe_unused]]
| ^
In file included from /Users/chenxu/software/Geant4/g4/install/share/Geant4/examples/basic/B3/B3a/exampleB3a.cc:35:
In file included from /Users/chenxu/software/Geant4/install/include/Geant4/G4VisExecutive.hh:141:
In file included from /Users/chenxu/software/Geant4/install/include/Geant4/G4VisExecutive.icc:142:
In file included from /opt/homebrew/opt/qt@5/lib/QtCore.framework/Headers/QtGlobal:1:
/opt/homebrew/opt/qt@5/lib/QtCore.framework/Headers/qglobal.h:1256:41: error: 'maybe_unused' attribute cannot be applied to types
1256 | template <typename... Args> Q_CONSTEXPR Q_DECL_UNUSED QNonConstOverload<Args...> qNonConstOverload = {};
| ^
/opt/homebrew/include/QtCore/qcompilerdetection.h:984:27: note: expanded from macro 'Q_DECL_UNUSED'
984In file included from /Users/chenxu/software/Geant4/g4/install/share/Geant4/examples/basic/B3/B3b/exampleB3b.cc:35 | :
#In file included from /Users/chenxu/software/Geant4/install/include/Geant4/G4VisExecutive.hh :d141e:
fIn file included from ine Q_DECL_/Users/chenxu/software/Geant4/install/include/Geant4/G4VisExecutive.icc:142:
UNUSEIn file included from /opt/homebrew/opt/qt@5/lib/QtCore.framework/Headers/QtGlobal:1D [[:
ma/opt/homebrew/opt/qt@5/lib/QtCore.framework/Headers/qglobal.hy:b1254e:_41u:n f quint32 Unsigned; typedef qint32 Signed; };
|
^
......
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
20 errors generated.
make[2]: make[2]: *** [B3a/CMakeFiles/exampleB3a.dir/exampleB3a.cc.o] Error 1*** [B3b/CMakeFiles/exampleB3b.dir/exampleB3b.cc.o] Error 1