初级会员
- 积分
- 64
- 金钱
- 64
- 注册时间
- 2020-8-31
- 在线时间
- 14 小时
|
4金钱
按教程,移植qt5.12.9的时候,使用ubuntu16.04生成Makefile的时候一切正常,换成ubuntu22.04就失败,是g++版本抬高了的原因吗?用22.04配置内核编译环境的时候遇到过gcc版本过高的问题,不知道这里是不是同样的问题,有人遇到同样的问题吗?以下是我的操作步骤,只执行了./autoconfigure.sh ,然后查看了g++版本。
lvjun@lvjun-virtual-machine:~/study/i.mux6ull/qt/qt_src/qt-everywhere-src-5.12.9$ ./autoconfigure.sh
+ cd qtbase
+ /home/lvjun/study/i.mux6ull/qt/qt_src/qt-everywhere-src-5.12.9/qtbase/configure -top-level -prefix /home/lvjun/study/i.mux6ull/qt/qt_src/qt-everywhere-src-5.12.9/lvjun-arm-qt -opensource -confirm-license -release -strip -shared -xplatform linux-arm-gnueabi-g++ -optimized-qmake -c++std c++11 --rpath=no -pch -skip qt3d -skip qtactiveqt -skip qtandroidextras -skip qtcanvas3d -skip qtconnectivity -skip qtdatavis3d -skip qtdoc -skip qtgamepad -skip qtlocation -skip qtmacextras -skip qtnetworkauth -skip qtpurchasing -skip qtremoteobjects -skip qtscript -skip qtscxml -skip qtsensors -skip qtspeech -skip qtsvg -skip qttools -skip qttranslations -skip qtwayland -skip qtwebengine -skip qtwebview -skip qtwinextras -skip qtx11extras -skip qtxmlpatterns -make libs -make examples -nomake tools -nomake tests -gui -widgets -dbus-runtime --glib=no --iconv=no --pcre=qt --zlib=qt -no-openssl --freetype=qt --harfbuzz=qt -no-opengl -linuxfb --xcb=no -tslib --libpng=qt --libjpeg=qt --sqlite=qt -plugin-sql-sqlite -I/home/lvjun/study/i.mux6ull/qt/ts_lib/tslib-1.21/lvjun/include -L/home/lvjun/study/i.mux6ull/qt/ts_lib/tslib-1.21/lvjun/lib -recheck-all
Creating qmake...
............................In file included from /home/lvjun/study/i.mux6ull/qt/qt_src/qt-everywhere-src-5.12.9/qtbase/include/QtCore/qendian.h:1,
from /home/lvjun/study/i.mux6ull/qt/qt_src/qt-everywhere-src-5.12.9/qtbase/src/corelib/codecs/qutfcodec.cpp:43:
/home/lvjun/study/i.mux6ull/qt/qt_src/qt-everywhere-src-5.12.9/qtbase/include/QtCore/../../src/corelib/global/qendian.h: In static member function ‘static constexpr QSpecialInteger<S> QSpecialInteger<S>::max()’:
/home/lvjun/study/i.mux6ull/qt/qt_src/qt-everywhere-src-5.12.9/qtbase/include/QtCore/../../src/corelib/global/qendian.h:331:35: error: ‘numeric_limits’ is not a member of ‘std’
331 | { return QSpecialInteger(std::numeric_limits<T>::max()); }
| ^~~~~~~~~~~~~~
/home/lvjun/study/i.mux6ull/qt/qt_src/qt-everywhere-src-5.12.9/qtbase/include/QtCore/../../src/corelib/global/qendian.h:331:54: error: ‘::max’ has not been declared; did you mean ‘std::max’?
331 | { return QSpecialInteger(std::numeric_limits<T>::max()); }
| ^~~
| std::max
In file included from /usr/include/c++/11/algorithm:62,
from /home/lvjun/study/i.mux6ull/qt/qt_src/qt-everywhere-src-5.12.9/qtbase/include/QtCore/../../src/corelib/global/qglobal.h:142,
from /home/lvjun/study/i.mux6ull/qt/qt_src/qt-everywhere-src-5.12.9/qtbase/include/QtCore/qglobal.h:1,
from /home/lvjun/study/i.mux6ull/qt/qt_src/qt-everywhere-src-5.12.9/qtbase/include/QtCore/../../src/corelib/tools/qchar.h:43,
from /home/lvjun/study/i.mux6ull/qt/qt_src/qt-everywhere-src-5.12.9/qtbase/include/QtCore/qchar.h:1,
from /home/lvjun/study/i.mux6ull/qt/qt_src/qt-everywhere-src-5.12.9/qtbase/include/QtCore/../../src/corelib/tools/qstring.h:48,
from /home/lvjun/study/i.mux6ull/qt/qt_src/qt-everywhere-src-5.12.9/qtbase/include/QtCore/qstring.h:1,
from /home/lvjun/study/i.mux6ull/qt/qt_src/qt-everywhere-src-5.12.9/qtbase/src/corelib/codecs/qutfcodec_p.h:55,
from /home/lvjun/study/i.mux6ull/qt/qt_src/qt-everywhere-src-5.12.9/qtbase/src/corelib/codecs/qutfcodec.cpp:41:
/usr/include/c++/11/bits/stl_algo.h:3467:5: note: ‘std::max’ declared here
3467 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
In file included from /home/lvjun/study/i.mux6ull/qt/qt_src/qt-everywhere-src-5.12.9/qtbase/include/QtCore/qendian.h:1,
from /home/lvjun/study/i.mux6ull/qt/qt_src/qt-everywhere-src-5.12.9/qtbase/src/corelib/codecs/qutfcodec.cpp:43:
/home/lvjun/study/i.mux6ull/qt/qt_src/qt-everywhere-src-5.12.9/qtbase/include/QtCore/../../src/corelib/global/qendian.h:331:29: error: expected primary-expression before ‘(’ token
331 | { return QSpecialInteger(std::numeric_limits<T>::max()); }
| ^
/home/lvjun/study/i.mux6ull/qt/qt_src/qt-everywhere-src-5.12.9/qtbase/include/QtCore/../../src/corelib/global/qendian.h:331:35: error: ‘numeric_limits’ is not a member of ‘std’
331 | { return QSpecialInteger(std::numeric_limits<T>::max()); }
| ^~~~~~~~~~~~~~
/home/lvjun/study/i.mux6ull/qt/qt_src/qt-everywhere-src-5.12.9/qtbase/include/QtCore/../../src/corelib/global/qendian.h:331:51: error: expected primary-expression before ‘>’ token
331 | { return QSpecialInteger(std::numeric_limits<T>::max()); }
| ^
/home/lvjun/study/i.mux6ull/qt/qt_src/qt-everywhere-src-5.12.9/qtbase/include/QtCore/../../src/corelib/global/qendian.h:331:54: error: ‘::max’ has not been declared; did you mean ‘std::max’?
331 | { return QSpecialInteger(std::numeric_limits<T>::max()); }
| ^~~
| std::max
In file included from /usr/include/c++/11/algorithm:62,
from /home/lvjun/study/i.mux6ull/qt/qt_src/qt-everywhere-src-5.12.9/qtbase/include/QtCore/../../src/corelib/global/qglobal.h:142,
from /home/lvjun/study/i.mux6ull/qt/qt_src/qt-everywhere-src-5.12.9/qtbase/include/QtCore/qglobal.h:1,
from /home/lvjun/study/i.mux6ull/qt/qt_src/qt-everywhere-src-5.12.9/qtbase/include/QtCore/../../src/corelib/tools/qchar.h:43,
from /home/lvjun/study/i.mux6ull/qt/qt_src/qt-everywhere-src-5.12.9/qtbase/include/QtCore/qchar.h:1,
from /home/lvjun/study/i.mux6ull/qt/qt_src/qt-everywhere-src-5.12.9/qtbase/include/QtCore/../../src/corelib/tools/qstring.h:48,
from /home/lvjun/study/i.mux6ull/qt/qt_src/qt-everywhere-src-5.12.9/qtbase/include/QtCore/qstring.h:1,
from /home/lvjun/study/i.mux6ull/qt/qt_src/qt-everywhere-src-5.12.9/qtbase/src/corelib/codecs/qutfcodec_p.h:55,
from /home/lvjun/study/i.mux6ull/qt/qt_src/qt-everywhere-src-5.12.9/qtbase/src/corelib/codecs/qutfcodec.cpp:41:
/usr/include/c++/11/bits/stl_algo.h:3467:5: note: ‘std::max’ declared here
3467 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
In file included from /home/lvjun/study/i.mux6ull/qt/qt_src/qt-everywhere-src-5.12.9/qtbase/include/QtCore/qendian.h:1,
from /home/lvjun/study/i.mux6ull/qt/qt_src/qt-everywhere-src-5.12.9/qtbase/src/corelib/codecs/qutfcodec.cpp:43:
/home/lvjun/study/i.mux6ull/qt/qt_src/qt-everywhere-src-5.12.9/qtbase/include/QtCore/../../src/corelib/global/qendian.h: In static member function ‘static constexpr QSpecialInteger<S> QSpecialInteger<S>::min()’:
/home/lvjun/study/i.mux6ull/qt/qt_src/qt-everywhere-src-5.12.9/qtbase/include/QtCore/../../src/corelib/global/qendian.h:333:35: error: ‘numeric_limits’ is not a member of ‘std’
333 | { return QSpecialInteger(std::numeric_limits<T>::min()); }
| ^~~~~~~~~~~~~~
/home/lvjun/study/i.mux6ull/qt/qt_src/qt-everywhere-src-5.12.9/qtbase/include/QtCore/../../src/corelib/global/qendian.h:333:54: error: ‘::min’ has not been declared; did you mean ‘std::min’?
333 | { return QSpecialInteger(std::numeric_limits<T>::min()); }
| ^~~
| std::min
In file included from /usr/include/c++/11/algorithm:62,
from /home/lvjun/study/i.mux6ull/qt/qt_src/qt-everywhere-src-5.12.9/qtbase/include/QtCore/../../src/corelib/global/qglobal.h:142,
from /home/lvjun/study/i.mux6ull/qt/qt_src/qt-everywhere-src-5.12.9/qtbase/include/QtCore/qglobal.h:1,
from /home/lvjun/study/i.mux6ull/qt/qt_src/qt-everywhere-src-5.12.9/qtbase/include/QtCore/../../src/corelib/tools/qchar.h:43,
from /home/lvjun/study/i.mux6ull/qt/qt_src/qt-everywhere-src-5.12.9/qtbase/include/QtCore/qchar.h:1,
from /home/lvjun/study/i.mux6ull/qt/qt_src/qt-everywhere-src-5.12.9/qtbase/include/QtCore/../../src/corelib/tools/qstring.h:48,
from /home/lvjun/study/i.mux6ull/qt/qt_src/qt-everywhere-src-5.12.9/qtbase/include/QtCore/qstring.h:1,
from /home/lvjun/study/i.mux6ull/qt/qt_src/qt-everywhere-src-5.12.9/qtbase/src/corelib/codecs/qutfcodec_p.h:55,
from /home/lvjun/study/i.mux6ull/qt/qt_src/qt-everywhere-src-5.12.9/qtbase/src/corelib/codecs/qutfcodec.cpp:41:
/usr/include/c++/11/bits/stl_algo.h:3455:5: note: ‘std::min’ declared here
3455 | min(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
In file included from /home/lvjun/study/i.mux6ull/qt/qt_src/qt-everywhere-src-5.12.9/qtbase/include/QtCore/qendian.h:1,
from /home/lvjun/study/i.mux6ull/qt/qt_src/qt-everywhere-src-5.12.9/qtbase/src/corelib/codecs/qutfcodec.cpp:43:
/home/lvjun/study/i.mux6ull/qt/qt_src/qt-everywhere-src-5.12.9/qtbase/include/QtCore/../../src/corelib/global/qendian.h:333:29: error: expected primary-expression before ‘(’ token
333 | { return QSpecialInteger(std::numeric_limits<T>::min()); }
| ^
/home/lvjun/study/i.mux6ull/qt/qt_src/qt-everywhere-src-5.12.9/qtbase/include/QtCore/../../src/corelib/global/qendian.h:333:35: error: ‘numeric_limits’ is not a member of ‘std’
333 | { return QSpecialInteger(std::numeric_limits<T>::min()); }
| ^~~~~~~~~~~~~~
/home/lvjun/study/i.mux6ull/qt/qt_src/qt-everywhere-src-5.12.9/qtbase/include/QtCore/../../src/corelib/global/qendian.h:333:51: error: expected primary-expression before ‘>’ token
333 | { return QSpecialInteger(std::numeric_limits<T>::min()); }
| ^
/home/lvjun/study/i.mux6ull/qt/qt_src/qt-everywhere-src-5.12.9/qtbase/include/QtCore/../../src/corelib/global/qendian.h:333:54: error: ‘::min’ has not been declared; did you mean ‘std::min’?
333 | { return QSpecialInteger(std::numeric_limits<T>::min()); }
| ^~~
| std::min
In file included from /usr/include/c++/11/algorithm:62,
from /home/lvjun/study/i.mux6ull/qt/qt_src/qt-everywhere-src-5.12.9/qtbase/include/QtCore/../../src/corelib/global/qglobal.h:142,
from /home/lvjun/study/i.mux6ull/qt/qt_src/qt-everywhere-src-5.12.9/qtbase/include/QtCore/qglobal.h:1,
from /home/lvjun/study/i.mux6ull/qt/qt_src/qt-everywhere-src-5.12.9/qtbase/include/QtCore/../../src/corelib/tools/qchar.h:43,
from /home/lvjun/study/i.mux6ull/qt/qt_src/qt-everywhere-src-5.12.9/qtbase/include/QtCore/qchar.h:1,
from /home/lvjun/study/i.mux6ull/qt/qt_src/qt-everywhere-src-5.12.9/qtbase/include/QtCore/../../src/corelib/tools/qstring.h:48,
from /home/lvjun/study/i.mux6ull/qt/qt_src/qt-everywhere-src-5.12.9/qtbase/include/QtCore/qstring.h:1,
from /home/lvjun/study/i.mux6ull/qt/qt_src/qt-everywhere-src-5.12.9/qtbase/src/corelib/codecs/qutfcodec_p.h:55,
from /home/lvjun/study/i.mux6ull/qt/qt_src/qt-everywhere-src-5.12.9/qtbase/src/corelib/codecs/qutfcodec.cpp:41:
/usr/include/c++/11/bits/stl_algo.h:3455:5: note: ‘std::min’ declared here
3455 | min(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
gmake: *** [Makefile:382:qutfcodec.o] 错误 1
lvjun@lvjun-virtual-machine:~/study/i.mux6ull/qt/qt_src/qt-everywhere-src-5.12.9$ g++ --version
g++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
lvjun@lvjun-virtual-machine:~/study/i.mux6ull/qt/qt_src/qt-everywhere-src-5.12.9$
|
最佳答案
查看完整内容[请看2#楼]
已解决,解决方法已上传到csdn博客,链接如下:
https://blog.csdn.net/qq_44306158/article/details/140175855?csdn_share_tail=%7B%22type%22%3A%22blog%22%2C%22rType%22%3A%22article%22%2C%22rId%22%3A%22140175855%22%2C%22source%22%3A%22qq_44306158%22%7D
发出前还在审核
|