Qbs - fatal error: QtScript/qscriptvalue.h: No such file or directory
-
I successfully installed Qt6, which seems to have removed QtScript?
Anyway, I was trying to build Qbs 1.22.1, just released on 29-Apr-2022 12:54 . While I was trying to build Qbs, I got these ERROR messages:
In file included from ....../qbs-src-1.22.1/src/lib/corelib/buildgraph/buildgraph.cpp:39: ....../qbs-src-1.22.1/src/lib/corelib/buildgraph/buildgraph.h:48:10: fatal error: QtScript/qscriptvalue.h: No such file or directory 48 | #include <QtScript/qscriptvalue.h> | ^~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. make[2]: *** [src/lib/corelib/CMakeFiles/qbscore.dir/build.make:317: src/lib/corelib/CMakeFiles/qbscore.dir/buildgraph/buildgraph.cpp.o] Error 1 make[2]: *** Waiting for unfinished jobs.... In file included from ....../qbs-src-1.22.1/src/lib/corelib/buildgraph/artifactsscriptvalue.cpp:39: ....../qbs-src-1.22.1/src/lib/corelib/buildgraph/artifactsscriptvalue.h:44:10: fatal error: QtScript/qscriptvalue.h: No such file or directory 44 | #include <QtScript/qscriptvalue.h> | ^~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. make[2]: *** [src/lib/corelib/CMakeFiles/qbscore.dir/build.make:289: src/lib/corelib/CMakeFiles/qbscore.dir/buildgraph/artifactsscriptvalue.cpp.o] Error 1 In file included from ....../qbs-src-1.22.1/src/lib/corelib/buildgraph/abstractcommandexecutor.cpp:43: ....../qbs-src-1.22.1/src/lib/corelib/buildgraph/rulecommands.h:54:10: fatal error: QtScript/qscriptvalue.h: No such file or directory 54 | #include <QtScript/qscriptvalue.h> | ^~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. make[2]: *** [src/lib/corelib/CMakeFiles/qbscore.dir/build.make:247: src/lib/corelib/CMakeFiles/qbscore.dir/buildgraph/abstractcommandexecutor.cpp.o] Error 1 In file included from ....../qbs-src-1.22.1/src/lib/corelib/buildgraph/transformer.h:47, from ....../qbs-src-1.22.1/src/lib/corelib/buildgraph/artifact.cpp:42: ....../qbs-src-1.22.1/src/lib/corelib/buildgraph/rulecommands.h:54:10: fatal error: QtScript/qscriptvalue.h: No such file or directory 54 | #include <QtScript/qscriptvalue.h> | ^~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. In file included from ....../qbs-src-1.22.1/src/lib/corelib/api/runenvironment.cpp:45: ....../qbs-src-1.22.1/src/lib/corelib/buildgraph/rulesevaluationcontext.h:48:10: fatal error: QtScript/qscriptprogram.h: No such file or directory 48 | #include <QtScript/qscriptprogram.h> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. make[2]: *** [src/lib/corelib/CMakeFiles/qbscore.dir/build.make:261: src/lib/corelib/CMakeFiles/qbscore.dir/buildgraph/artifact.cpp.o] Error 1 In file included from ....../qbs-src-1.22.1/src/lib/corelib/buildgraph/dependencyparametersscriptvalue.cpp:39: ....../qbs-src-1.22.1/src/lib/corelib/buildgraph/dependencyparametersscriptvalue.h:43:10: fatal error: QtScript/qscriptvalue.h: No such file or directory 43 | #include <QtScript/qscriptvalue.h> | ^~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. make[2]: *** [src/lib/corelib/CMakeFiles/qbscore.dir/build.make:219: src/lib/corelib/CMakeFiles/qbscore.dir/api/runenvironment.cpp.o] Error 1 make[2]: *** [src/lib/corelib/CMakeFiles/qbscore.dir/build.make:373: src/lib/corelib/CMakeFiles/qbscore.dir/buildgraph/dependencyparametersscriptvalue.cpp.o] Error 1 In file included from ....../qbs-src-1.22.1/src/lib/corelib/buildgraph/rescuableartifactdata.h:46, from ....../qbs-src-1.22.1/src/lib/corelib/buildgraph/buildgraphloader.h:45, from ....../qbs-src-1.22.1/src/lib/corelib/buildgraph/buildgraphloader.cpp:39: ....../qbs-src-1.22.1/src/lib/corelib/buildgraph/rulecommands.h:54:10: fatal error: QtScript/qscriptvalue.h: No such file or directory 54 | #include <QtScript/qscriptvalue.h> | ^~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. In file included from ....../qbs-src-1.22.1/src/lib/corelib/api/internaljobs.cpp:44: ....../qbs-src-1.22.1/src/lib/corelib/buildgraph/buildgraph.h:48:10: fatal error: QtScript/qscriptvalue.h: No such file or directory 48 | #include <QtScript/qscriptvalue.h> | ^~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. make[2]: *** [src/lib/corelib/CMakeFiles/qbscore.dir/build.make:345: src/lib/corelib/CMakeFiles/qbscore.dir/buildgraph/buildgraphloader.cpp.o] Error 1 make[2]: *** [src/lib/corelib/CMakeFiles/qbscore.dir/build.make:135: src/lib/corelib/CMakeFiles/qbscore.dir/api/internaljobs.cpp.o] Error 1 In file included from ....../qbs-src-1.22.1/src/lib/corelib/api/propertymap_p.h:43, from ....../qbs-src-1.22.1/src/lib/corelib/api/projectdata.cpp:42: ....../qbs-src-1.22.1/src/lib/corelib/language/language.h:67:10: fatal error: QtScript/qscriptvalue.h: No such file or directory 67 | #include <QtScript/qscriptvalue.h> | ^~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. In file included from ....../qbs-src-1.22.1/src/lib/corelib/buildgraph/rescuableartifactdata.h:46, from ....../qbs-src-1.22.1/src/lib/corelib/buildgraph/productbuilddata.h:44, from ....../qbs-src-1.22.1/src/lib/corelib/buildgraph/artifactcleaner.cpp:45: ....../qbs-src-1.22.1/src/lib/corelib/buildgraph/rulecommands.h:54:10: fatal error: QtScript/qscriptvalue.h: No such file or directory 54 | #include <QtScript/qscriptvalue.h> | ^~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. In file included from ....../qbs-src-1.22.1/src/lib/corelib/buildgraph/cycledetector.cpp:42: ....../qbs-src-1.22.1/src/lib/corelib/buildgraph/buildgraph.h:48:10: fatal error: QtScript/qscriptvalue.h: No such file or directory 48 | #include <QtScript/qscriptvalue.h> | ^~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. make[2]: *** [src/lib/corelib/CMakeFiles/qbscore.dir/build.make:191: src/lib/corelib/CMakeFiles/qbscore.dir/api/projectdata.cpp.o] Error 1 In file included from ....../qbs-src-1.22.1/src/lib/corelib/buildgraph/buildgraphnode.cpp:43: ....../qbs-src-1.22.1/src/lib/corelib/buildgraph/projectbuilddata.h:53:10: fatal error: QtScript/qscriptvalue.h: No such file or directory 53 | #include <QtScript/qscriptvalue.h> | ^~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. In file included from ....../qbs-src-1.22.1/src/lib/corelib/buildgraph/rescuableartifactdata.h:46, from ....../qbs-src-1.22.1/src/lib/corelib/buildgraph/productbuilddata.h:44, from ....../qbs-src-1.22.1/src/lib/corelib/buildgraph/artifactvisitor.cpp:42: ....../qbs-src-1.22.1/src/lib/corelib/buildgraph/rulecommands.h:54:10: fatal error: QtScript/qscriptvalue.h: No such file or directory 54 | #include <QtScript/qscriptvalue.h> | ^~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. make[2]: *** [src/lib/corelib/CMakeFiles/qbscore.dir/build.make:275: src/lib/corelib/CMakeFiles/qbscore.dir/buildgraph/artifactcleaner.cpp.o] Error 1 make[2]: *** [src/lib/corelib/CMakeFiles/qbscore.dir/build.make:359: src/lib/corelib/CMakeFiles/qbscore.dir/buildgraph/cycledetector.cpp.o] Error 1 make[2]: *** [src/lib/corelib/CMakeFiles/qbscore.dir/build.make:331: src/lib/corelib/CMakeFiles/qbscore.dir/buildgraph/buildgraphnode.cpp.o] Error 1 make[2]: *** [src/lib/corelib/CMakeFiles/qbscore.dir/build.make:303: src/lib/corelib/CMakeFiles/qbscore.dir/buildgraph/artifactvisitor.cpp.o] Error 1 In file included from ....../qbs-src-1.22.1/src/lib/corelib/api/project_p.h:46, from ....../qbs-src-1.22.1/src/lib/corelib/api/project.cpp:40: ....../qbs-src-1.22.1/src/lib/corelib/language/language.h:67:10: fatal error: QtScript/qscriptvalue.h: No such file or directory 67 | #include <QtScript/qscriptvalue.h> | ^~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. In file included from ....../qbs-src-1.22.1/src/lib/corelib/api/project_p.h:46, from ....../qbs-src-1.22.1/src/lib/corelib/api/jobs.cpp:42: ....../qbs-src-1.22.1/src/lib/corelib/language/language.h:67:10: fatal error: QtScript/qscriptvalue.h: No such file or directory 67 | #include <QtScript/qscriptvalue.h> | ^~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. make[2]: *** [src/lib/corelib/CMakeFiles/qbscore.dir/build.make:177: src/lib/corelib/CMakeFiles/qbscore.dir/api/project.cpp.o] Error 1 make[2]: *** [src/lib/corelib/CMakeFiles/qbscore.dir/build.make:149: src/lib/corelib/CMakeFiles/qbscore.dir/api/jobs.cpp.o] Error 1 In file included from ....../qbs-src-1.22.1/build/src/lib/corelib/qbscore_autogen/LT2RHNSJLC/moc_pkgconfigjs.cpp:10, from ....../qbs-src-1.22.1/build/src/lib/corelib/qbscore_autogen/mocs_compilation.cpp:10: ....../qbs-src-1.22.1/build/src/lib/corelib/qbscore_autogen/LT2RHNSJLC/../../../../../../src/lib/corelib/jsextensions/pkgconfigjs.h:48:10: fatal error: QtScript/qscriptable.h: No such file or directory 48 | #include <QtScript/qscriptable.h> | ^~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. make[2]: *** [src/lib/corelib/CMakeFiles/qbscore.dir/build.make:79: src/lib/corelib/CMakeFiles/qbscore.dir/qbscore_autogen/mocs_compilation.cpp.o] Error 1 make[2]: Leaving directory '....../qbs-src-1.22.1/build' make[1]: *** [CMakeFiles/Makefile2:1368: src/lib/corelib/CMakeFiles/qbscore.dir/all] Error 2 make[1]: Leaving directory '....../qbs-src-1.22.1/build' make: *** [Makefile:149: all] Error 2
Can anybody give me a hand?
Thank you
-
@jiapei100 said in Qbs - fatal error: QtScript/qscriptvalue.h: No such file or directory:
Qt6, which seems to have removed QtScript?
Yes, Qt Script was deprecated with Qt 5.5 in 2015, and removed with Qt 6.0 in 2020.
You can try QJSEngine instead, but be aware that it doesn't support everything that Qt Script supports.
-
AFAIK, the QBS has an additional
useBundledQtScript
property. It is used to build the Qbs against the Qt6. In this case you need to set this property totrue
, and to init the QtScript as the separate git-submodule in the source Qbsqbs\src\shared\qtscript\
directory, see https://doc.qt.io/qbs/building-qbs.html. -
@kuzulis said in Qbs - fatal error: QtScript/qscriptvalue.h: No such file or directory:
AFAIK, the QBS has an additional
useBundledQtScript
property. It is used to build the Qbs against the Qt6. In this case you need to set this property totrue
, and to init the QtScript as the separate git-submodule in the source Qbsqbs\src\shared\qtscript\
directory, see https://doc.qt.io/qbs/building-qbs.html.I did not realize that Qt Script had been patched to build with Qt 6. Thank you for letting me know!