Majid Max
Majid Max

Reputation: 517

Compiling Qt 4.8.3 on Ubuntu 12 failing

I am new to Ubuntu and i am getting a message while building Qt 4.8.3 on Ubuntu 12:

Basic XLib functionality test failed! You might need to modify the include and library search paths by editing QMAKE_INCDIR_X11 and QMAKE_LIBDIR_X11 in /home/majidmax/qt-everywhere-opensource-src-4.8.3/mkspecs/linux-g++.

what the proper steps to build Qt on Ubuntu?

Upvotes: 7

Views: 11413

Answers (6)

Chris Padgett
Chris Padgett

Reputation: 71

The error message doesn't give a lot of information as to the actual issue of XLib failing.

To get more information on the error causing it to fail you can 'make' the xlib tests:

$ cd <Qt_Source_Directory>/config.tests/x11/xlib/
$ make
g++ -Wl,-O1 -o xlib xlib.o    -L/usr/X11R6/lib -ltcg -lXext -lX11 -lm
/usr/bin/ld: cannot find -ltcg
collect2: error: ld returned 1 exit status
make: *** [xlib] Error 1

In my case above, I was using -ltcg which was being interpreted as an explicit library to include. I was using this option as it is listed on the qt 4.8 configure options as:

Use Link Time Code Generation

When I looked at the configure options using ./configure --help I noticed that this option isn't listed. Removing the option from my configure line fixed my issue.

Upvotes: 2

Rahul chand verma
Rahul chand verma

Reputation: 21

Same problem i faced in fedora20 (64-bit) for Qt-4.8.3

1)- yum install libXext-devel

(internet connectivity should be there for checking the dependency and install all dependency).

2)- ./configure

3)- make

4)- make install

5)- Installation finish successfully.

Upvotes: 1

Freedom_Ben
Freedom_Ben

Reputation: 11923

These are the packages you need to install and you'll be good to go. I just had this same problem and this worked for me. These came from the link provided by Garlic Tseng in the accepted answer. I am just putting these here for convenience:

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

One (copy pastable) command to install all:

sudo apt-get install libfontconfig1-dev libfreetype6-dev libx11-dev libxcursor-dev libxext-dev libxfixes-dev libxft-dev libxi-dev libxrandr-dev libxrender-dev

Upvotes: 8

NG_
NG_

Reputation: 7173

What about sudo apt-get build-dep qt4-qmake?

Try to run that command before you compile Qt (on Debian-like distros).

Upvotes: 4

Amit Tomar
Amit Tomar

Reputation: 4858

what the proper steps to build Qt on Ubuntu?

  1. Check the Qt supported Platforms.

  2. Check Qt for X11 requirements.

    3a. Check steps to install Qt on X11 platforms(along with build).

    or

    3b. Check steps to build static Qt.

Upvotes: 0

Garlic Tseng
Garlic Tseng

Reputation: 490

http://qt-project.org/doc/qt-4.8/requirements-x11.html

the website provide the package list which must be installed

try it~

Upvotes: 9

Related Questions