-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.4.2
When I build Qt with Clang, the build process fails on steps that generate cache_adaptor(.h/.cpp), deviceeventcontroller_adaptor(.h/.cpp), socket_interface(.h/.cpp), and bus_interface(.h/.cpp). The failing command line invokes qdbusxml2cpp, which doesn't print any error messages. When I try to run the failing command line manually, it exits with a SIGSEGV inside QtPrivate::qustrchr.
Details
$ CC=clang CXX=clang++ CFLAGS="-march=native -mtune=native" CXXFLAGS="-march=native -mtune=native" ../qt-everywhere-src-6.4.2/configure -prefix ${HOME}/clang-en
v -headerdir ${HOME}/clang-env//include/qt6 -release -shared -submodules qtbase
+ mkdir -p qtbase
+ cd qtbase
+ exec /home/user/libs-dev/qt-everywhere-src-6.4.2/qtbase/configure -top-level -prefix /home/user/clang-env -headerdir /home/user/clang-env//include/qt6 -release -
shared -submodules qtbase
CMake Warning (dev) at /home/user/libs-dev/qt-everywhere-src-6.4.2/qtbase/cmake/QtBuildInformation.cmake:257 (set):
Cannot set "__qt_configure_reports": current scope has no parent.
Call Stack (most recent call first):
/home/user/libs-dev/qt-everywhere-src-6.4.2/qtsensors/src/sensors/configure.cmake:45 (qt_configure_add_report)
/home/user/libs-dev/qt-everywhere-src-6.4.2/qtbase/cmake/QtProcessConfigureArgs.cmake:242 (include)
This warning is for project developers. Use -Wno-dev to suppress it.'/usr/bin/cmake' '-DQT_BUILD_SUBMODULES=qtbase' '-DBUILD_SHARED_LIBS=ON' '-DCMAKE_INSTALL_PREFIX=/home/user/clang-env' '-DINSTALL_INCLUDEDIR=/home/user/clang-env/
include/qt6' '-DCMAKE_BUILD_TYPE=Release' '-G' 'Ninja' '/home/user/libs-dev/qt-everywhere-src-6.4.2'
-- The CXX compiler identification is Clang 15.0.7
-- The C compiler identification is Clang 15.0.7
-- The ASM compiler identification is Clang with GNU-like command-line
-- Found assembler: /home/user/clang-env/bin/clang
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /home/user/clang-env/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /home/user/clang-env/bin/clang - skipped
-- Detecting C compile features
-- Detecting C compile features - done
Checking dependencies of submodule 'qtbase'
Configuring submodule 'qtbase'
CMake Warning (dev) at qtbase/cmake/3rdparty/extra-cmake-modules/find-modules/FindXCB.cmake:180 (message):
XINPUT from XCB was requested: this is EXPERIMENTAL and is likely to
unavailable on many systems!
Call Stack (most recent call first):
qtbase/cmake/QtFindPackageHelpers.cmake:130 (find_package)
qtbase/src/gui/configure.cmake:123 (qt_find_package)
qtbase/cmake/QtFeature.cmake:573 (include)
qtbase/src/CMakeLists.txt:12 (qt_feature_evaluate_features)
This warning is for project developers. Use -Wno-dev to suppress it.CMake Warning (dev) at qtbase/cmake/3rdparty/extra-cmake-modules/find-modules/FindXCB.cmake:180 (message):
XINPUT from XCB was requested: this is EXPERIMENTAL and is likely to
unavailable on many systems!
Call Stack (most recent call first):
qtbase/cmake/QtFindPackageHelpers.cmake:130 (find_package)
qtbase/src/gui/configure.cmake:123 (qt_find_package)
qtbase/cmake/QtModuleHelpers.cmake:612 (include)
qtbase/src/gui/CMakeLists.txt:53 (qt_internal_add_module)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Configuration summary shown below. It has also been written to /home/user/libs-dev/qt-build/config.summary
-- Configure with --log-level=STATUS or higher to increase CMake's message verbosity. The log level does not persist across reconfigurations.-- Configure summary:Building for: linux-clang (x86_64, CPU features: mmx sse sse2)
Compiler: clang 15.0.7
Build options:
Mode ................................... release
Optimize release build for size ........ no
Fully optimize release builds (-O3) .... no
Building shared libraries .............. yes
Using C standard ....................... C11
Using C++ standard ..................... C++17
Using ccache ........................... no
Using new DTAGS ........................ yes
Relocatable ............................ yes
Using precompiled headers .............. yes
Using LTCG ............................. no
Using Intel CET ........................ no
Target compiler supports:
SSE .................................. SSE2 SSE3 SSSE3 SSE4.1 SSE4.2
AVX .................................. AVX AVX2 VAES
AVX512 ............................... F ER CD PF DQ BW VL IFMA VBMI AVX512VBMI2
Other x86 ............................ AES F16C RDRAND SHA
Sanitizers:
Addresses ............................ no
Threads .............................. no
Memory ............................... no
Fuzzer (instrumentation only) ........ no
Undefined ............................ no
Build parts ............................ libs tools
Qt modules and options:
Qt Concurrent .......................... yes
Qt D-Bus ............................... yes
Qt D-Bus directly linked to libdbus .... yes
Qt Gui ................................. yes
Qt Network ............................. yes
Qt PrintSupport ........................ yes
Qt Sql ................................. yes
Qt Testlib ............................. yes
Qt Widgets ............................. yes
Qt Xml ................................. yes
Support enabled for:
Using pkg-config ....................... yes
udev ................................... yes
Using system zlib ...................... yes
Zstandard support ...................... yes
Thread support ......................... yes
Common build options:
Linker can resolve circular dependencies yes
Qt Core:
backtrace .............................. yes
DoubleConversion ....................... yes
Using system DoubleConversion ........ yes
GLib ................................... yes
ICU .................................... yes
Using system libb2 ..................... yes
Built-in copy of the MIME database ..... yes
cpp/winrt base ......................... no
Tracing backend ........................ <none>
Logging backends:
journald ............................. no
syslog ............................... no
slog2 ................................ no
PCRE2 .................................. yes
Using system PCRE2 ................... yes
CLONE_PIDFD support in forkfd .......... yes
Qt Sql:
SQL item models ........................ yes
Qt Network:
getifaddrs() ........................... yes
IPv6 ifname ............................ yes
libproxy ............................... no
Linux AF_NETLINK ....................... yes
OpenSSL ................................ yes
Qt directly linked to OpenSSL ........ no
OpenSSL 1.1 ............................ yes
DTLS ................................... yes
OCSP-stapling .......................... yes
SCTP ................................... no
Use system proxies ..................... yes
GSSAPI ................................. yes
Brotli Decompression Support ........... yes
qTopLevelDomain() ...................... yes
Built-in publicsuffix database ....... yes
System publicsuffix database ......... yes
Core tools:
Android deployment tool ................ yes
macOS deployment tool .................. no
Windows deployment tool ................ no
qmake .................................. yes
Qt Gui:
Accessibility .......................... yes
FreeType ............................... yes
Using system FreeType ................ yes
HarfBuzz ............................... yes
Using system HarfBuzz ................ yes
Fontconfig ............................. yes
Image formats:
GIF .................................. yes
ICO .................................. yes
JPEG ................................. yes
Using system libjpeg ............... yes
PNG .................................. yes
Using system libpng ................ yes
Text formats:
HtmlParser ........................... yes
CssParser ............................ yes
OdfWriter ............................ yes
MarkdownReader ....................... yes
Using system libmd4c ............... yes
MarkdownWriter ....................... yes
EGL .................................... yes
OpenVG ................................. no
OpenGL:
Desktop OpenGL ....................... yes
OpenGL ES 2.0 ........................ no
OpenGL ES 3.0 ........................ no
OpenGL ES 3.1 ........................ no
OpenGL ES 3.2 ........................ no
Vulkan ................................. yes
Session Management ..................... yes
Features used by QPA backends:
evdev .................................. yes
libinput ............................... yes
HiRes wheel support in libinput ........ yes
INTEGRITY HID .......................... no
mtdev .................................. yes
tslib .................................. yes
xkbcommon .............................. yes
X11 specific:
XLib ................................. yes
XCB Xlib ............................. yes
EGL on X11 ........................... yes
xkbcommon-x11 ........................ yes
xcb-sm ............................... yes
QPA backends:
DirectFB ............................... no
EGLFS .................................. yes
EGLFS details:
EGLFS OpenWFD ........................ no
EGLFS i.Mx6 .......................... no
EGLFS i.Mx6 Wayland .................. no
EGLFS RCAR ........................... no
EGLFS EGLDevice ...................... yes
EGLFS GBM ............................ yes
EGLFS VSP2 ........................... no
EGLFS Mali ........................... no
EGLFS Raspberry Pi ................... no
EGLFS X11 ............................ yes
LinuxFB ................................ yes
VNC .................................... yes
VK_KHR_display ......................... yes
QNX:
lgmon ................................ no
IMF .................................. no
XCB:
Using system-provided xcb-xinput ..... no
GL integrations:
GLX Plugin ......................... yes
XCB GLX .......................... yes
EGL-X11 Plugin ..................... yes
Windows:
Direct 2D ............................ no
Direct 2D 1.1 ........................ no
DirectWrite .......................... no
DirectWrite 3 ........................ no
Qt Widgets:
GTK+ ................................... yes
Styles ................................. Fusion Windows
Qt Testlib:
Tester for item models ................. yes
Qt PrintSupport:
CUPS ................................... yes
Qt Sql Drivers:
DB2 (IBM) .............................. no
InterBase .............................. no
MySql .................................. no
OCI (Oracle) ........................... no
ODBC ................................... yes
PostgreSQL ............................. no
SQLite ................................. yes
Using system provided SQLite ......... no
--Qt is now configured for building. Just run 'cmake --build . --parallel'Once everything is built, you must run 'cmake --install .'
Qt will be installed into '/home/user/clang-env'To configure and build other Qt modules, you can use the following convenience script:
/home/user/clang-env/bin/qt-configure-moduleIf reconfiguration fails for some reason, try removing 'CMakeCache.txt' from the build directory-- Configuring done
-- Generating done
-- Build files have been written to: /home/user/libs-dev/qt-build
$ cmake --build . --target all --
[741/1601] Generating socket_interface.h, socket_interface.cpp
FAILED: qtbase/src/gui/socket_interface.h qtbase/src/gui/socket_interface.cpp /home/user/libs-dev/qt-build/qtbase/src/gui/socket_interface.h /home/user/libs-dev/q
t-build/qtbase/src/gui/socket_interface.cpp
cd /home/user/libs-dev/qt-build/qtbase/src/gui && /home/user/libs-dev/qt-build/qtbase/bin/qdbusxml2cpp -i QtGui/private/qspi_struct_marshallers_p.h -p socket_inte
rface.h:socket_interface.cpp /home/user/libs-dev/qt-everywhere-src-6.4.2/qtbase/src/gui/accessible/linux/dbusxml/Socket.xml
[742/1601] Generating bus_interface.h, bus_interface.cpp
FAILED: qtbase/src/gui/bus_interface.h qtbase/src/gui/bus_interface.cpp /home/user/libs-dev/qt-build/qtbase/src/gui/bus_interface.h /home/user/libs-dev/qt-build/q
tbase/src/gui/bus_interface.cpp
cd /home/user/libs-dev/qt-build/qtbase/src/gui && /home/user/libs-dev/qt-build/qtbase/bin/qdbusxml2cpp -i QtGui/private/qspi_struct_marshallers_p.h -p bus_interfa
ce.h:bus_interface.cpp /home/user/libs-dev/qt-everywhere-src-6.4.2/qtbase/src/gui/accessible/linux/dbusxml/Bus.xml
[743/1601] Generating deviceeventcontroller_adaptor.h, deviceeventcontroller_adaptor.cpp
FAILED: qtbase/src/gui/deviceeventcontroller_adaptor.h qtbase/src/gui/deviceeventcontroller_adaptor.cpp /home/user/libs-dev/qt-build/qtbase/src/gui/deviceeventco
ntroller_adaptor.h /home/user/libs-dev/qt-build/qtbase/src/gui/deviceeventcontroller_adaptor.cpp
cd /home/user/libs-dev/qt-build/qtbase/src/gui && /home/user/libs-dev/qt-build/qtbase/bin/qdbusxml2cpp -i QtGui/private/qspi_struct_marshallers_p.h -a deviceevent
controller_adaptor.h:deviceeventcontroller_adaptor.cpp /home/user/libs-dev/qt-everywhere-src-6.4.2/qtbase/src/gui/accessible/linux/dbusxml/DeviceEventController.
xml
[744/1601] Generating cache_adaptor.h, cache_adaptor.cpp
FAILED: qtbase/src/gui/cache_adaptor.h qtbase/src/gui/cache_adaptor.cpp /home/user/libs-dev/qt-build/qtbase/src/gui/cache_adaptor.h /home/user/libs-dev/qt-build/q
tbase/src/gui/cache_adaptor.cpp
cd /home/user/libs-dev/qt-build/qtbase/src/gui && /home/user/libs-dev/qt-build/qtbase/bin/qdbusxml2cpp -i QtGui/private/qspi_struct_marshallers_p.h -a cache_adapt
or.h:cache_adaptor.cpp /home/user/libs-dev/qt-everywhere-src-6.4.2/qtbase/src/gui/accessible/linux/dbusxml/Cache.xml
[748/1601] Building C object qtbase/src/plugins/sqldrivers/sqlite/CMakeFiles/QSQLiteDriverPlugin.dir/__/__/__/3rdparty/sqlite/sqlite3.c.o
ninja: build stopped: subcommand failed.
Stack trace when running manually:
$ cd /home/user/libs-dev/qt-build/qtbase/src/gui $ gdb --args /home/user/libs-dev/qt-build/qtbase/bin/qdbusxml2cpp -i QtGui/private/qspi_struct_marshallers_p.h -p socket_interface.h:socket_interface.cpp /home/user/libs-dev/qt-everywhere-src-6.4.2/qtbase/src/gui/accessible/linux/dbusxml/Socket.xml Reading symbols from /home/user/libs-dev/qt-build/qtbase/bin/qdbusxml2cpp... (No debugging symbols found in /home/user/libs-dev/qt-build/qtbase/bin/qdbusxml2cpp) (gdb) r Starting program: /home/user/libs-dev/qt-build/qtbase/bin/qdbusxml2cpp -i QtGui/private/qspi_struct_marshallers_p.h -p socket_interface.h:socket_interface.cpp /home/user/libs-dev/qt-everywhere-src-6.4.2/qtbase/src/gui/accessible/linux/dbusxml/Socket.xml [Thread debugging using libthread_db enabled] Using host libthread_db library "/usr/lib/libthread_db.so.1".Program received signal SIGSEGV, Segmentation fault. QtPrivate::qustrchr (str=..., c=<optimized out>) at /home/user/libs-dev/qt-everywhere-src-6.4.2/qtbase/src/corelib/text/qstring.cpp:450 450 __m256i result = _mm256_cmpeq_epi16(data, mch256); (gdb) bt #0 QtPrivate::qustrchr (str=..., c=<optimized out>) at /home/user/libs-dev/qt-everywhere-src-6.4.2/qtbase/src/corelib/text/qstring.cpp:450 #1 0x00007ffff7a4eef6 in (anonymous namespace)::qFindChar (cs=Qt::CaseSensitive, from=<optimized out>, ch=..., str=...) at /home/user/libs-dev/qt-everywhere-src-6.4.2/qtbase/src/corelib/text/qstringview.h:136 #2 QtPrivate::findString (haystack0=..., from=<optimized out>, needle0=..., cs=cs@entry=Qt::CaseSensitive) at /home/user/libs-dev/qt-everywhere-src-6.4.2/qtbase/src/corelib/text/qstring.cpp:10632 #3 0x00007ffff7a5e7cd in (anonymous namespace)::splitString<QList<QStringView>, QStringView> (cs=<optimized out>, behavior=..., sep=..., source=...) at /home/user/libs-dev/qt-everywhere-src-6.4.2/qtbase/src/corelib/text/qstring.cpp:7635 #4 QStringView::split (this=<optimized out>, sep=..., behavior=..., cs=Qt::CaseSensitive) at /home/user/libs-dev/qt-everywhere-src-6.4.2/qtbase/src/corelib/text/qstring.cpp:7711 #5 0x00007ffff7a5ed64 in QStringView::split (this=<optimized out>, sep=..., behavior=..., cs=<optimized out>) at /home/user/libs-dev/qt-everywhere-src-6.4.2/qtbase/src/corelib/text/qstring.cpp:7716 #6 0x00005555555612a3 in classNameForInterface(QString const&, ClassType) () #7 0x000055555555c918 in writeProxy(QString const&, QMap<QString, QSharedDataPointer<QDBusIntrospection::Interface> > const&) () #8 0x000055555555c138 in main () (gdb)
Just in case, my CPU does support AVX2, anyway, it's not an unknown instruction fault.