[Qt-interest] Make error when reducing qt-embedded lib size with qconfig
Brecht Ameije
bam at ABM.BE
Wed Aug 25 09:52:08 CEST 2010
Dear all,
I'm using Qt Embedded 4.5.2.
Cross compiling the libraries on ubuntu, for an ARM target.
I've been trying for a while now to deselect features of qt to reduce qt's
footprint.
I'm using the qconfig tool:
* run qconfig
* deselect all unneeded features and save as qconfig-myconfig.h
* ./configure [...] -qconfig myconfig
* make ==> reports an error:
bam at bam-ubuntu:~/install/qt-embedded-linux-opensource-src-4.5.2$ make
[... half hour of compile output...]
arm-none-linux-gnueabi-g++ -c -pipe -fno-exceptions -O2 -fvisibility=hidden
-fvisibility-inlines-hidden -Wall -W -D_REENTRANT -fPIC -DQT_SHARED
-DQT_BUILD_NETWORK_LIB -DQT_NO_USING_NAMESPACE -DQT_NO_CAST_TO_ASCII
-DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_NO_DEBUG -DQT_CORE_LIB
-I../../mkspecs/qws/linux-arm-g++ -I. -I../../include/QtCore -I../../include
-I../../include/QtNetwork -I.rcc/release-shared-emb-arm -I../3rdparty/zlib
-Ikernel -I.moc/release-shared-emb-arm -I/home/bam/target/include -o
.obj/release-shared-emb-arm/qabstractnetworkcache.o
access/qabstractnetworkcache.cpp
arm-none-linux-gnueabi-g++ -c -pipe -fno-exceptions -O2 -fvisibility=hidden
-fvisibility-inlines-hidden -Wall -W -D_REENTRANT -fPIC -DQT_SHARED
-DQT_BUILD_NETWORK_LIB -DQT_NO_USING_NAMESPACE -DQT_NO_CAST_TO_ASCII
-DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_NO_DEBUG -DQT_CORE_LIB
-I../../mkspecs/qws/linux-arm-g++ -I. -I../../include/QtCore -I../../include
-I../../include/QtNetwork -I.rcc/release-shared-emb-arm -I../3rdparty/zlib
-Ikernel -I.moc/release-shared-emb-arm -I/home/bam/target/include -o
.obj/release-shared-emb-arm/qnetworkdiskcache.o access/qnetworkdiskcache.cpp
access/qnetworkdiskcache_p.h:79: error: ISO C++ forbids declaration of
'QTemporaryFile' with no type
access/qnetworkdiskcache_p.h:79: error: expected ';' before '*' token
access/qnetworkdiskcache_p.h: In constructor 'QCacheItem::QCacheItem()':
access/qnetworkdiskcache_p.h:69: error: class 'QCacheItem' does not have any
field named 'file'
access/qnetworkdiskcache_p.h: In member function 'qint64 QCacheItem::size()
const':
access/qnetworkdiskcache_p.h:81: error: 'file' was not declared in this
scope
access/qnetworkdiskcache_p.h: In member function 'void QCacheItem::reset()':
access/qnetworkdiskcache_p.h:86: error: 'file' was not declared in this
scope
access/qnetworkdiskcache.cpp: In member function 'virtual QIODevice*
QNetworkDiskCache::prepare(const QNetworkCacheMetaData&)':
access/qnetworkdiskcache.cpp:193: error: 'class QCacheItem' has no member
named 'file'
access/qnetworkdiskcache.cpp:193: error: expected type-specifier before
'QTemporaryFile'
access/qnetworkdiskcache.cpp:193: error: expected `;' before
'QTemporaryFile'
access/qnetworkdiskcache.cpp:194: error: 'class QCacheItem' has no member
named 'file'
access/qnetworkdiskcache.cpp:199: error: 'class QCacheItem' has no member
named 'file'
access/qnetworkdiskcache.cpp:200: error: 'class QCacheItem' has no member
named 'file'
access/qnetworkdiskcache.cpp: In member function 'void
QNetworkDiskCachePrivate::storeItem(QCacheItem*)':
access/qnetworkdiskcache.cpp:244: error: 'class QCacheItem' has no member
named 'file'
access/qnetworkdiskcache.cpp:246: error: 'class QCacheItem' has no member
named 'file'
access/qnetworkdiskcache.cpp:246: error: expected type-specifier before
'QTemporaryFile'
access/qnetworkdiskcache.cpp:246: error: expected `;' before
'QTemporaryFile'
access/qnetworkdiskcache.cpp:247: error: 'class QCacheItem' has no member
named 'file'
access/qnetworkdiskcache.cpp:248: error: 'class QCacheItem' has no member
named 'file'
access/qnetworkdiskcache.cpp:249: error: 'class QCacheItem' has no member
named 'file'
access/qnetworkdiskcache.cpp:253: error: 'class QCacheItem' has no member
named 'file'
access/qnetworkdiskcache.cpp:254: error: 'class QCacheItem' has no member
named 'file'
access/qnetworkdiskcache.cpp:255: error: 'class QCacheItem' has no member
named 'file'
access/qnetworkdiskcache.cpp:256: error: 'class QCacheItem' has no member
named 'file'
access/qnetworkdiskcache.cpp:258: error: 'class QCacheItem' has no member
named 'file'
access/qnetworkdiskcache.cpp:259: error: 'class QCacheItem' has no member
named 'file'
access/qnetworkdiskcache.cpp:261: error: 'class QCacheItem' has no member
named 'file'
make[1]: *** [.obj/release-shared-emb-arm/qnetworkdiskcache.o] Error 1
make[1]: Leaving directory
`/home/bam/install/qt-embedded-linux-opensource-src-4.5.2/src/network'
make: *** [sub-network-make_default-ordered] Error 2
bam at bam-ubuntu:~/install/qt-embedded-linux-opensource-src-4.5.2$
This seems like an easy one: I had unchecked QTemporaryFile from qconfig, so
just a problem of the wrong dependencies?
But, when I try again, with QTemporaryFile enabled anyway, I get another
error. Probably again related to some feature that I disabled, but this time
it's less obvious which one.
Seems like the qconfig tool doesn't manage the dependencies right (it greys
out features that depend on disabled features). So to solve that, I made
sure that all greyed out features are unchecked. Still the same problem.
So I tried with a set of features provided by qt: ./configure [...] -qconfig
small
Again, make spits an error:
bam at bam-ubuntu:~/install/qt-embedded-linux-opensource-src-4.5.2$ make
[... half hour of compile output...]
arm-none-linux-gnueabi-g++ -c -pipe -fno-exceptions -O2 -fvisibility=hidden
-fvisibility-inlines-hidden -Wall -W -D_REENTRANT -fPIC -DQT_SHARED
-DQT_BUILD_NETWORK_LIB -DQT_NO_USING_NAMESPACE -DQT_NO_CAST_TO_ASCII
-DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_NO_DEBUG -DQT_CORE_LIB
-I../../mkspecs/qws/linux-arm-g++ -I. -I../../include/QtCore -I../../include
-I../../include/QtNetwork -I.rcc/release-shared-emb-arm -I../3rdparty/zlib
-Ikernel -I.moc/release-shared-emb-arm -I/home/bam/target/include -o
.obj/release-shared-emb-arm/qhttpnetworkrequest.o
access/qhttpnetworkrequest.cpp
arm-none-linux-gnueabi-g++ -c -pipe -fno-exceptions -O2 -fvisibility=hidden
-fvisibility-inlines-hidden -Wall -W -D_REENTRANT -fPIC -DQT_SHARED
-DQT_BUILD_NETWORK_LIB -DQT_NO_USING_NAMESPACE -DQT_NO_CAST_TO_ASCII
-DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_NO_DEBUG -DQT_CORE_LIB
-I../../mkspecs/qws/linux-arm-g++ -I. -I../../include/QtCore -I../../include
-I../../include/QtNetwork -I.rcc/release-shared-emb-arm -I../3rdparty/zlib
-Ikernel -I.moc/release-shared-emb-arm -I/home/bam/target/include -o
.obj/release-shared-emb-arm/qhttpnetworkreply.o access/qhttpnetworkreply.cpp
access/qhttpnetworkreply_p.h:90: error: expected class-name before '{' token
access/qhttpnetworkreply_p.h:152: error: expected class-name before '{'
token
access/qhttpnetworkreply_p.h:187: error: field 'request' has incomplete type
make[1]: *** [.obj/release-shared-emb-arm/qhttpnetworkreply.o] Error 1
make[1]: Leaving directory
`/home/bam/install/qt-embedded-linux-opensource-src-4.5.2/src/network'
make: *** [sub-network-make_default-ordered] Error 2
bam at bam-ubuntu:~/install/qt-embedded-linux-opensource-src-4.5.2$
I tried getting the newer version of qt: 4.6.3. Same problem (different
errors though).
Note that I can actually compile qt without the -qconfig parameter!
Has anyone stumbled upon this before, or are there some hints what else I
could try?
FYI:
my full ./configure command line:
INSTALLDIR=/home/bam/target/usr/QtEmbedded-4.5.2
NO_MAKE='-nomake demos -nomake examples'
ARM_OPTIONS='-embedded arm -no-armfpa -little-endian'
UI_OPTIONS='-qt-gfx-transformed -qt-gfx-linuxfb -plugin-kbd-linuxis
-qt-mouse-tslib '
export ac_cv_func_malloc_0_nonnull=yes
./configure -opensource -prefix ${INSTALLDIR} ${ARM_OPTIONS} ${UI_OPTIONS}
${NO_MAKE} -no-xmlpatterns -no-cups -no-pch -no-svg -no-phonon
-no-phonon-backend -no-accessibility -no-largefile -no-qt3support -no-webkit
-no-feature-CURSOR -qt-libmng -no-nis -no-iconv -no-pch -no-dbus
-no-scripttools -qconfig myconfig
The qconfig-myconfig.h file is quite long (9KB), I can send it privatly to
anyone interested.
Thanks,
Brecht
More information about the Qt-interest-old
mailing list