Trying to build static Qt5 in ubuntu 12.04 for deploying standalone executable - make errors
-
wrote on 15 May 2014, 19:18 last edited by
I'm trying to statically build Qt5 on ubuntu 12.04 so I could deploy a standalone executable.
Following the "'Qt for X11 Requirements'":http://qt-project.org/doc/qt-4.8/requirements-x11.html page, I've installed the following packages:
libfontconfig1-dev libfreetype6-dev libx11-dev libxcursor-dev libxext-dev libxfixes-dev libxft-dev libxi-dev libxrandr-dev libxrender-dev
I'm trying to follow the instructions from these links:
http://qt-project.org/doc/qt-5/linux-building.html
http://qt-project.org/doc/qt-4.8/deployment-x11.htmlbut I can never get past the make stage.
My configuration is as follows: ./configure -static -prefix /tmp/qt-everywhere-opensource-src-5.2.1 -opensource -qt-xcb
I'm getting errors in the following areas:
@
make[3]: Leaving directory/tmp/qt-everywhere-opensource-src-5.2.1/qtdeclarative/tools/qmlprofiler' make[2]: Leaving directory
/tmp/qt-everywhere-opensource-src-5.2.1/qtdeclarative/tools'
make[1]: Leaving directory `/tmp/qt-everywhere-opensource-src-5.2.1/qtdeclarative'
make: *** [module-qtdeclarative-make_first] Error 2
@What should I do?
-
Hi and welcome to devnet,
How did you configure Qt ?
-
wrote on 15 May 2014, 20:08 last edited by
Thanks! I configured it without any parameters.
-
There's something I am not understanding here. You want to compile Qt statically and you don't pass any parameter when configuring ?
-
wrote on 16 May 2014, 15:14 last edited by
First post edited.
-
wrote on 16 May 2014, 16:56 last edited by
It is better to add another post with your new results instead of editing the previous. With adding new post you will make it easier for a reader to understand you problem and the history of the problem.
Could you post the error messages from a compiler or linker.
The messages that you have posted are from make and are not very useful. -
wrote on 16 May 2014, 17:42 last edited by
How do I retrieve the error messages from the compiler/linker?
-
wrote on 16 May 2014, 17:47 last edited by
The lines in make output above those that you put in your message.
It should contain words like "error" or "warning" -
wrote on 16 May 2014, 20:54 last edited by
I think these should be it:
@
../../include/QtCore/../../src/corelib/tools/qstring.h: In function ‘const QChar* parseIpFuture(QString&, const QChar*, const QChar*, QUrl::ParsingMode)’:
../../include/QtCore/../../src/corelib/tools/qstring.h:853:7: warning: assuming signed overflow does not occur when assuming that (X - c) > X is always false [-Wstrict-overflow]
../../include/QtCore/../../src/corelib/tools/qstring.h: In member function ‘virtual QString QSqlDriver::sqlStatement(QSqlDriver::StatementType, const QString&, const QSqlRecord&, bool) const’:
../../include/QtCore/../../src/corelib/tools/qstring.h:853:7: warning: assuming signed overflow does not occur when assuming that (X - c) > X is always false [-Wstrict-overflow]
access/qnetworkaccessdebugpipebackend_p.h:0: Note: No relevant classes found. No output generated.
../../../3rdparty/sqlite/sqlite3.c:93246:1: warning: missing initializer [-Wmissing-field-initializers]
../../../3rdparty/sqlite/sqlite3.c:93246:1: warning: (near initialization for ‘sqlite3Apis.aggregate_count’) [-Wmissing-field-initializers]
../../../3rdparty/sqlite/sqlite3.c: In function ‘porter_stemmer’:
../../../3rdparty/sqlite/sqlite3.c:127212:41: warning: value computed is not used [-Wunused-value]
../../../3rdparty/sqlite/sqlite3.c:127216:39: warning: value computed is not used [-Wunused-value]
../../../3rdparty/sqlite/sqlite3.c:127229:35: warning: value computed is not used [-Wunused-value]
../../../3rdparty/sqlite/sqlite3.c:127234:39: warning: value computed is not used [-Wunused-value]
../../../3rdparty/sqlite/sqlite3.c:127240:41: warning: value computed is not used [-Wunused-value]
../../../3rdparty/sqlite/sqlite3.c:127245:39: warning: value computed is not used [-Wunused-value]
../../../3rdparty/sqlite/sqlite3.c:127254:38: warning: value computed is not used [-Wunused-value]
../../../3rdparty/sqlite/sqlite3.c:127261:37: warning: value computed is not used [-Wunused-value]
../../../3rdparty/sqlite/sqlite3.c:127304:39: warning: value computed is not used [-Wunused-value]
../../../3rdparty/sqlite/sqlite3.c:127324:34: warning: value computed is not used [-Wunused-value]
@(continued next post)
-
wrote on 16 May 2014, 20:54 last edited by
@
Project MESSAGE: ActiveQt is a Windows-only module. Will just generate a docs target.
Checking for libmng... no
Checking for libtiff... no
../../../3rdparty/libmng/libmng_object_prc.c: In function ‘mng_create_ani_disc’:
../../../3rdparty/libmng/libmng_object_prc.c:6109:17: warning: variable ‘iRetcode’ set but not used [-Wunused-but-set-variable]
../../../3rdparty/libmng/libmng_pixels.c: In function ‘mng_restore_bkgd_backcolor’:
../../../3rdparty/libmng/libmng_pixels.c:8990:5: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
../../../3rdparty/libmng/libmng_pixels.c: In function ‘mng_restore_bkgd_bkgd’:
../../../3rdparty/libmng/libmng_pixels.c:9100:5: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
../../../3rdparty/libmng/libmng_pixels.c: In function ‘mng_restore_bkgd_bgcolor’:
../../../3rdparty/libmng/libmng_pixels.c:9147:5: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
In file included from qserialport.cpp:1400:0:
.moc/moc_qserialport.cpp: In member function ‘virtual int QSerialPort::qt_metacall(QMetaObject::Call, int, void**)’:
.moc/moc_qserialport.cpp:444:76: warning: ‘QSerialPort::DataErrorPolicy QSerialPort::dataErrorPolicy() const’ is deprecated (declared at qserialport.cpp:1124) [-Wdeprecated-declarations]
.moc/moc_qserialport.cpp:459:76: warning: ‘bool QSerialPort::setDataErrorPolicy(QSerialPort::DataErrorPolicy)’ is deprecated (declared at qserialport.cpp:1105) [-Wdeprecated-declarations]
../../../3rdparty/libtiff/libtiff/tif_dirinfo.c:196:5: warning: missing initializer [-Wmissing-field-initializers]
../../../3rdparty/libtiff/libtiff/tif_dirinfo.c:196:5: warning: (near initialization for ‘tiffFields[139].field_subfields’) [-Wmissing-field-initializers]
../../../3rdparty/libtiff/libtiff/tif_write.c: In function ‘TIFFWriteEncodedStrip’:
../../../3rdparty/libtiff/libtiff/tif_write.c:236:38: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
../../../3rdparty/libtiff/libtiff/tif_write.c: In function ‘TIFFWriteEncodedTile’:
../../../3rdparty/libtiff/libtiff/tif_write.c:382:38: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
../../../3rdparty/libtiff/libtiff/tif_unix.c: In function ‘_tiffReadProc’:
../../../3rdparty/libtiff/libtiff/tif_unix.c:67:26: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
../../../3rdparty/libtiff/libtiff/tif_unix.c: In function ‘_tiffWriteProc’:
../../../3rdparty/libtiff/libtiff/tif_unix.c:79:27: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
../../../3rdparty/libtiff/libtiff/tif_unix.c: In function ‘_tiffSeekProc’:
../../../3rdparty/libtiff/libtiff/tif_unix.c:91:23: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
../../../3rdparty/libtiff/libtiff/tif_unix.c: In function ‘_tiffCloseProc’:
../../../3rdparty/libtiff/libtiff/tif_unix.c:97:15: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
../../../3rdparty/libtiff/libtiff/tif_unix.c: In function ‘_tiffSizeProc’:
../../../3rdparty/libtiff/libtiff/tif_unix.c:104:12: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
../../../3rdparty/libtiff/libtiff/tif_unix.c: In function ‘TIFFFdOpen’:
../../../3rdparty/libtiff/libtiff/tif_unix.c:159:6: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
sh: 1: /tmp/qt-everywhere-opensource-src-5.2.1/qtdeclarative/bin/qmlimportscanner: not found
Project ERROR: Failed to parse qmlimportscanner output.
make[4]: *** [sub-adding-make_first] Error 3
make[3]: *** [sub-referenceexamples-make_first] Error 2
make[2]: *** [sub-qml-make_first] Error 2
make[1]: *** [sub-examples-make_first] Error 2
make[1]: *** Waiting for unfinished jobs....
make: *** [module-qtdeclarative-make_first] Error 2
@
(end) -
wrote on 18 May 2014, 01:34 last edited by
Did you delete directory with previously failed build of qt and unarchive it fresh before run configure with the options?
-
wrote on 18 May 2014, 02:19 last edited by
I ran 'make uninstall' then deleted the directory every time.
-
wrote on 18 May 2014, 02:29 last edited by
You don't need to run 'make uninstall' if have not install it yet. Just delete is enough.
Most of the messages are warning from third party libraries. The error is
@
sh: 1: /tmp/qt-everywhere-opensource-src-5.2.1/qtdeclarative/bin/qmlimportscanner: not found
Project ERROR: Failed to parse qmlimportscanner output.
@
Is it possible that you run out of space on /tmp ?Also I just noticed that you set prefix to the build directory. I don't think it is correct. I have not tried it. Usually '-prefix' is for the prefix to an install path.
If you want to install Qt to $HOME/Qt then prefix should be $HOME/Qt
Try to change -prefix and run configure, make again on fresh un-archived directory. -
wrote on 18 May 2014, 02:31 last edited by
In addition, if you have enough space in /tmp and if change of the prefix does not help either then redirect all make output to a log file and try to find out why qmlimportscanner is not found. Was it build?
-
wrote on 21 May 2014, 14:25 last edited by
I've followed your instructions and have the output in a file. The qmlimportscanner file is clearly there but for some reason the make file can't see it.
-
wrote on 21 May 2014, 15:33 last edited by
Have you checked a space on /tmp ?
@
df -h /tmp
@After build failed do you see qmlimportscanner?
@
ls -l /tmp/qt-everywhere-opensource-src-5.2.1/qtdeclarative/bin/qmlimportscanner
@ -
wrote on 21 May 2014, 15:51 last edited by
df -h /tmp
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 451G 38G 391G 9% /There should be more than enough space in /tmp.
ls -l qtdeclarative/bin/qmlimportscanner
-rwxr-xr-x 1 root root 4330556 May 21 10:17 qtdeclarative/bin/qmlimportscanner -
wrote on 21 May 2014, 19:58 last edited by
I tried to build Qt 5.2.1 on Ubuntu 12.04 32bit and it failed to build qtwebkit. So I don't know if it passed or not the point where your build failed. I see that qmlimportscannel is built but I don't see any call to it.
I noticed that you build Qt under root.
Try to build it under normal user, maybe root environment is restricted. -
wrote on 22 May 2014, 14:38 last edited by
I tried building it without root, and I still got these errors:
Using PCH Using PCHsh: 1: /tmp/qt-everywhere-opensource-src-5.2.1/qtdeclarative/bin/qmlimportscanner: not found
Project ERROR: Failed to parse qmlimportscanner output.The file is there as usual.
4/19