[Development] Error "invokes deleted constructor" while building Qt5 with clang and libc++
Olivier Goffart
olivier at woboq.com
Mon Dec 3 18:03:44 CET 2012
On Monday 03 December 2012 07:43:21 Thiago Macieira wrote:
> On segunda-feira, 3 de dezembro de 2012 15.09.15, Stephen Kelly wrote:
> > On Monday, December 03, 2012 12:02:14 Francisco Lopes da Silva wrote:
> > > > Wow, I missed that in my sample, now I see. Indeed it looks like a
> > > > compiler bug indeed. I'll report to LLVM Bug List.
> > >
> > > Reported to http://llvm.org/bugs/show_bug.cgi?id=14486.
> >
> > Is there a workaround for this issue?
>
> Yes, it's possible to work around it if clang is released with this bug.
> qbasicatomic.h already has this as a workaround for a similar bug in clang:
>
> # if defined(Q_CC_CLANG) && ((((__clang_major__ * 100) + __clang_minor__) <
> 302) \
>
> || defined(__apple_build_version__) \
>
> )
> /* Do not define QT_BASIC_ATOMIC_HAS_CONSTRUCTORS for "stock" clang
> before version 3.2.
> Apple's version has different (higher!) version numbers, so disable it
> for all of them for now.
> (The only way to distinguish between them seems to be a check for
> __apple_build_version__ .)
>
> For details about the bug: see
> http://llvm.org/bugs/show_bug.cgi?id=12670
> */
> # else
> # define QT_BASIC_ATOMIC_HAS_CONSTRUCTORS
> # endif
>
> We need to change the 3.2 / 302 to 3.4 / 304.
>
> Also, can someone check if 3.2 did compile this correctly? If so, this is a
> regression in 3.3 and would qualify even more strongly for release blocker.
Clang 3.2 is not released yet. (But already branched)
The bug is in both in 3.1 release and trunk.
--
Olivier
Woboq - Qt services and support - http://woboq.com
More information about the Development
mailing list