LINUX.ORG.RU

Избранные сообщения MkktBkkt

не собирается qt 5.15.2: error: ‘numeric_limits’ is not a class template

Форум — Development

делаю

git clone git://code.qt.io/qt/qt5.git
cd qt5
git checkout 5.15.2
perl init-repository
./configure -release -opensource -confirm-license -skip qtwayland -skip qtlocation -skip qtscript -make libs -v

получаю

g++ -c -o qutfcodec.o   -std=c++11 -ffunction-sections -fdata-sections -g -g  -I/home/nikita/tmp/qt5/qtbase/qmake -I/home/nikita/tmp/qt5/qtbase/qmake/library -I/home/nikita/tmp/qt5/qtbase/qmake/generators -I/home/nikita/tmp/qt5/qtbase/src/3rdparty/tinycbor/src -I/home/nikita/tmp/qt5/qtbase/qmake/generators/unix -I/home/nikita/tmp/qt5/qtbase/qmake/generators/win32 -I/home/nikita/tmp/qt5/qtbase/qmake/generators/mac -I../include -I../include/QtCore -I../include/QtCore/5.15.2 -I../include/QtCore/5.15.2/QtCore -I../src/corelib/global -I/home/nikita/tmp/qt5/qtbase/mkspecs/linux-g++ -DQT_VERSION_STR=\"5.15.2\" -DQT_VERSION_MAJOR=5 -DQT_VERSION_MINOR=15 -DQT_VERSION_PATCH=2 -DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DPROEVALUATOR_FULL -DQT_NO_FOREACH /home/nikita/tmp/qt5/qtbase/src/corelib/codecs/qutfcodec.cpp
In file included from ../include/QtCore/qfloat16.h:1,
                 from ../include/QtCore/../../src/corelib/global/qendian.h:44,
                 from ../include/QtCore/qendian.h:1,
                 from /home/nikita/tmp/qt5/qtbase/src/corelib/codecs/qutfcodec.cpp:43:
../include/QtCore/../../src/corelib/global/qfloat16.h:300:7: error: ‘numeric_limits’ is not a class template
  300 | class numeric_limits<QT_PREPEND_NAMESPACE(qfloat16)> : public numeric_limits<float>
      |       ^~~~~~~~~~~~~~
../include/QtCore/../../src/corelib/global/qfloat16.h:300:77: error: expected template-name before ‘<’ token
  300 | class numeric_limits<QT_PREPEND_NAMESPACE(qfloat16)> : public numeric_limits<float>
      |                                                                             ^
../include/QtCore/../../src/corelib/global/qfloat16.h:300:77: error: expected ‘{’ before ‘<’ token
../include/QtCore/../../src/corelib/global/qfloat16.h:344:18: error: ‘numeric_limits’ is not a class template
  344 | template<> class numeric_limits<const QT_PREPEND_NAMESPACE(qfloat16)>
      |                  ^~~~~~~~~~~~~~
../include/QtCore/../../src/corelib/global/qfloat16.h:344:69: error: ‘std::numeric_limits’ is not a template
  344 | template<> class numeric_limits<const QT_PREPEND_NAMESPACE(qfloat16)>
      |                                                                     ^
../include/QtCore/../../src/corelib/global/qfloat16.h:300:7: note: previous declaration here
  300 | class numeric_limits<QT_PREPEND_NAMESPACE(qfloat16)> : public numeric_limits<float>
      |       ^~~~~~~~~~~~~~
../include/QtCore/../../src/corelib/global/qfloat16.h:345:28: error: expected template-name before ‘<’ token
  345 |     : public numeric_limits<QT_PREPEND_NAMESPACE(qfloat16)> {};
      |                            ^
../include/QtCore/../../src/corelib/global/qfloat16.h:346:18: error: ‘numeric_limits’ is not a class template
  346 | template<> class numeric_limits<volatile QT_PREPEND_NAMESPACE(qfloat16)>
      |                  ^~~~~~~~~~~~~~
../include/QtCore/../../src/corelib/global/qfloat16.h:346:72: error: ‘std::numeric_limits’ is not a template
  346 | template<> class numeric_limits<volatile QT_PREPEND_NAMESPACE(qfloat16)>
      |                                                                        ^
../include/QtCore/../../src/corelib/global/qfloat16.h:300:7: note: previous declaration here
  300 | class numeric_limits<QT_PREPEND_NAMESPACE(qfloat16)> : public numeric_limits<float>
      |       ^~~~~~~~~~~~~~
../include/QtCore/../../src/corelib/global/qfloat16.h:347:28: error: expected template-name before ‘<’ token
  347 |     : public numeric_limits<QT_PREPEND_NAMESPACE(qfloat16)> {};
      |                            ^
../include/QtCore/../../src/corelib/global/qfloat16.h:348:18: error: ‘numeric_limits’ is not a class template
  348 | template<> class numeric_limits<const volatile QT_PREPEND_NAMESPACE(qfloat16)>
      |                  ^~~~~~~~~~~~~~
../include/QtCore/../../src/corelib/global/qfloat16.h:348:78: error: ‘std::numeric_limits’ is not a template
  348 | template<> class numeric_limits<const volatile QT_PREPEND_NAMESPACE(qfloat16)>
      |                                                                              ^
../include/QtCore/../../src/corelib/global/qfloat16.h:300:7: note: previous declaration here
  300 | class numeric_limits<QT_PREPEND_NAMESPACE(qfloat16)> : public numeric_limits<float>
      |       ^~~~~~~~~~~~~~
../include/QtCore/../../src/corelib/global/qfloat16.h:349:28: error: expected template-name before ‘<’ token
  349 |     : public numeric_limits<QT_PREPEND_NAMESPACE(qfloat16)> {};
      |                            ^
In file included from ../include/QtCore/qendian.h:1,
                 from /home/nikita/tmp/qt5/qtbase/src/corelib/codecs/qutfcodec.cpp:43:
../include/QtCore/../../src/corelib/global/qendian.h: In static member function ‘static constexpr QSpecialInteger<S> QSpecialInteger<S>::max()’:
../include/QtCore/../../src/corelib/global/qendian.h:331:30: error: ‘std::numeric_limits’ is not a template
  331 |     { return QSpecialInteger(std::numeric_limits<T>::max()); }
      |                              ^~~
../include/QtCore/../../src/corelib/global/qendian.h:331:54: error: incomplete type ‘std::numeric_limits’ used in nested name specifier
  331 |     { return QSpecialInteger(std::numeric_limits<T>::max()); }
      |                                                      ^~~
../include/QtCore/../../src/corelib/global/qendian.h: In static member function ‘static constexpr QSpecialInteger<S> QSpecialInteger<S>::min()’:
../include/QtCore/../../src/corelib/global/qendian.h:333:30: error: ‘std::numeric_limits’ is not a template
  333 |     { return QSpecialInteger(std::numeric_limits<T>::min()); }
      |                              ^~~
../include/QtCore/../../src/corelib/global/qendian.h:333:54: error: incomplete type ‘std::numeric_limits’ used in nested name specifier
  333 |     { return QSpecialInteger(std::numeric_limits<T>::min()); }
      |                                                      ^~~
make: *** [Makefile:383: qutfcodec.o] Error 1

gcc --version
gcc (GCC) 11.1.0

UPD. решено

https://stackoverflow.com/questions/68081481/how-can-i-build-qt-5-13-2-with-gcc-11-1-on-windows

 , , ,

luntik2012
()