[Development] "error: ran out of registers during register allocation" when building qlibrary.cpp on macOS 11.6 with Clang 13

Mitch Curtis mitch.curtis at qt.io
Mon Nov 22 14:47:04 CET 2021


I'm running into the following error on macOS 11.6 with Clang 13:

[577/1574] Building CXX object src/corelib/CMakeFiles/Core.dir/plugin/qlibrary.cpp.o
FAILED: src/corelib/CMakeFiles/Core.dir/plugin/qlibrary.cpp.o
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -DCore_EXPORTS -DGL_SILENCE_DEPRECATION -DPCRE2_CODE_UNIT_WIDTH=16 -DQT_ASCII_CAST_WARNINGS -DQT_BUILDING_QT -DQT_BUILD_CORE_LIB -DQT_DEPRECATED_WARNINGS -DQT_DEPRECATED_WARNINGS_SINCE=0x060000 -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_MOC_COMPAT -DQT_NO_CAST_TO_ASCII -DQT_NO_FOREACH -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_USING_NAMESPACE -DQT_STRICT_QLIST_ITERATORS -DQT_TYPESAFE_FLAGS -DQT_USE_QSTRINGBUILDER -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I/Users/mitch/dev/qt-dev-debug-non-fw/qtbase/src/corelib/Core_autogen/include -I/Users/mitch/dev/qt-dev-debug-non-fw/qtbase/include -I/Users/mitch/dev/qt-dev-debug-non-fw/qtbase/include/QtCore -I/Users/mitch/dev/qt-dev/qtbase/src/corelib -I/Users/mitch/dev/qt-dev-debug-non-fw/qtbase/src/corelib -I/Users/mitch/dev/qt-dev-debug-non-fw/qtbase/src/corelib/global -I/Users/mitch/dev/qt-dev-debug-non-fw/qtbase/src/corelib/kernel -I/Users/mitch/dev/qt-dev/qtbase/src/corelib/../3rdparty/tinycbor/src -I/Users/mitch/dev/qt-dev-debug-non-fw/qtbase/include/QtCore/6.3.0 -I/Users/mitch/dev/qt-dev-debug-non-fw/qtbase/include/QtCore/6.3.0/QtCore -I/Users/mitch/dev/qt-dev/qtbase/src/corelib/../3rdparty/double-conversion/double-conversion -I/Users/mitch/dev/qt-dev/qtbase/src/corelib/../3rdparty/double-conversion -I/Users/mitch/dev/qt-dev/qtbase/src/corelib/../3rdparty/forkfd -I/Users/mitch/dev/qt-dev-debug-non-fw/qtbase/src/corelib/.rcc -I/Users/mitch/dev/qt-dev-debug-non-fw/qtbase/mkspecs/macx-clang -I/Users/mitch/dev/qt-dev/qtbase/src/3rdparty/pcre2/src -fsanitize=address -fno-omit-frame-pointer -fno-optimize-sibling-calls -g -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.0.sdk -mmacosx-version-min=10.14 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wextra -Werror "-Wno-error=#warnings" -Wno-error=deprecated-declarations -fapplication-extension -std=c++17 -Winvalid-pch -Xclang -include-pch -Xclang /Users/mitch/dev/qt-dev-debug-non-fw/qtbase/src/corelib/CMakeFiles/Core.dir/cmake_pch.hxx.pch -Xclang -include -Xclang /Users/mitch/dev/qt-dev-debug-non-fw/qtbase/src/corelib/CMakeFiles/Core.dir/cmake_pch.hxx -MD -MT src/corelib/CMakeFiles/Core.dir/plugin/qlibrary.cpp.o -MF src/corelib/CMakeFiles/Core.dir/plugin/qlibrary.cpp.o.d -o src/corelib/CMakeFiles/Core.dir/plugin/qlibrary.cpp.o -c /Users/mitch/dev/qt-dev/qtbase/src/corelib/plugin/qlibrary.cpp
error: ran out of registers during register allocation

Compiler version:

Mitchs-MacBook-Pro:dev mitch$ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ --version
Apple clang version 13.0.0 (clang-1300.0.29.3)
Target: x86_64-apple-darwin20.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

Configuring Qt with these options:

-DCMAKE_BUILD_TYPE=Debug -DFEATURE_framework=OFF -DFEATURE_developer_build=ON -DQT_BUILD_TESTS=ON -DQT_BUILD_TESTS_BY_DEFAULT=OFF -DQT_BUILD_EXAMPLES=ON -DQT_BUILD_EXAMPLES_BY_DEFAULT=OFF -DFEATURE_sanitize_address=ON

A colleague has run into it as well, but for them it went away when upgrading to Clang 13.

Before I report it as a bug to llvm, I thought I'd check if anyone else has run into this or has any ideas as to what could be causing it. CCing Thiago since he touched that code last. :)

Cheers.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20211122/5b12fdb8/attachment.html>


More information about the Development mailing list