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

Build fails with -march=native

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3: Somewhat important
    • 6.5.3, 6.6.1, 6.7.0 FF
    • 6.5.2
    • Core: Other
    • None
    • Gentoo Linux
      gcc version 13.2.0
    • Linux/X11
    • 39d3af0c2 (dev), cd8667cb1 (6.6), 0290ee0d6 (6.5)

    Description

      Building with "-march=native" in CXXFLAGS results in the error below. This is the correct setting for the CPU I have installed (AMD FX(tm)-8320 Eight-Core Processor).

      I don't think it makes sense to raise an error based on a particular combination of CPU instruction set extensions. I think this error should be removed. 

      FAILED: src/tools/bootstrap/CMakeFiles/Bootstrap.dir/{_}{{_}}/{{_}}{_}/corelib/global/qfloat16.cpp.o  
      /usr/bin/x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -DQT_BOOTSTRAPPED -DQT_EXPLICIT_QFILE_CONSTRUCTION_FROM_PATH -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_A
      SCII -DQT_NO_DEBUG -DQT_NO_FOREACH -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_TYPESAFE_FLAGS -DQT_USE_QSTRINGBUILDER -D
      QT_VERSION_MAJOR=6 -DQT_VERSION_MINOR=5 -DQT_VERSION_PATCH=2 -DQT_VERSION_STR=\"6.5.2\" -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I/var/tmp/portage/de
      v-qt/qtbase-6.5.2/work/qtbase-everywhere-src-6.5.2_build/src/corelib/Core_autogen/include -I/var/tmp/portage/dev-qt/qtbase-6.5.2/work/qtbase-everywhere
      -src-6.5.2_build/include -I/var/tmp/portage/dev-qt/qtbase-6.5.2/work/qtbase-everywhere-src-6.5.2_build/include/QtCore -I/var/tmp/portage/dev-qt/qtbase-
      6.5.2/work/qtbase-everywhere-src-6.5.2/src/corelib -I/var/tmp/portage/dev-qt/qtbase-6.5.2/work/qtbase-everywhere-src-6.5.2_build/src/corelib -I/var/tmp
      /portage/dev-qt/qtbase-6.5.2/work/qtbase-everywhere-src-6.5.2_build/src/corelib/global -I/var/tmp/portage/dev-qt/qtbase-6.5.2/work/qtbase-everywhere-sr
      c-6.5.2_build/src/corelib/kernel -I/var/tmp/portage/dev-qt/qtbase-6.5.2/work/qtbase-everywhere-src-6.5.2/src/corelib/../3rdparty/tinycbor/src -I/var/tm
      p/portage/dev-qt/qtbase-6.5.2/work/qtbase-everywhere-src-6.5.2_build/include/QtCore/6.5.2 -I/var/tmp/portage/dev-qt/qtbase-6.5.2/work/qtbase-everywhere
      -src-6.5.2_build/include/QtCore/6.5.2/QtCore -I/var/tmp/portage/dev-qt/qtbase-6.5.2/work/qtbase-everywhere-src-6.5.2/src/corelib/../3rdparty/forkfd -I/
      var/tmp/portage/dev-qt/qtbase-6.5.2/work/qtbase-everywhere-src-6.5.2_build/src/corelib/.rcc -I/var/tmp/portage/dev-qt/qtbase-6.5.2/work/qtbase-everywhe
      re-src-6.5.2/mkspecs/linux-g++ -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/var/tmp/portage/dev-qt/qtbase-6.5.2/work/qtbase-everywhere-src-
      6.5.2/src/tools/bootstrap/../../corelib/global -I/var/tmp/portage/dev-qt/qtbase-6.5.2/work/qtbase-everywhere-src-6.5.2/src/tools/bootstrap/.. -I/var/tm
      p/portage/dev-qt/qtbase-6.5.2/work/qtbase-everywhere-src-6.5.2/src/tools/bootstrap/../../3rdparty/tinycbor/src  -march=native -O2 -pipe -O2 -std=gnu++1
      7 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wextra -ffunction-sections -fdata-sections -Wsuggest-override -MD -MT src/tools/bootstra
      p/CMakeFiles/Bootstrap.dir/{_}{{_}}/{_}{{_}}/corelib/global/qfloat16.cpp.o -MF src/tools/bootstrap/CMakeFiles/Bootstrap.dir/{_}{{_}}/{{_}}{_}/corelib/global/qfloat16.cpp.o.d -
      o src/tools/bootstrap/CMakeFiles/Bootstrap.dir/{_}{{_}}/{{_}}{_}/corelib/global/qfloat16.cpp.o -c /var/tmp/portage/dev-qt/qtbase-6.5.2/work/qtbase-everywhere-src-6
      .5.2/src/corelib/global/qfloat16.cpp 
      In file included from /var/tmp/portage/dev-qt/qtbase-6.5.2/work/qtbase-everywhere-src-6.5.2_build/include/QtCore/6.5.2/QtCore/private/qsimd_p.h:1, 
                      from /var/tmp/portage/dev-qt/qtbase-6.5.2/work/qtbase-everywhere-src-6.5.2/src/corelib/global/qfloat16.cpp:6: 
      /var/tmp/portage/dev-qt/qtbase-6.5.2/work/qtbase-everywhere-src-6.5.2_build/include/QtCore/6.5.2/QtCore/private/../../../../../../qtbase-everywhere-src
      -6.5.2/src/corelib/global/qsimd_p.h:232:8: error: #error "Please enable all x86-64-v3 extensions; you probably want to use -march=haswell or -march=x86
      -64-v3 instead of -mavx2" 
       232 | #      error "Please enable all x86-64-v3 extensions; you probably want to use -march=haswell or -march=x86-64-v3 instead of -mavx2" 
           |        ^~~~~ 
      /var/tmp/portage/dev-qt/qtbase-6.5.2/work/qtbase-everywhere-src-6.5.2_build/include/QtCore/6.5.2/QtCore/private/../../../../../../qtbase-everywhere-src
      -6.5.2/src/corelib/global/qsimd_p.h:229:38: error: '{_}{{_}}AVX2{{_}}{_}' was not declared in this scope 
       229 | #  define ARCH_HASWELL_MACROS       ({_}{{_}}AVX2{{_}}{_} + {_}{{_}}FMA{{_}}{_}) 
           |                                      ^~~~~~~~ 
      /var/tmp/portage/dev-qt/qtbase-6.5.2/work/qtbase-everywhere-src-6.5.2_build/include/QtCore/6.5.2/QtCore/private/../../../../../../qtbase-everywhere-src
      -6.5.2/src/corelib/global/qsimd_p.h:234:15: note: in expansion of macro 'ARCH_HASWELL_MACROS' 
       234 | static_assert(ARCH_HASWELL_MACROS, "Undeclared identifiers indicate which features are missing.");
      

      Attachments

        1. build-1.log
          15 kB
        2. build.log
          78 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            thiago Thiago Macieira
            undrwater Russell Dwiggins
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes