OpenEdv-开源电子网

 找回密码
 立即注册
正点原子全套STM32/Linux/FPGA开发资料,上千讲STM32视频教程免费下载...
查看: 314|回复: 2

ubuntu22.04移植qt5.12.9生成Makefile失败问题

[复制链接]

2

主题

18

帖子

0

精华

初级会员

Rank: 2

积分
64
金钱
64
注册时间
2020-8-31
在线时间
14 小时
发表于 2024-7-1 00:01:18 | 显示全部楼层 |阅读模式
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 发出前还在审核
正点原子逻辑分析仪DL16劲爆上市
回复

使用道具 举报

2

主题

18

帖子

0

精华

初级会员

Rank: 2

积分
64
金钱
64
注册时间
2020-8-31
在线时间
14 小时
 楼主| 发表于 2024-7-1 00:01:19 | 显示全部楼层
已解决,解决方法已上传到csdn博客,链接如下:
https://blog.csdn.net/qq_4430615 ... 22qq_44306158%22%7D
发出前还在审核
回复

使用道具 举报

530

主题

11万

帖子

34

精华

管理员

Rank: 12Rank: 12Rank: 12

积分
165309
金钱
165309
注册时间
2010-12-1
在线时间
2108 小时
发表于 2024-7-2 00:47:51 | 显示全部楼层
帮顶
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则



关闭

原子哥极力推荐上一条 /2 下一条

正点原子公众号

QQ|手机版|OpenEdv-开源电子网 ( 粤ICP备12000418号-1 )

GMT+8, 2024-11-23 19:04

Powered by OpenEdv-开源电子网

© 2001-2030 OpenEdv-开源电子网

快速回复 返回顶部 返回列表