From 10:00 CET Friday 22nd November we will adjust how the server works to deal with some recently reported problems. Therefore there may be a load problem, if you experience more problems than usual trying to access the forum then please PM AndyS or any of the moderators so they can inform me.
Project ERROR: Unknown module(s) in QT: script
I have build Qt from source and now I am trying to build Qt Creator from source and get the following error:
Project ERROR: Unknown module(s) in QT: script. I found a similar thread that suggested building qtscript libraty by running
make module-qtscriptmanually. I did that from the Qt source folder and the build for the script library finished without any errors. However, I still get the same error when I try to prepare Qt Creator for build:
$ qmake -r ../qt-creator/qtcreator.pro Reading /home/aras/Projects/qt-creator/src/src.pro [/home/aras/Projects/qt-creator-build/src] Reading /home/aras/Projects/qt-creator/src/shared/qbs/src/lib/corelib/corelib.pro [/home/aras/Projects/qt-creator-build/src/shared/qbs/src/lib/corelib] Project ERROR: Unknown module(s) in QT: script
libQt5Script.sofinds it in my Qt source directory but not installed anywhere else on the system:
$ locate libQt5Script.so /home/aras/Projects/qt-everywhere-opensource-src-5.7.0/qtbase/lib/libQt5Script.so /home/aras/Projects/qt-everywhere-opensource-src-5.7.0/qtbase/lib/libQt5Script.so.5 /home/aras/Projects/qt-everywhere-opensource-src-5.7.0/qtbase/lib/libQt5Script.so.5.7 /home/aras/Projects/qt-everywhere-opensource-src-5.7.0/qtbase/lib/libQt5Script.so.5.7.0
Here is my Qt version:
$ qmake -v QMake version 3.0 Using Qt version 5.7.0 in /usr/local/Qt-5.7.0/lib
I am following this guide. What else do I need to do to get past this error and build Qt Creator?
Did you call
make installafter you built the QtScript module ?
@SGaist yes I ran
sudo make install module-qtscript
I also just tried doing a fresh build of qt from source using external build directory. I still get the same error :(
Ok, then, did you re-run qmake after you installed qtscript ?
@SGaist let me back track a bit. The first time I tried this I ran
sudo make install module-qscriptand once that was over I went back to my qt creator build directory and tried configuring the project again and I got this error:
:~/Projects/qt-creator-build$ qmake -r ../qt-creator/qtcreator.pro Reading /home/aras/Projects/qt-creator/src/src.pro [/home/aras/Projects/qt-creator-build/src] Reading /home/aras/Projects/qt-creator/src/shared/qbs/src/lib/corelib/corelib.pro [/home/aras/Projects/qt-creator-build/src/shared/qbs/src/lib/corelib] Project ERROR: Unknown module(s) in QT: script
Now I removed my old qt source folder and downloaded a new one and built it from scratch again. Then I build the qscript module without error. However, just now I tried installing it using
sudo make install module-qtscriptand after some time I got this new error:
/home/aras/Projects/qt-everywhere-opensource-src-5.7.0/qtwayland/src/shared/qwaylandinputmethodeventbuilder.cpp /home/aras/Projects/qt-everywhere-opensource-src-5.7.0/qtwayland/src/shared/qwaylandinputmethodeventbuilder.cpp:46:80: fatal error: QtWaylandCompositor/private/qwayland-server-text-input-unstable-v2.h: No such file or directory compilation terminated. Makefile:8100: recipe for target '.obj/qwaylandinputmethodeventbuilder.o' failed make: *** [.obj/qwaylandinputmethodeventbuilder.o] Error 1 make: Leaving directory '/home/aras/Projects/shared-build-qt5.7.0/qtwayland/src/compositor' Makefile:83: recipe for target 'sub-compositor-install_subtargets' failed make: *** [sub-compositor-install_subtargets] Error 2 make: Leaving directory '/home/aras/Projects/shared-build-qt5.7.0/qtwayland/src' Makefile:56: recipe for target 'sub-src-install_subtargets' failed make: *** [sub-src-install_subtargets] Error 2 make: Leaving directory '/home/aras/Projects/shared-build-qt5.7.0/qtwayland' Makefile:497: recipe for target 'module-qtwayland-install_subtargets' failed make: *** [module-qtwayland-install_subtargets] Error 2
The build is really not cooperating with me. Do you have any suggestions?
Did you do a complete build before qtscript ?
On a side note, if you want to avoid having to uncompress the sources each time. Just do an out of source build.
Aras last edited by Aras
@SGaist yes as far as I know, I did a complete build. In my last build after I deleted the initial source folder, I did an out of source build as someone else had also recommended that to me.
I still am not able to install the qtscript module. What do you think I might be missing?
Check the size of the library files created and try to build a dummy project using the QtScript module.
@SGaist here is a list of library files in my build folder (since they are not installed yet):
$ ls -sl /home/aras/Projects/shared-build-qt5.7.0/qtscript/lib/ total 4072 4 drwxrwxr-x 4 aras aras 4096 Aug 16 14:11 cmake 4 -rw-rw-r-- 1 aras aras 716 Aug 16 14:10 libQt5Script.la 4 -rw-rw-r-- 1 aras aras 1206 Aug 16 14:10 libQt5Script.prl 0 lrwxrwxrwx 1 aras aras 21 Aug 16 14:11 libQt5Script.so -> libQt5Script.so.5.7.0 0 lrwxrwxrwx 1 aras aras 21 Aug 16 14:11 libQt5Script.so.5 -> libQt5Script.so.5.7.0 0 lrwxrwxrwx 1 aras aras 21 Aug 16 14:11 libQt5Script.so.5.7 -> libQt5Script.so.5.7.0 2912 -rwxrwxr-x 1 aras aras 2979368 Aug 16 14:11 libQt5Script.so.5.7.0 4 -rw-rw-r-- 1 aras aras 751 Aug 16 14:11 libQt5ScriptTools.la 4 -rw-rw-r-- 1 aras aras 1221 Aug 16 14:11 libQt5ScriptTools.prl 0 lrwxrwxrwx 1 aras aras 26 Aug 16 14:11 libQt5ScriptTools.so -> libQt5ScriptTools.so.5.7.0 0 lrwxrwxrwx 1 aras aras 26 Aug 16 14:11 libQt5ScriptTools.so.5 -> libQt5ScriptTools.so.5.7.0 0 lrwxrwxrwx 1 aras aras 26 Aug 16 14:11 libQt5ScriptTools.so.5.7 -> libQt5ScriptTools.so.5.7.0 1136 -rwxrwxr-x 1 aras aras 1162304 Aug 16 14:11 libQt5ScriptTools.so.5.7.0 4 drwxrwxr-x 2 aras aras 4096 Aug 16 14:11 pkgconfig
Can you explain more how I make a dummy project to test the lib? Remember I am trying to build Qt Creator, so I don't have it yet. Should I just make a simple C++ file and try to build it in command line with qcc? Or do I need to configure it with qmake?
You can either use your distribution provided Qt Creator or the one from the installer.
Or just build one of QtScript examples.
Aras last edited by Aras
@SGaist I rather not install the distro provided qt. I did that on another machine and it gets pretty confusing with multiple versions of Qt installed in parallel. I see if I can find a QtScript example, is there one that you know?
Edit: I found a bunch of script example projects in
~/Projects/qt-everywhere-opensource-src-5.7.0/qtscript/examples/script. The readme refers to docs, so I do not know how to build them yet, but will try to find out. But I tried just running
qmakein one of the example folders and I get this error:
.../examples/script/calculator$ qmake Info: creating stash file /home/aras/Projects/qt-everywhere-opensource-src-5.7.0/qtscript/.qmake.stash Project ERROR: Unknown module(s) in QT: script uitools
Did you call make install after you built the module ?
I don't think I ran
qmakegave me that error above. Usually it says to run install if there are no errors.
I have since installed the binary distribution of Qt so that I am not blocked by this. But I still would like to learn how to do a full install of
Qt Creatorfrom source.
Looks like you built the qtscript module successfully, that's why I'm asking whether you ran
make installbefore trying to build the example.