Trying to build static Qt5 in ubuntu 12.04 for deploying standalone executable - make errors
-
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 ?
-
There's something I am not understanding here. You want to compile Qt statically and you don't pass any parameter when configuring ?
-
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. -
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)
-
@
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) -
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. -
-
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. -
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.