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

error: static declaration of 'qt_nanosleep' follows non-static declaration

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • None
    • 6.6
    • Core: Other
    • None
    • macOS

    Description

      on mac + unity_build (batch_size=16), the qt_nanosleep symbol from qelapsedtimer_mac.cpp clashes with another in qthread_unix.cpp:

       

      FAILED: qtbase/src/corelib/CMakeFiles/Core.dir/Unity/unity_9_cxx.cxx.o 2023-04-04T16:18:35.8762460Z $BUILD_PREFIX/bin/x86_64-apple-darwin13.4.0-clang++ -DBACKTRACE_HEADER=\"execinfo.h\" -DCore_EXPORTS -DGL_SILENCE_DEPRECATION -DQT_ASCII_CAST_WARNINGS -DQT_BUILDING_QT -DQT_BUILD_CORE_LIB -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_UP_TO=0x050000 -DQT_EXPLICIT_QFILE_CONSTRUCTION_FROM_PATH -DQT_LEAN_HEADERS=1 -DQT_MOC_COMPAT -DQT_NO_AS_CONST=1 -DQT_NO_CAST_TO_ASCII -DQT_NO_DEBUG -DQT_NO_FOREACH -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_USING_NAMESPACE -DQT_TYPESAFE_FLAGS -DQT_USE_QSTRINGBUILDER -DQT_WARN_DEPRECATED_UP_TO=0x070000 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I$SRC_DIR/build/qtbase/src/corelib/Core_autogen/include -I$SRC_DIR/build/qtbase/include -I$SRC_DIR/build/qtbase/include/QtCore -I$SRC_DIR/qtbase/src/corelib -I$SRC_DIR/build/qtbase/src/corelib -I$SRC_DIR/build/qtbase/src/corelib/global -I$SRC_DIR/build/qtbase/src/corelib/kernel -I$SRC_DIR/qtbase/src/corelib/../3rdparty/tinycbor/src -I$SRC_DIR/build/qtbase/include/QtCore/6.5.0 -I$SRC_DIR/build/qtbase/include/QtCore/6.5.0/QtCore -I$SRC_DIR/qtbase/src/corelib/../3rdparty/forkfd -I$SRC_DIR/build/qtbase/src/corelib/.rcc -I$SRC_DIR/qtbase/mkspecs/macx-clang -isystem $PREFIX/include/glib-2.0 -isystem $PREFIX/lib/glib-2.0/include -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -fmessage-length=0 -isystem $PREFIX/include -fdebug-prefix-map=$SRC_DIR=/usr/local/src/conda/qt6-main-6.5.0 -fdebug-prefix-map=$PREFIX=/usr/local/src/conda-prefix -DNDEBUG -O3 -std=c++17 -isysroot /Applications/Xcode_13.2.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk -mmacosx-version-min=10.14 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wextra -fapplication-extension -Winvalid-pch -Xclang -include-pch -Xclang $SRC_DIR/build/qtbase/src/corelib/CMakeFiles/Core.dir/cmake_pch.hxx.pch -Xclang -include -Xclang $SRC_DIR/build/qtbase/src/corelib/CMakeFiles/Core.dir/cmake_pch.hxx -MD -MT qtbase/src/corelib/CMakeFiles/Core.dir/Unity/unity_9_cxx.cxx.o -MF qtbase/src/corelib/CMakeFiles/Core.dir/Unity/unity_9_cxx.cxx.o.d -o qtbase/src/corelib/CMakeFiles/Core.dir/Unity/unity_9_cxx.cxx.o -c $SRC_DIR/build/qtbase/src/corelib/CMakeFiles/Core.dir/Unity/unity_9_cxx.cxx 2023-04-04T16:18:35.8865670Z In file included from $SRC_DIR/build/qtbase/src/corelib/CMakeFiles/Core.dir/Unity/unity_9_cxx.cxx:17: 2023-04-04T16:18:35.8968090Z $SRC_DIR/qtbase/src/corelib/thread/qthread_unix.cpp:502:13: error: static declaration of 'qt_nanosleep' follows non-static declaration 2023-04-04T16:18:35.9069770Z static void qt_nanosleep(timespec amount) 2023-04-04T16:18:35.9171400Z ^ 2023-04-04T16:18:35.9273130Z $SRC_DIR/qtbase/src/corelib/kernel/qelapsedtimer_mac.cpp:65:6: note: previous definition is here 2023-04-04T16:18:35.9374960Z void qt_nanosleep(timespec amount) 2023-04-04T16:18:35.9463900Z ^ 2023-04-04T16:18:35.9565630Z In file included from $SRC_DIR/build/qtbase/src/corelib/CMakeFiles/Core.dir/Unity/unity_9_cxx.cxx:17: 2023-04-04T16:18:35.9667690Z $SRC_DIR/qtbase/src/corelib/thread/qthread_unix.cpp:518:5: error: call to 'qt_nanosleep' is ambiguous 2023-04-04T16:18:35.9769390Z qt_nanosleep(makeTimespec(std::chrono::seconds{secs})); 2023-04-04T16:18:35.9871090Z ^~~~~~~~~~~~ 2023-04-04T16:18:35.9972810Z $SRC_DIR/qtbase/src/corelib/kernel/qelapsedtimer_mac.cpp:65:6: note: candidate function 2023-04-04T16:18:36.0074760Z void qt_nanosleep(timespec amount) 2023-04-04T16:18:36.0176370Z ^ 2023-04-04T16:18:36.0277990Z $SRC_DIR/qtbase/src/corelib/thread/qthread_unix.cpp:502:13: note: candidate function 2023-04-04T16:18:36.0379680Z static void qt_nanosleep(timespec amount) 2023-04-04T16:18:36.8455290Z ^ 2023-04-04T16:18:37.3551170Z $SRC_DIR/qtbase/src/corelib/thread/qthread_unix.cpp:523:5: error: call to 'qt_nanosleep' is ambiguous 2023-04-04T16:18:37.3552670Z qt_nanosleep(makeTimespec(std::chrono::milliseconds{msecs})); 2023-04-04T16:18:37.3553670Z ^~~~~~~~~~~~ 2023-04-04T16:18:37.3654930Z $SRC_DIR/qtbase/src/corelib/kernel/qelapsedtimer_mac.cpp:65:6: note: candidate function 2023-04-04T16:18:37.3756420Z void qt_nanosleep(timespec amount) 2023-04-04T16:18:37.3857930Z ^ 2023-04-04T16:18:37.3909300Z $SRC_DIR/qtbase/src/corelib/thread/qthread_unix.cpp:502:13: note: candidate function 2023-04-04T16:18:37.4011250Z static void qt_nanosleep(timespec amount) 2023-04-04T16:18:37.4113010Z ^ 2023-04-04T16:18:37.4189090Z $SRC_DIR/qtbase/src/corelib/thread/qthread_unix.cpp:528:5: error: call to 'qt_nanosleep' is ambiguous 2023-04-04T16:18:37.4290930Z qt_nanosleep(makeTimespec(std::chrono::microseconds{usecs})); 2023-04-04T16:18:37.4392470Z ^~~~~~~~~~~~ 2023-04-04T16:18:37.4494030Z $SRC_DIR/qtbase/src/corelib/kernel/qelapsedtimer_mac.cpp:65:6: note: candidate function 2023-04-04T16:18:37.4595650Z void qt_nanosleep(timespec amount) 2023-04-04T16:18:37.4697210Z ^ 2023-04-04T16:18:37.4798990Z $SRC_DIR/qtbase/src/corelib/thread/qthread_unix.cpp:502:13: note: candidate function 2023-04-04T16:18:37.4900620Z static void qt_nanosleep(timespec amount) 2023-04-04T16:18:37.5002200Z ^ 2023-04-04T16:18:37.5103770Z 4 errors generated.

       

      Attachments

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

        Activity

          People

            thiago Thiago Macieira
            jschueller Julien Schueller
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes