编译旧的qt版本

时间:2017-10-11 14:25:18

标签: c++ qt makefile

我正在与Qt合作开展一个项目。我已经在Ubuntu 14.04和Ubuntu 16.04上下载并编译了我的Qt 4.8.7版本而没有任何问题。

我已按照以下步骤操作:

安装交叉编译工具和包依赖项

sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install g++-multilib
sudo apt-get build-dep qt4-x11

下载Qt

mkdir -p ~/dmi/dep/qt && cd ~/dmi/dep/qt
wget http://download.qt.io/official_releases/qt/4.8/4.8.7/qt-everywhere-opensource-src-4.8.7.tar.gz
tar xvzf qt-everywhere-opensource-src-4.8.7.tar.gz
cd qt-everywhere-opensource-src-4.8.7

配置,编译和安装主机系统的Qt

./configure -prefix $HOME/dmi/dep/install/amd64 -embedded -static  \
    -nomake docs -nomake examples -nomake demos -no-openssl        \
    -no-qt3support -no-phonon -no-phonon-backend -no-webkit        \
    -no-javascript-jit -no-script -no-scripttools -no-cups -qvfb   \
    -qt-gfx-linuxfb -qt-gfx-qvfb -opensource -confirm-license

make -j 5
make install

正如我所说......这与qt 4.8.7完美配合。现在我尝试使用旧的Qt版本4.6.4。但它没有用。这是./configure输出:

Build ............... libs tools translations
Configuration .......  release static embedded largefile precompile_header mmx 3dnow sse sse2 exceptions_off  minimal-config small-config medium-config large-config full-config accessibility embedded reduce_exports ipv6 clock-gettime clock-monotonic mremap getaddrinfo ipv6ifname getifaddrs inotify system-jpeg jpeg mng system-png png gif system-tiff tiff system-freetype system-zlib nis glib dbus multimedia audio-backend svg release
Debug ............... no
Qt 3 compatibility .. no
QtDBus module ....... yes (run-time)
QtConcurrent code.... yes
QtScript module ..... no
QtScriptTools module  no
QtXmlPatterns module  no
Phonon module ....... no
Multimedia module ... yes
SVG module .......... yes
WebKit module ....... no
Declarative module .. no
STL support ......... no
PCH support ......... yes
MMX/3DNOW/SSE/SSE2..  yes/yes/yes/yes
IPv6 support ........ yes
IPv6 ifname support . yes
getaddrinfo support . yes
getifaddrs support .. yes
Accessibility ....... yes
NIS support ......... yes
CUPS support ........ no
Iconv support ....... no
Glib support ........ yes
GStreamer support ... auto
Large File support .. yes
GIF support ......... yes
TIFF support ........ yes (system)
JPEG support ........ yes (system)
PNG support ......... yes (system)
MNG support ......... yes (qt)
zlib support ........ system
Session management .. no
Embedded support .... x86_64
Freetype2 support ... auto (system)
Graphics (qt) ....... linuxfb multiscreen qvfb linuxfb qvfb
Graphics (plugin) ... 
Decorations (qt) .... styled windows default
Decorations (plugin)  
Keyboard driver (qt). tty qvfb
Keyboard driver (plugin) 
Mouse driver (qt) ... pc linuxtp qvfb
Mouse driver (plugin) 
OpenGL support ...... no
OpenVG support ...... no
MySQL support ....... plugin
PostgreSQL support .. plugin
ODBC support ........ plugin
TDS support ......... plugin
SQLite support ...... plugin (qt)
OpenSSL support ..... no 
Alsa support ........ no


WARNING: Using static linking will disable the use of dynamically
loaded plugins. Make sure to import all needed static plugins,
or compile needed modules into the library.

Finding project files. Please wait...
Reading /home/xabi/dmi/dep/qt/qt-everywhere-opensource-src-4.6.4/src/tools/bootstrap/bootstrap.pro
...
Reading /home/xabi/dmi/dep/qt/qt-everywhere-opensource-src-4.6.4/translations/translations.pro
  790 projects found.

Creating makefiles. Please wait...
  for /home/xabi/dmi/dep/qt/qt-everywhere-opensource-src-4.6.4/tools/qtestlib/wince/remotelib/remotelib.pro
  for /home/xabi/dmi/dep/qt/qt-everywhere-opensource-src-4.6.4/tools/designer/src/components/lib/lib.pro
potential duplicate alias detected: 'widget.png'
  for /home/xabi/dmi/dep/qt/qt-everywhere-opensource-src-4.6.4/tools/assistant/lib/lib.pro
 ...
  for /home/xabi/dmi/dep/qt/qt-everywhere-opensource-src-4.6.4/src/plugins/phonon/gstreamer/gstreamer.pro
  for /home/xabi/dmi/dep/qt/qt-everywhere-opensource-src-4.6.4/src/plugins/phonon/mmf/mmf.pro
Error: Symbian SDK registry key not found
Error: failed to find epoc root
Either
    1. Set EPOCROOT environment variable to a valid value
 or 2. Ensure that the HKEY_LOCAL_MACHINE\Software\Symbian\EPOC SDKs\CommonPath registry key is set, and then
       a. Set EPOCDEVICE environment variable to a valid device
    or b. Specify a default device in the devices.xml file.
  for /home/xabi/dmi/dep/qt/qt-everywhere-opensource-src-4.6.4/src/plugins/phonon/waveout/waveout.pro
  ...
  for /home/xabi/dmi/dep/qt/qt-everywhere-opensource-src-4.6.4/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/qwebframe.pro

Qt is now configured for building. Just run 'make'.
Once everything is built, you must run 'make install'.
Qt will be installed into /home/xabi/dmi/dep/install/amd64

To reconfigure, run 'make confclean' and 'configure'.

制作失败:

64_SOURCE -D_LARGEFILE_SOURCE -I../../mkspecs/qws/linux-x86_64-g++ -I. -I../../include/QtCore -I../../include/QtNetwork -I../../include -I../../include/QtGui -I.rcc/release-static-emb-x86_64 -I/usr/include/freetype2 -I../3rdparty/harfbuzz/src -Idialogs -I.moc/release-static-emb-x86_64 -I.uic/release-static-emb-x86_64 -o .obj/release-static-emb-x86_64/qheaderview.o itemviews/qheaderview.cpp
itemviews/qabstractitemview.cpp: In member function ‘virtual void QAbstractItemView::keyPressEvent(QKeyEvent*)’:
itemviews/qabstractitemview.cpp:2311:10: error: ‘Key_BackSpace’ is not a member of ‘Qt’
     case Qt::Key_BackSpace:
          ^
g++ -c -include .pch/release-static-emb-x86_64/QtGui -pipe -m64 -fno-exceptions -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -O2 -fvisibility=hidden -fvisibility-inlines-hidden -Wall -W -D_REENTRANT -fPIC -DQT_BUILD_GUI_LIB -DQT_NO_USING_NAMESPACE -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_NO_FONTCONFIG -DQT_NO_OPENTYPE -DQT_NO_STYLE_MAC -DQT_NO_STYLE_WINDOWSVISTA -DQT_NO_STYLE_WINDOWSXP -DQT_NO_STYLE_GTK -DQT_NO_STYLE_WINDOWSCE -DQT_NO_STYLE_WINDOWSMOBILE -DQT_NO_STYLE_S60 -DQ_INTERNAL_QAPP_SRC -DQT_NO_DEBUG -DQT_NETWORK_LIB -DQT_CORE_LIB -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I../../mkspecs/qws/linux-x86_64-g++ -I. -I../../include/QtCore -I../../include/QtNetwork -I../../include -I../../include/QtGui -I.rcc/release-static-emb-x86_64 -I/usr/include/freetype2 -I../3rdparty/harfbuzz/src -Idialogs -I.moc/release-static-emb-x86_64 -I.uic/release-static-emb-x86_64 -o .obj/release-static-emb-x86_64/qlistview.o itemviews/qlistview.cpp
Makefile:126493: recipe for target '.obj/release-static-emb-x86_64/qabstractitemview.o' failed
make[1]: *** [.obj/release-static-emb-x86_64/qabstractitemview.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/home/xabi/dmi/dep/qt/qt-everywhere-opensource-src-4.6.4/src/gui'
Makefile:306: recipe for target 'sub-gui-make_default-ordered' failed
make: *** [sub-gui-make_default-ordered] Error 2

问题是什么?有什么想法吗?

0 个答案:

没有答案
相关问题