Problem installing Fedora18/19 on VMWare

During my attempts to install Fedora as virtual machine we got following error:

VMWare Fedora problem
dracut-initqueue[350]: mount: /dev/sr1 is write-protected, mounting read-only
dracut-initqueue[350]: warning: Could not boot

Entering emergency mode. Exit the shell to continue
Type "journalctl" to view systm logs.

dracut:/#

The solution is pretty simple. The problem is inside VMWare automatical installer and VMWare’s autoinst.iso image which is automatically connected to virtual machine.
To resolve this issue, stop your virtual machine, open Edit virtual machine settings and remove first CD drive with mounted autoinst.iso.

How to fix problem when installing Fedora on VMW

When you remove this iso from you VM, run it again and everything will work as expected.

Fedora installation

List of known issues and tips

This is list of all known issues and problems which we had to solve during our first Qt installation on Linux, Windows and Mac.

Known errors

Error: undefined interface

What to do when compilation of QT crash with message “Error: undefined interface”.
http://www.qtforum.org/article/31561/error-when-building-libraries.html
http://www.qtcentre.org/threads/26245-Qt-4.6-api/qscriptextensionplugin.h(43)-Error-Undefined-interface

make: g++: Command not found

it’s necessary to instal g++ support (sudo apt-get install g+)

Basic XLib functionality test failed!

it’s necessary to instal xlib(xorg??) support (sudo apt-get install xorg-dev)

*** [sub-corelib-make_default-ordered] Error 2

Probably mishmash on 32bit / 64bit  system and QT versions.

undefined reference to `QEventDispatcherGlib::versionSupported()’

Probably missing libglib2.0-dev on your system. (sudo apt-get install libglib2.0-dev).

Undefined reference to QSslSocket::*

Missing OpenSSL library on your system. (sudo apt-get install libssl-dev)

gtk/gtk.h: No such file or directory

Missing gtk package. (sudo apt-get install libgtk2.0-dev ). After that its necessary to update db (sudo updatedb).

if system can’t find file gtk/gtk.h because gtk is stored in gtk-2.0 directory, add -I (capitalised i) param to configure with gtk path:

./configure -opensource -I /usr/include/gtk-2.0

cups/cups.h: No such file or directory

install libcups2. (sudo apt-get install libcups2-dev)

gst/gst.h: No such file or directory

install gstreamer 0.10. (sudo apt-get install libgstreamer0.10-dev)

Missing Include/glibconfig.h

it’s because this file isn’t in /usr/include/glib-2.0, but in /usr/lib/glib-2.0. So you have to include also this /usr/lib path or copy file to include/glib-2.0

Hints and tips

How to create symbolic link to directory

create symbolic link using ln -nsf /usr/include/gtk-2.0/gtk /usr/include/gtk

Minimal required libraries

List of libraries required by Qt:

  • libfontconfig1-dev
  • libfreetype6-dev
  • libx11-dev
  • libxcursor-dev
  • libxext-dev
  • libxfixes-dev
  • libxft-dev
  • libxi-dev
  • libxrandr-dev
  • libxrender-dev

And other which are required by some modules of Qt:

To install all required on Linux, use following commands

sudo apt-get install libfontconfig1-dev libfreetype6-dev libx11-dev libxcursor-dev libxext-dev libxfixes-dev libxcups/cups.h: No such file or directory ft-dev libxi-dev libxrandr-dev libxrender-dev

sudo apt-get install bison flex libqt4-dev libqt4-opengl-dev libphonon-dev libicu-dev libsqlite3-dev libxext-dev libxrender-dev gperf libfontconfig1-dev libphonon-dev

If error doesn’t disappear after installing correct library

Sometimes it’s necessary to reconfigure Qt using make confclean

How to find where is missing header file located on disk

Use find /path -iname xxx.h command

How to find package which contains missing header file

use apt-file application with following syntax:

apt-file search gdk/gdk.h

Useful links about instalation Qt on linux

List of links about installation:
Building Qt on Linux

Qt configuration for succesfull build

This is currently my latest configure command to compile Qt on my Ubuntu 10.10.

Compilation fixes

This is necessary when search path for following libraries isn’t entered to configure.

sudo ln -nsf /usr/include/gstreamer-0.10/gst /usr/include/gst

Todo

Figure out how works pkg-config (pkg-config –cflags gstreamer-0.10)

Qt installation and configuration

This is our company step-by-step guide to install and configure Qt on our developer machines.

How to install Qt

Link to Qt download site: http://qt.nokia.com/downloads

Windows (VS2005)

Download VS 2008 distribution from download site. When 2008 distribution is downloaded, it’s necessary to reconfigure and rebuild it for VS 2005 using next steps.

Linux

Download linux/x11 distro from Qt page. Download 32/64bit distro package. Setup downloaded files as executables:

chmod +x qt-sdk-linux-x86-opensource-2009.01.bin
chmod +x qt-creator-linux-x86-opensource-1.0.0.bin

Install Qt sdk to default directory and begin with configuration.

MacOS

Download latest Qt SDK distribution and latest XCode developer pack from apple site. Then install both.

How to configure Qt

Qt configuration is done via Configure script/executable on all platforms.

Windows

Run “Start menu->Visual studio->Tools-> Visual studio command prompt”
Then go to “c:\Qt\Qt_Version\Qt” and run “configure” with additional params.

Our current configuration:

configure -debug-and-release -opensource -shared -platform win32-msvc2005 -incredibuild-xge -openssl

Clean configurations

run nmake confclean and nmake distclean to remove all previous version of QT compilations.

SSL support

For SSL Support add -openssl switch to configure.

Note!

: configure param HAVE TO be executed from Visual studio command prompt!

Linux

Enter Qt directory and enter following configure param:

./configure -opensource -I /usr/include/gtk-2.0 -L /usr/lib/gt-2.0 -I  /usr/include/gstreamer-0.10 -L /usr/lib/gstreamer-0.10 -I /usr/include/glib-2.0 -L /usr/lib/glib-2.0 -I /usr/include/libxml2 -fast

Clean configurations

run make confclean and then configure.

MacOS

How to compile Qt

Windows

Compile Qt using command prompt:

  • Run Visual studio command prompt.
  • And run nmake to build a whole library

Second option is open projects.sln located in p:/Qt/4.7.1/ using Visual Studio IDE  and compile it.

Linux

  • As first thing, use configure to setup Qt settings.
  • As next, run make to build a whole library
  • After a while when everything is compiled, use make install. This will install library to /usr/local/Trolltech/Qt-4.7.0

MacOS

Currently not tested, using default compilation.

How to compile application

When we have prepared Qt library, it’s time to compile our application.

MacOS

When using  qmake without additional params, qmake generate xcode project from .pro instad makefile for g++. To generate makefile, use following params:

qmake -spec macx-g++
make

Deploying application

Windows

Not testes.

External link: http://doc.trolltech.com/4.5/deployment-windows.html

Linux

Not testes.

MacOS

Not testes.