[Development] I can't build Qt5 of stable branch under linux

Thiago Macieira thiago.macieira at intel.com
Sat Mar 23 17:17:23 CET 2013

On sábado, 23 de março de 2013 23.17.07, liang jian wrote:
>     the build process failed in qtbase, the error message is listed below:

> make[2]: 没有什么可以做的为 `first'。

I'm guessing this one is "No rule to make target `first'"

> /mnt/sda7/liang/qt/qt5/qtbase/bin/moc -DQT_NO_LIBUDEV
> -D_LARGEFILE_SOURCE -I../../mkspecs/linux-g++-64 -I. -I../../include
> -I../../include/QtCore -I../../include/QtCore/5.1.0
> -I../../include/QtCore/5.1.0/QtCore -Iglobal -I../3rdparty/pcre
> -I../3rdparty/harfbuzz/src -I../3rdparty/md5 -I../3rdparty/md4
> -I../3rdparty/sha3 -I.moc/debug-shared

Up until here, everything looked fine. Starting on the next line, things start 
to get really freaky:

> -IIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/4.7/:/usr/lib/gcc/x86_64-linux-g
> nu/4.7/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/4.7/../../..
> /../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr
> /lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../:/lib/:/usr/lib/
> -IOLLECT_GCC_OPTIONS='-m64' '-pipe' '-E' '-v' '-shared-libgcc'
> '-mtune=generic' '-march=x86-64'
> -IOMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/4.7/:/usr/lib/gcc/x86_64-linux-
> gnu/4.7/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/4.7/:/
> usr/lib/gcc/x86_64-linux-gnu/ -I/usr/include -I/usr/include/c++/4.7


Can you attach you mkspecs/qconfig.pri after configure finished running?

> -I/usr/include/c++/4.7/backward -I/usr/include/c++/4.7/x86_64-linux-gnu
> -I/usr/include/x86_64-linux-gnu
> -I/usr/lib/gcc/x86_64-linux-gnu/4.7/include
> -I/usr/lib/gcc/x86_64-linux-gnu/4.7/include-fixed -I/usr/local/include
> -I��索列表结束。 animation/qabstractanimation.h -o

Another freaky -I option.

> .moc/debug-shared/moc_qabstractanimation.cpp
> Qt Meta Object Compiler version 67 (Qt 5.1.0)

There was a -v above from one the "COLLECT_GCC_OPTIONS", which caused moc to 
simply print its version and exit.

>     I think this error is something related to my chinese language
> environment, since there is some invalid character in moc command line
> option -I

I'm not sure it's because of Chinese, but it's a very good candidate. Can you 
retry the following combinations:

 a) run configure as you have, but run switch to English (export LC_ALL=C) 
before running make
 b) run configure in English (export LC_ALL=C) but make in Chinese
 c) run both in English

The problem is that configure runs gcc with some special options and tries to 
parse the default include dirs, which is stored in QMAKE_DEFAULT_INCDIRS in 
mkspecs/qconfig.pri. That failed spectacularly. It could be because of your 
Chinese language or it could be something else with your GCC.

So, can you also attach the output of:
	gcc -xc++ -v - < /dev/null 2>&1 > /dev/null

Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/development/attachments/20130323/a8783e8e/attachment.sig>

More information about the Development mailing list