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

Build fails with -march=amdfam10

    XMLWordPrintable

Details

    • Linux/X11
    • 8413824ca (dev), 2e4e7b7cf (6.5), 5560521a8 (6.4), 9ab1c9411 (6.5.0), 3f1ccea04 (6.4.3), 39d3af0c2 (dev), cd8667cb1 (6.6), 0290ee0d6 (6.5)

    Description

      Building with "-march=amdfam10" in CXXFLAGS results in the error below. This is the correct setting for the CPU I have installed (AMD Phenom II).

      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. You can define the _haswell and __skylake_avx512_ macros conditionally without raising an error if the user selects in incompatible CPU type.

      FAILED: src/tools/bootstrap/CMakeFiles/Bootstrap.dir/__/__/corelib/global/qfloat16.cpp.o 
      /usr/lib/ccache/bin/x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -DQT_BOOTSTRAPPED -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII -DQT_NO_DEBUG -DQT_NO_FOREACH -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_TYPESAFE_FLAGS -DQT_USE_QSTRINGBUILDER -DQT_VERSION_MAJOR=6 -DQT_VERSION_MINOR=4 -DQT_VERSION_PATCH=2 -DQT_VERSION_STR=\"6.4.2\" -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I/x/portage/dev-qt/qtbase-6.4.2/work/qtbase-everywhere-src-6.4.2_build/src/corelib/Core_autogen/include -I/x/portage/dev-qt/qtbase-6.4.2/work/qtbase-everywhere-src-6.4.2_build/include -I/x/portage/dev-qt/qtbase-6.4.2/work/qtbase-everywhere-src-6.4.2_build/include/QtCore -I/x/portage/dev-qt/qtbase-6.4.2/work/qtbase-everywhere-src-6.4.2/src/corelib -I/x/portage/dev-qt/qtbase-6.4.2/work/qtbase-everywhere-src-6.4.2_build/src/corelib -I/x/portage/dev-qt/qtbase-6.4.2/work/qtbase-everywhere-src-6.4.2_build/src/corelib/global -I/x/portage/dev-qt/qtbase-6.4.2/work/qtbase-everywhere-src-6.4.2_build/src/corelib/kernel -I/x/portage/dev-qt/qtbase-6.4.2/work/qtbase-everywhere-src-6.4.2/src/corelib/../3rdparty/tinycbor/src -I/x/portage/dev-qt/qtbase-6.4.2/work/qtbase-everywhere-src-6.4.2_build/include/QtCore/6.4.2 -I/x/portage/dev-qt/qtbase-6.4.2/work/qtbase-everywhere-src-6.4.2_build/include/QtCore/6.4.2/QtCore -I/x/portage/dev-qt/qtbase-6.4.2/work/qtbase-everywhere-src-6.4.2/src/corelib/../3rdparty/forkfd -I/x/portage/dev-qt/qtbase-6.4.2/work/qtbase-everywhere-src-6.4.2_build/src/corelib/.rcc -I/x/portage/dev-qt/qtbase-6.4.2/work/qtbase-everywhere-src-6.4.2/mkspecs/linux-g++ -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/x/portage/dev-qt/qtbase-6.4.2/work/qtbase-everywhere-src-6.4.2/src/tools/bootstrap/.. -I/x/portage/dev-qt/qtbase-6.4.2/work/qtbase-everywhere-src-6.4.2/src/tools/bootstrap/../../3rdparty/tinycbor/src  -O2 -pipe -march=amdfam10 -O2 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wextra -ffunction-sections -fdata-sections -Wsuggest-override -std=gnu++17 -MD -MT src/tools/bootstrap/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 /x/portage/dev-qt/qtbase-6.4.2/work/qtbase-everywhere-src-6.4.2/src/corelib/global/qfloat16.cpp
      In file included from /x/portage/dev-qt/qtbase-6.4.2/work/qtbase-everywhere-src-6.4.2_build/include/QtCore/6.4.2/QtCore/private/qsimd_p.h:1,
                       from /x/portage/dev-qt/qtbase-6.4.2/work/qtbase-everywhere-src-6.4.2/src/corelib/global/qfloat16.cpp:6:
      /x/portage/dev-qt/qtbase-6.4.2/work/qtbase-everywhere-src-6.4.2_build/include/QtCore/6.4.2/QtCore/private/../../../../../../qtbase-everywhere-src-6.4.2/src/corelib/global/qsimd_p.h:218: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"
        218 | #      error "Please enable all x86-64-v3 extensions; you probably want to use -march=haswell or -march=x86-64-v3 instead of -mavx2"
            |        ^~~~~
      /x/portage/dev-qt/qtbase-6.4.2/work/qtbase-everywhere-src-6.4.2_build/include/QtCore/6.4.2/QtCore/private/../../../../../../qtbase-everywhere-src-6.4.2/src/corelib/global/qsimd_p.h:215:38: error: ‘__AVX2__’ was not declared in this scope
        215 | #  define ARCH_HASWELL_MACROS       (__AVX2__ + __BMI2__ + __FMA__ + __LZCNT__)
            |                                      ^~~~~~~~
      /x/portage/dev-qt/qtbase-6.4.2/work/qtbase-everywhere-src-6.4.2_build/include/QtCore/6.4.2/QtCore/private/../../../../../../qtbase-everywhere-src-6.4.2/src/corelib/global/qsimd_p.h:220:15: note: in expansion of macro ‘ARCH_HASWELL_MACROS’
        220 | static_assert(ARCH_HASWELL_MACROS, "Undeclared identifiers indicate which features are missing.");
            |               ^~~~~~~~~~~~~~~~~~~
      /x/portage/dev-qt/qtbase-6.4.2/work/qtbase-everywhere-src-6.4.2_build/include/QtCore/6.4.2/QtCore/private/../../../../../../qtbase-everywhere-src-6.4.2/src/corelib/global/qsimd_p.h:215:49: error: ‘__BMI2__’ was not declared in this scope
        215 | #  define ARCH_HASWELL_MACROS       (__AVX2__ + __BMI2__ + __FMA__ + __LZCNT__)
            |                                                 ^~~~~~~~
      /x/portage/dev-qt/qtbase-6.4.2/work/qtbase-everywhere-src-6.4.2_build/include/QtCore/6.4.2/QtCore/private/../../../../../../qtbase-everywhere-src-6.4.2/src/corelib/global/qsimd_p.h:220:15: note: in expansion of macro ‘ARCH_HASWELL_MACROS’
        220 | static_assert(ARCH_HASWELL_MACROS, "Undeclared identifiers indicate which features are missing.");
            |               ^~~~~~~~~~~~~~~~~~~
      /x/portage/dev-qt/qtbase-6.4.2/work/qtbase-everywhere-src-6.4.2_build/include/QtCore/6.4.2/QtCore/private/../../../../../../qtbase-everywhere-src-6.4.2/src/corelib/global/qsimd_p.h:215:60: error: ‘__FMA__’ was not declared in this scope
        215 | #  define ARCH_HASWELL_MACROS       (__AVX2__ + __BMI2__ + __FMA__ + __LZCNT__)
            |                                                            ^~~~~~~
      /x/portage/dev-qt/qtbase-6.4.2/work/qtbase-everywhere-src-6.4.2_build/include/QtCore/6.4.2/QtCore/private/../../../../../../qtbase-everywhere-src-6.4.2/src/corelib/global/qsimd_p.h:220:15: note: in expansion of macro ‘ARCH_HASWELL_MACROS’
        220 | static_assert(ARCH_HASWELL_MACROS, "Undeclared identifiers indicate which features are missing.");
            |               ^~~~~~~~~~~~~~~~~~~ 

      Attachments

        For Gerrit Dashboard: QTBUG-111698
        # Subject Branch Project Status CR V

        Activity

          People

            qtbuildsystem Qt Build System Team
            floppym Mike Gilbert
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: