最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

qt-extended-opensource-src-4.4.3 编译过程记录

工作和技术 crifan 3005浏览 0评论

1.目的是位arm平台编译PIM模块,所以加了对应配置,过程为:

解压源码后,再:

mkdir qtExtended_build
cd qtExtended_build/
echo "yes" | ../qt-extended-4.4.3/configure -little-endian -R /usr -no-rpath -prefix /usr/bin -image /home/crifan/rootfs-2009/root/usr/bin -sdk /home/crifan/rootfs-2009/root/usr/sdk -force-pkg-config -device greenphone -modules pim,inputmethods -arch arm -shared -build-qt -no-dbus -no-dbusipc -no-vpn -xplatform linux-arm-g++
配置好后,就可以编译了:
bin/qbuild

2.编译了很长时间后,出现错误:

make[1]: Entering directory `/home/crifan/qtopia/qtExtended_build/qtopiacore/target/src/gui’
arm-linux-g++ -c -pipe -fno-exceptions -fno-rtti -fPIC -O2 -fvisibility=hidden -fvisibility-inlines-hidden -Wall -W -D_REENTRANT -fPIC -DQT_SHARED -DQT_QWS_DISABLE_FLUSHCLIPPING -DQT_NO_PLUGIN_CHECK -DQT_EXTERNAL_SOUND_SERVER -DQT_QWS_KEYEVENT_SINGLECLIENT -DQT_QWS_KEYEVENT_SINGLECLIENT -DQT_KEYPAD_NAVIGATION -DQT_QWS_CLIENTBLIT -DQT_QWS_SCREEN_COORDINATES -DQT_BUILD_GUI_LIB -DQT_NO_USING_NAMESPACE -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DPNG_NO_ASSEMBLER_CODE -DQT_RASTER_IMAGEENGINE -DQT_RASTER_PAINTENGINE -DQTOPIA_PRINTENGINE -DQT_NO_CUPS -DQT_NO_LPR -DQT_NO_FONTCONFIG -DFT2_BUILD_LIBRARY -DFT_CONFIG_OPTION_SYSTEM_ZLIB -DQT_NO_OPENTYPE -DQT_NO_STYLE_MAC -DQT_NO_STYLE_WINDOWSVISTA -DQT_NO_STYLE_WINDOWSXP -DQT_NO_STYLE_WINDOWSCE -DQT_NO_STYLE_WINDOWSMOBILE -DQTOPIA_PRINTDIALOG -DQ_INTERNAL_QAPP_SRC -Ddynamic_cast=dynamic_cast_not_allowed -DQT_NO_DEBUG -DQT_NETWORK_LIB -DQT_CORE_LIB -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I/home/crifan/qtopia/qt-extended-4.4.3/qtopiacore/qt/mkspecs/qws/linux-arm-g++ -I/home/crifan/qtopia/qt-extended-4.4.3/qtopiacore/qt/src/gui -I../../include/QtCore -I../../include/QtCore -I../../include/QtNetwork -I../../include/QtNetwork -I../../include -I../../include -I../../include/QtGui -I.rcc/release-shared-emb-arm -I/home/crifan/qtopia/qt-extended-4.4.3/qtopiacore/qt/src/3rdparty/libpng -I/home/crifan/qtopia/qt-extended-4.4.3/qtopiacore/qt/src/3rdparty/zlib -I/home/crifan/qtopia/qt-extended-4.4.3/qtopiacore/qt/src/3rdparty/freetype/src -I/home/crifan/qtopia/qt-extended-4.4.3/qtopiacore/qt/src/3rdparty/freetype/include -I/home/crifan/qtopia/qt-extended-4.4.3/qtopiacore/qt/src/3rdparty/freetype/builds/unix -I/home/crifan/qtopia/qt-extended-4.4.3/qtopiacore/qt/src/3rdparty/harfbuzz/src -I/home/crifan/qtopia/qt-extended-4.4.3/qtopiacore/qt/src/gui/dialogs -I.moc/release-shared-emb-arm -I.uic/release-shared-emb-arm -I. -o .obj/release-shared-emb-arm/qunixsocket.o /home/crifan/qtopia/qt-extended-4.4.3/qtopiacore/qt/src/gui/embedded/qunixsocket.cpp
/home/crifan/qtopia/qt-extended-4.4.3/qtopiacore/qt/src/gui/embedded/qunixsocket.cpp: In member function ‘void QUnixSocketMessagePrivate::removeBytes(unsigned int)’:
/home/crifan/qtopia/qt-extended-4.4.3/qtopiacore/qt/src/gui/embedded/qunixsocket.cpp:312: warning: dereferencing type-punned pointer will break strict-aliasing rules
/home/crifan/qtopia/qt-extended-4.4.3/qtopiacore/qt/src/gui/embedded/qunixsocket.cpp: In member function ‘qint64 QUnixSocketPrivate::writeActivated()’:
/home/crifan/qtopia/qt-extended-4.4.3/qtopiacore/qt/src/gui/embedded/qunixsocket.cpp:1638: error: ‘::bzero’ has not been declared
/home/crifan/qtopia/qt-extended-4.4.3/qtopiacore/qt/src/gui/embedded/qunixsocket.cpp:1652: error: ‘::bzero’ has not been declared
/home/crifan/qtopia/qt-extended-4.4.3/qtopiacore/qt/src/gui/embedded/qunixsocket.cpp: In member function ‘void QUnixSocketPrivate::readActivated()’:
/home/crifan/qtopia/qt-extended-4.4.3/qtopiacore/qt/src/gui/embedded/qunixsocket.cpp:1755: error: ‘bzero’ was not declared in this scope
make[1]: Leaving directory `/home/crifan/qtopia/qtExtended_build/qtopiacore/target/src/gui’
make[1]: *** [.obj/release-shared-emb-arm/qunixsocket.o] Error 1
make: *** [sub-gui-make_default-ordered] Error 2
make: Leaving directory `/home/crifan/qtopia/qtExtended_build/qtopiacore/target’

网上找到一个凑合用的办法试试:

http://topic.csdn.net/u/20090304/15/56ef4e56-1c3a-43d5-95d7-d33dfc3c4049.html

即,自己加入:

#define bzero(a, b)             memset(a, 0, b)

到具体出现该bzero的地方,或者干脆自己手动替换bzero成memset。至少可以继续编译了。

后来又接着改了很多个类似的bzero的错误,继续编译。。。

3.后来出现错误:

。。

arm-linux-g++ /home/crifan/qtopia/qtExtended_build/src/applications/mediarecorder/link_test
arm-linux-g++ /home/crifan/qtopia/qtExtended_build/src/plugins/audiohardware/greenphone/link_test
*** Error
/default: Prerequisite failed
/sub_default: Prerequisite failed
/src/default_sub: Prerequisite failed
/src/default: Prerequisite failed
/src/sub_default: Prerequisite failed
/src/3rdparty/default_sub: Prerequisite failed
/src/3rdparty/default: Prerequisite failed
/src/3rdparty/sub_default: Prerequisite failed
/src/3rdparty/applications/default_sub: Prerequisite failed
/src/3rdparty/applications/default: Prerequisite failed
/src/3rdparty/applications/sub_default: Prerequisite failed
/src/3rdparty/applications/target_sqlite/default_sub: Prerequisite failed
/src/3rdparty/applications/target_sqlite/default: Prerequisite failed
/src/3rdparty/applications/target_sqlite/target: Prerequisite failed
/src/3rdparty/applications/target_sqlite/target_post: Prerequisite failed
/src/3rdparty/applications/target_sqlite/cpp_compiler_target: Command execution failed
$$COMPILER.LINK $${COMPILER.LFLAGS} -o $$[OUTPUT.0] $$[INPUT] $${COMPILER.LIBS}
arm-linux-gcc -L/home/crifan/rootfs-2009/root/usr/sdk/lib -Wl,-rpath,/home/crifan/rootfs-2009/root/usr/sdk/qtopiacore/target/lib -Wl,-rpath,/home/crifan/rootfs-2009/root/usr/sdk/lib/host -pipe -o /home/crifan/qtopia/qtExtended_build/src/3rdparty/applications/target_sqlite/sqlite /home/crifan/qtopia/qtExtended_build/src/3rdparty/applications/target_sqlite/.obj/sqlite3.o /home/crifan/qtopia/qtExtended_build/src/3rdparty/applications/target_sqlite/.obj/shell.o -lqtopia-sqlite -Wl,-rpath,/usr -lpthread -L/home/crifan/rootfs-2009/root/usr/sdk/qtopiacore/target/lib -lQtCore -L/home/crifan/qtopia/qtExtended_build/qtopiacore/target/lib -lm -lrt -ldl
/home/eric/buildroot/buildroot-2009.08/build_arm/staging_dir/usr/bin-ccache/../lib/gcc/arm-linux-uclibc/4.2.4/../../../../arm-linux-uclibc/bin/ld: warning: libstdc++.so.6, needed by /home/crifan/rootfs-2009/root/usr/sdk/qtopiacore/target/lib/libQtCore.so, not found (try using -rpath or -rpath-link)
/home/crifan/rootfs-2009/root/usr/sdk/qtopiacore/target/lib/libQtCore.so: undefined reference to `operator new[](unsigned int)@GLIBCXX_3.4′
/home/crifan/rootfs-2009/root/usr/sdk/qtopiacore/target/lib/libQtCore.so: undefined reference to `operator delete(void*)@GLIBCXX_3.4′
/home/crifan/rootfs-2009/root/usr/sdk/qtopiacore/target/lib/libQtCore.so: undefined reference to `__cxa_guard_release@CXXABI_1.3′
/home/crifan/rootfs-2009/root/usr/sdk/qtopiacore/target/lib/libQtCore.so: undefined reference to `__cxa_guard_acquire@CXXABI_1.3′
/home/crifan/rootfs-2009/root/usr/sdk/qtopiacore/target/lib/libQtCore.so: undefined reference to `operator delete[](void*)@GLIBCXX_3.4′
/home/crifan/rootfs-2009/root/usr/sdk/qtopiacore/target/lib/libQtCore.so: undefined reference to `__cxa_pure_virtual@CXXABI_1.3′
/home/crifan/rootfs-2009/root/usr/sdk/qtopiacore/target/lib/libQtCore.so: undefined reference to `operator new(unsigned int)@GLIBCXX_3.4′
collect2: ld returned 1 exit status

由其中:

arm-linux-uclibc/bin/ld: warning: libstdc++.so.6, needed by /home/crifan/rootfs-2009/root/usr/sdk/qtopiacore/target/lib/libQtCore.so

得知,是缺少了对应的c++的库libstdc++.so.6,所以,我们这里,可以手动从别处拷贝一个已经编译好的c++库,或者做个手动的链接也可以,应该就可以编译了。

此处由于一些原因,就不打算继续花费这么多时间在qt embedded的编译上了。因此终止此工作。

转载请注明:在路上 » qt-extended-opensource-src-4.4.3 编译过程记录

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

网友最新评论 (1)

  1. mahua0914年前 (2011-07-15)回复
82 queries in 0.196 seconds, using 22.14MB memory