[Interest] Building app with clang++ and Qt 5.x/gcc_64 SDK
Thiago Macieira
thiago.macieira at intel.com
Thu Jun 16 16:34:27 CEST 2016
On quinta-feira, 16 de junho de 2016 20:21:40 PDT Ch'Gans wrote:
> Hi there,
>
> I'm on Ubuntu Linux 16.04, i have installed Qt 5.5, 5,6 and 5.7 using
> the Qt unified online installer. I would like to know if it is
> supported to build a Qt app using clang++/64 and Qt 5.x gcc/64
> official binaries.
It is, if the compiler works.
> Right now, I'm having building errors like:
> ----------------------------------------------------------------------------
> -------------- ...
> /usr/bin/clang++ -m64 -g -O0 -Wall -Wextra -pipe -fexceptions
> -fvisibility=default -std=c++11 -stdlib=libstdc++ -fPIC [...]
> ...
> In file included from
> /home/krys/Qt5.7.0/5.7/gcc_64/include/QtCore/qbytearray.h:52:
> /usr/include/c++/v1/string:1938:44: error: 'basic_string<_CharT,
> _Traits, _Allocator>' is missing exception specification
> 'noexcept(is_nothrow_copy_constructible<allocator_type>::value)'
> basic_string<_CharT, _Traits, _Allocator>::basic_string(const
> allocator_type& __a)
The error is inside a file that is not part of Qt. That's not our problem.
Please fix your compiler and/or the file in question.
Also note how the file is in /usr/include/c++/v1 (libc++), even if your clang
command-line says -stdlib=libstdc++. Something is really wrong with your
compiler (assuming the [...] didn't hide anything important).
> I'm not sure if this is a Ubuntu 16.04 bug, a Qt bug or if simply this
> kind of build is simply not supported.
It is. I compile Qt with Clang on Linux about once a month.
I only test the current version and the upcoming one (respectively right now,
3.8 and 3.9). My recommendation is that if you're going to opt for a non-
standard compiler that is known to produce slightly worse code than the
default, you should make sure you're using something no more than a year old.
I will not help with anything older than Clang 3.8 right now.
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
More information about the Interest
mailing list