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

Building Qt with gcc and ASan fails with ASan linking error

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3: Somewhat important
    • Resolution: Incomplete
    • Affects Version/s: 6.3, 6.x
    • Fix Version/s: None
    • Labels:
      None
    • Platform/s:
      Linux/X11

      Description

      When trying to build Qt with GCC with ASan I see the following:

      [222/1605] Automatic MOC for target DeviceDiscoverySupportPrivate
      FAILED: qtbase/src/platformsupport/devicediscovery/DeviceDiscoverySupportPrivate_autogen/timestamp /home/ag/work/build/qt5/qtbase/src/platformsupport/devicediscovery/DeviceDiscoverySupportPrivate_autogen/timestamp 
      cd /home/ag/work/build/qt5/qtbase/src/platformsupport/devicediscovery && /usr/local/bin/cmake -E cmake_autogen /home/ag/work/build/qt5/qtbase/src/platformsupport/devicediscovery/CMakeFiles/DeviceDiscoverySupportPrivate_autogen.dir/AutogenInfo.json Debug && /usr/local/bin/cmake -E touch /home/ag/work/build/qt5/qtbase/src/platformsupport/devicediscovery/DeviceDiscoverySupportPrivate_autogen/timestamp && /usr/local/bin/cmake -E cmake_transform_depfile Ninja gccdepfile /home/ag/work/qt5 /home/ag/work/qt5/qtbase/src/platformsupport/devicediscovery /home/ag/work/build/qt5 /home/ag/work/build/qt5/qtbase/src/platformsupport/devicediscovery /home/ag/work/build/qt5/qtbase/src/platformsupport/devicediscovery/DeviceDiscoverySupportPrivate_autogen/deps /home/ag/work/build/qt5/CMakeFiles/d/d800ca52852e043011c677f119fb0b9263b3221ddb93b126b5bc217ecdfbf9c5.d
      
      AutoMoc subprocess error
      ------------------------
      The moc process failed to compile
        "SRC:/qtbase/src/platformsupport/devicediscovery/qdevicediscovery_udev_p.h"
      into
        "BIN:/qtbase/src/platformsupport/devicediscovery/DeviceDiscoverySupportPrivate_autogen/EWIEGA46WW/moc_qdevicediscovery_udev_p.cpp"
      
      
      Command
      -------
      /home/ag/work/build/qt5/qtbase/libexec/moc -DQT_ASCII_CAST_WARNINGS -DQT_BUILDING_QT -DQT_BUILD_DEVICEDISCOVERY_SUPPORT_LIB -DQT_CORE_LIB -DQT_DEPRECATED_WARNINGS -DQT_DEPRECATED_WARNINGS_SINCE=0x060000 -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_MOC_COMPAT -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII -DQT_NO_EXCEPTIONS -DQT_USE_QSTRINGBUILDER -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I/home/ag/work/build/qt5/qtbase/include -I/home/ag/work/build/qt5/qtbase/include/QtDeviceDiscoverySupport -I/home/ag/work/qt5/qtbase/src/platformsupport/devicediscovery -I/home/ag/work/build/qt5/qtbase/src/platformsupport/devicediscovery -I/home/ag/work/build/qt5/qtbase/include/QtDeviceDiscoverySupport/6.3.0 -I/home/ag/work/build/qt5/qtbase/include/QtDeviceDiscoverySupport/6.3.0/QtDeviceDiscoverySupport -I/home/ag/work/build/qt5/qtbase/src/corelib -I/home/ag/work/build/qt5/qtbase/include/QtCore/6.3.0 -I/home/ag/work/build/qt5/qtbase/include/QtCore/6.3.0/QtCore -I/home/ag/work/build/qt5/qtbase/include/QtCore -I/home/ag/work/build/qt5/qtbase/mkspecs/linux-g++ -I/usr/include/c++/10 -I/usr/include/x86_64-linux-gnu/c++/10 -I/usr/include/c++/10/backward -I/usr/lib/gcc/x86_64-linux-gnu/10/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include --include /home/ag/work/build/qt5/qtbase/src/platformsupport/devicediscovery/DeviceDiscoverySupportPrivate_autogen/moc_predefs.h --output-json --output-dep-file -o /home/ag/work/build/qt5/qtbase/src/platformsupport/devicediscovery/DeviceDiscoverySupportPrivate_autogen/EWIEGA46WW/moc_qdevicediscovery_udev_p.cpp /home/ag/work/qt5/qtbase/src/platformsupport/devicediscovery/qdevicediscovery_udev_p.h
      
      Output
      ------
      ==14035==ASan runtime does not come first in initial library list; you should either link runtime to your application or manually preload it with LD_PRELOAD.
      

      My configure command is:

      /home/ag/work/qt5/configure -opensource -confirm-license -developer-build -skip qtwebengine -skip qtpim -skip qtsystems -skip qtopcua -skip qtlocation -ccache -no-pch -no-headersclean -skip qt3d -skip qtquick3d -skip qtimageformats -skip qtnetworkauth -sanitize address -make examples -make tests -xcb -xcb-xlib -qpa xcb -xkbcommon
      

      GCC version is 10.3.0

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              qtbuildsystem Qt Build System Team
              Reporter:
              agolubev Andrei Golubev
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes