[Interest] building Qt 5.9 on Linux - clang or GCC?

tomek osmial.tomek at gmail.com
Fri Dec 22 01:00:32 CET 2017


2017-12-21 13:03 GMT+01:00 Thiago Macieira <thiago.macieira at intel.com>:

> On quinta-feira, 21 de dezembro de 2017 02:11:52 CST tomek wrote:
> > I should think about airports and hotels... sorry for that.
> >
> > But getting back to the topic, I've started build configuration as
> usually
> > using GCC - without passing this flag at all. But it failed with this
> error:
> >
> > ERROR: C++11 <random> is required and is missing or failed to compile.
>
> You need to fix this error before compiling Qt. As the message says, C++11
> <random> is required for Qt.
>
> In the qtbase sources, you'll find
> config.tests/unix/cxx11_random/cxx11_random.cpp
>
> Fix your compiler so it compiles that file.
>
> It works just fine with Clang on Linux for me.
>
> $ clang -std=c++11 -fsyntax-only config.tests/unix/cxx11_random/
> cxx11_random.cpp
>
>
And it works also for me too, but command executed during 'configure'
script execution lacks -std=c++11 flag:

$ clang++ -c -pipe -O2 -w -fPIC
-I/home/tomek/workspace/qt-dev/qt5/qtbase/config.tests/unix/cxx11_random
-I. -I/home/tomek/workspace/qt-dev/qt5/qtbase/mkspecs/linux-clang -o
cxx11_random.o
/home/tomek/workspace/qt-dev/qt5/qtbase/config.tests/unix/cxx11_random
/cxx11_random.cpp

Executing:

$ clang -fsyntax-only config.tests/unix/cxx11_random/cxx11_random.cpp

also fails - which is obvious but that's the case I'm trying to explain.
It looks like there might be an issue in build system since it is not
passing those flags.
But if it works for you it must be something wrong in my configuration.

I've updated my sources, switched to dev branch and run:

../configure -platform linux-clang -opensource -nomake examples -nomake
tests

and still having:

ERROR: C++11 <random> is required and is missing or failed to compile.

$ clang -v
> clang version 5.0.0 (tags/RELEASE_500/final 312548)
> Target: x86_64-unknown-linux-gnu
> Thread model: posix
> InstalledDir: /home/tjmaciei/bin
> Found candidate GCC installation: /usr/lib64/gcc/x86_64-suse-linux/7
> Selected GCC installation: /usr/lib64/gcc/x86_64-suse-linux/7
> Candidate multilib: .;@m64
> Candidate multilib: 32;@m32
> Selected multilib: .;@m64
>
> > clang++ -v
clang version 5.0.0-3 (tags/RELEASE_500/final)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Found candidate GCC installation: /usr/bin/../lib/gcc/i686-linux-gnu/7
Found candidate GCC installation: /usr/bin/../lib/gcc/i686-linux-gnu/7.2.0
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/5
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.1
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/6
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/6.4.0
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/7
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/7.2.0
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/7
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/7.2.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.4.1
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6.4.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7.2.0
Selected GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/7.2.0
Candidate multilib: .;@m64
Selected multilib: .;@m64

> --
> Thiago Macieira - thiago.macieira (AT) intel.com
>   Software Architect - Intel Open Source Technology Center
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20171222/b5825076/attachment.html>


More information about the Interest mailing list