0

I'm working on a project with Qt. I have download and compile my Qt 4.8.7 version without problems on Ubuntu 14.04 and Ubuntu 16.04.

I have followed the next steps:

Install cross compilation tools and package dependencies

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

Download 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

Configure, compile and install Qt for the host system

./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

As I said... This is working perfectly with qt 4.8.7. Now I'm trying to the the same with an old Qt version 4.6.4. But It doesn't work. This is the ./configure output:

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'.

And the make fails:

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

What's the problem? Any idea?

Xabi E
  • 251
  • 2
  • 3
  • 15
  • There is a typo in that version. `Qt::Key_BackSpace` should be `Qt::Key_Backspace`. – thuga Oct 11 '17 at 14:34
  • I have tried to replacing Qt::Key_BackSpace to Qt::Key_Backspace and it seems to work. but now a new error is shown: **codemodel.h:99:13: error: ‘insert’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]** – Xabi E Oct 11 '17 at 14:49
  • https://stackoverflow.com/questions/18258879/qt4-build-fails-with-message-error – Marco Oct 11 '17 at 15:14
  • Thanks man. It seems to work!! – Xabi E Oct 11 '17 at 15:28

0 Answers0