---------- Forwarded message ---------- From: Chris Gagneraud <chg...@googlemail.com> Date: 17 June 2016 at 15:15 Subject: Re: [Interest] Building app with clang++ and Qt 5.x/gcc_64 SDK To: Thiago Macieira <thiago.macie...@intel.com> Cc: "interest@qt-project.org" <interest@qt-project.org>
On 17 June 2016 at 02:34, Thiago Macieira <thiago.macie...@intel.com> wrote: > 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). Yes that was my problem, the full command line had 2 stdlib specs and so clang would always pick up libc++. The proper solution in my case (I'm using QBS), is: cpp.cxxStandardLibrary: "libstdc++"; > >> 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. Ubuntu 16.04 comes with clang 3.8. But their libc++ seems broken. Thanks a lot Thiago, Chris > > -- > Thiago Macieira - thiago.macieira (AT) intel.com > Software Architect - Intel Open Source Technology Center > > _______________________________________________ > Interest mailing list > Interest@qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest