Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-48001

FTBFS ICC 15.x/16.0 on OS X: error: no instance of constructor "std::atomic_address::atomic_address" matches the argument list

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • Not Evaluated
    • None
    • 5.6.0, 5.7
    • Core: Threads
    • macOS

    Description

      Intel Issue ID: 6000117300

      When compiling Qt 5.6 or 5.7 with ICC 15.x or 16.0 on OS X, the build stops with the following error messge:

      stdatomic.h(454): error: no instance of constructor "std::atomic_address::atomic_address" matches the argument list
                  argument types are: (const int *)
            : atomic_address(_Ptr)
                            ^
                detected during:
                  instantiation of "std::atomic<T *>::atomic(T *) [with T=const int]" at line 304 of "../../include/QtCore/../../../../../../src/qt/qt5/qtbase/src/corelib/thread/qbasicatomic.h"
                  instantiation of "QBasicAtomicPointer<X>::QBasicAtomicPointer(QBasicAtomicPointer<X>::Type) [with X=const int]" at line 164 of "../../include/QtCore/../../../../../../src/qt/qt5/qtbase/src/corelib/thread/qatomic.h"
                  instantiation of "QAtomicPointer<T>::QAtomicPointer(T *) [with T=const int]" at line 142 of "../../include/QtCore/5.6.0/QtCore/private/../../../../../../../../../src/qt/qt5/qtbase/src/corelib/kernel/qobject_p.h"
      

      This is caused by a bug in the ICC-supplied stdatomic.h header. This has been reported to Intel and will be fixed in a future version of ICC.

      The following patch fixes the issue:

      stdatomic.diff
      --- /usr/bin/icpc-16.0-base/compiler/include/stdatomic.h.orig	2015-08-28 15:05:13.000000000 -0700
      +++ /usr/bin/icpc-16.0-base/compiler/include/stdatomic.h	2015-08-28 15:06:00.000000000 -0700
      @@ -451,7 +451,7 @@
           }
           _STRONG_INLINE atomic() _DEFAULTED
           _STRONG_INLINE _CONSTEXPR atomic(T* _Ptr)
      -    : atomic_address(_Ptr)
      +    : atomic_address((void*)_Ptr)
           {
           }
           _STRONG_INLINE T* operator+=(ptrdiff_t _V) volatile
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            thiago Thiago Macieira
            thiago Thiago Macieira
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes