usr/include/c++/6.4.1/bits/stl_relops.:67: Parse error at "std"

问题描述:

1.编译某qt工程的32位架构二进制包时,出现了上面错误,具体错误信息如下

qmake-qt5 -o ProductLicense/Makefile ProductLicense/ProductLicense.pro CONFIG+=debug
Scanning directory ‘/builddir/build/BUILD/anaconda-26.48.21/welcome-src/ProductLicense‘...
Updating ‘productlicense_cn.ts‘...
    Found 7 source text(s) (0 new and 7 already existing)
Scanning directory ‘/builddir/build/BUILD/anaconda-26.48.21/welcome-src/ProductLicense‘...
Updating ‘productlicense_en.ts‘...
    Found 7 source text(s) (0 new and 7 already existing)
Updating ‘productlicense_cn.qm‘...
    Generated 5 translation(s) (5 finished and 0 unfinished)
    Ignored 2 untranslated source text(s)
Updating ‘productlicense_en.qm‘...
    Generated 5 translation(s) (5 finished and 0 unfinished)
    Ignored 2 untranslated source text(s)
/usr/bin/make -C ProductLicense
make[3]: Entering directory ‘/builddir/build/BUILD/anaconda-26.48.21/welcome-src/ProductLicense‘
/usr/lib/qt5/bin/uic productlicense.ui -o ui_productlicense.h
g++ -c -pipe -g -Wall -W -D_REENTRANT -fPIC -DQT_DEPRECATED_WARNINGS -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtCore -I. -I. -I/usr/lib/qt5/mkspecs/linux-g++ -o main.o main.cpp
/usr/lib/qt5/bin/rcc -name license license.qrc -o qrc_license.cpp
g++ -pipe -g -Wall -W -dM -E -o moc_predefs.h /usr/lib/qt5/mkspecs/features/data/dummy.cpp
g++ -c -pipe -g -Wall -W -D_REENTRANT -fPIC -DQT_DEPRECATED_WARNINGS -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtCore -I. -I. -I/usr/lib/qt5/mkspecs/linux-g++ -o productlicense.o productlicense.cpp
/usr/lib/qt5/bin/moc -DQT_DEPRECATED_WARNINGS -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB --include ./moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/builddir/build/BUILD/anaconda-26.48.21/welcome-src/ProductLicense -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtCore -I/usr/include/c++/6.4.1 -I/usr/include/c++/6.4.1/x86_64-redhat-linux -I/usr/include/c++/6.4.1/backward -I/usr/lib/gcc/x86_64-redhat-linux/6.4.1/include -I/usr/local/include -I/usr/include productlicense.h -o moc_productlicense.cpp
g++ -c -pipe -g -Wall -W -D_REENTRANT -fPIC -DQT_DEPRECATED_WARNINGS -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtCore -I. -I. -I/usr/lib/qt5/mkspecs/linux-g++ -o qrc_license.o qrc_license.cpp
welcome.c: In function ‘main‘:
welcome.c:37:45: warning: passing argument 2 of ‘g_timeout_add_seconds‘ from incompatible pointer type [-Wincompatible-pointer-types]
     g_timeout_add_seconds(AUTOEXIT_TIMEOUT, gtk_main_quit, NULL);
                                             ^~~~~~~~~~~~~
In file included from /usr/include/glib-2.0/glib/giochannel.h:33:0,
                 from /usr/include/glib-2.0/glib.h:54,
                 from /usr/include/glib-2.0/gobject/gbinding.h:28,
                 from /usr/include/glib-2.0/glib-object.h:23,
                 from /usr/include/glib-2.0/gio/gioenums.h:28,
                 from /usr/include/glib-2.0/gio/giotypes.h:28,
                 from /usr/include/glib-2.0/gio/gio.h:26,
                 from /usr/include/gtk-2.0/gdk/gdkapplaunchcontext.h:30,
                 from /usr/include/gtk-2.0/gdk/gdk.h:32,
                 from /usr/include/gtk-2.0/gtk/gtk.h:32,
                 from welcome.c:1:
/usr/include/glib-2.0/glib/gmain.h:581:10: note: expected ‘GSourceFunc {aka int (*)(void *)}‘ but argument is of type ‘void (*)(void)‘
 guint    g_timeout_add_seconds      (guint           interval,
          ^~~~~~~~~~~~~~~~~~~~~
usr/include/c++/6.4.1/bits/stl_relops.:67: Parse error at "std"
Makefile:333: recipe for target ‘moc_productlicense.cpp‘ failed
make[3]: *** [moc_productlicense.cpp] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: Leaving directory ‘/builddir/build/BUILD/anaconda-26.48.21/welcome-src/ProductLicense‘
Makefile:6: recipe for target ‘system_install‘ failed
make[2]: Leaving directory ‘/builddir/build/BUILD/anaconda-26.48.21/welcome-src‘
make[2]: *** [system_install] Error 2
Makefile:542: recipe for target ‘all-recursive‘ failed
make[1]: Leaving directory ‘/builddir/build/BUILD/anaconda-26.48.21‘
make[1]: *** [all-recursive] Error 1
Makefile:436: recipe for target ‘all‘ failed

但是编译64位架构的rpm包时并没有报错,网上查询了标题bug相关信息,https://forum.qt.io/topic/56552/solved-pi2-qt5-4-1-std-errors-configure-errors

说是将qt从5.4.1升级到5.4.2即可解决,查看我版本机中32位mock环境的qt版本,发现已经是5.7;

想起该工程的上一次gerrit提交jenkins可以正常编译通过的,包括64位和32架构的二进制包,对比两次提交的文件差异,发现这次提交增加了两个qt相关中间文件,

ProductLicense.pro.user.82c30c7  

.qmake.stash

去除这两个文件后32位mock编译正常,真正原因因时间所限制,后面空了再深究。

原文地址:https://www.cnblogs.com/noxy/p/9486435.html

时间: 2024-10-10 19:38:08

usr/include/c++/6.4.1/bits/stl_relops.:67: Parse error at "std"的相关文章

/usr/include/glib-2.0/glib/gtypes.h:34:24: fatal error: glibconfig.h: No such file or directory

cc -DDEBUG -mtune=core2 -O2 \ -onvideo nvideo.c \ -I/usr/include/atk-1.0 \ -I/usr/include/cairo \ -I/usr/include/gdk-pixbuf-2.0 \ -I/usr/include/glib-2.0 \ -I/usr/include/gtk-3.0 \ -I/usr/include/pango-1.0 \ -I/usr/include/libxml2 \ -I/usr/lib/x86_64

/usr/include/boost/python/detail/wrap_python.hpp:50:23: fatal error: pyconfig.h: No such file or directory

https://stackoverflow.com/questions/39111930/usr-include-boost-python-detail-wrap-python-hpp5023-fatal-error-pyconfig-h https://blog.csdn.net/weixin_37251044/article/details/79158823 boost:https://www.zh30.com/ubuntu-cmake-could-not-find-boost.html h

Mac下/usr/include缺失

Mac升级到Yosemite后,突然发现vim的YouCompleteMe查件的代码提示不好使了,排查了一下,原来是/usr/include文件夹不见了,所有的C/C++的头文件都没了... 第一次发现这个问题,不知道是不是每次Mac升级都会删除/usr/include,还是只在不兼容的时候删除,很诡异. Mac下有个专门管理开发环境的工具xcode-select,通过它可以下载命令行开发工具(包括gcc等等).运行: xcode-select --install 上面命令会去下载安装命令行开发

#import </usr/include/objc/objc-class.h> not such file or directory问题的解决方法

近期在使用一些开源的demo,打开后出现这个错误,然后能够把 #import </usr/include/objc/objc-class.h> 改动为以下 #import <objc/runtime.h> 这样才干够

Mac下一个/usr/include失踪

Mac升级到Yosemite后,突然发现vim的YouCompleteMe代码提示所以空头支票成员,排查了一下,原本/usr/include目录中缺少.所有的C/C++头文件不见了. .. 第一次发现这个问题.不知道是不是每次Mac升级都会删除/usr/include,还是仅仅在不兼容的时候删除,非常诡异. Mac下有个专门管理开发环境的工具xcode-select,通过它能够下载命令行开发工具(包含gcc等等).执行: xcode-select --install 上面命令会去下载安装命令行开

error: /usr/include/stdio.h: Permission denied 的一种情况分析

代码: #include <stdio.h> int main(){ printf ("hello long size %d\n",sizeof(long)); } 很简单,测试是否能够编译通过对比 在root的用户下编译正常通过 在其他用户测试不通过 点击(此处)折叠或打开 ~> gcc test.c test.c:1:19: error: /usr/include/stdio.h: Permission denied test.c: In function 'ma

解决Cannot find MySQL header files under /usr/include/mysql的错误

按照下面的步骤能成功,亲测.转帖,做笔记 编译php-5.5-6的mysql支持,出现Cannot find MySQL header files under /usr/include/mysql. Note that the MySQL client library is not bundled anymore!错误!解决方法如下: [[email protected] php-5.5.6]# ./configure --prefix=/usr/local/php --with-config-

linux下安装php报错configure: error: Cannot find MySQL header files under /usr/include/mysql.

linux下安装php报错configure: error: Cannot find MySQL header files under /usr/include/mysql. 2013-03-04 15:34wdjhz | 分类:服务器软件 | 浏览5318次 configure: error: Cannot find MySQL header files under /usr/include/mysql.Note that the MySQL client library is not bun

Mac开发环境配置相关:/usr/include缺失了怎么办?

好像将系统升级到Maverick之后就不再有/usr/include文件夹了,这里面包含了编译C/C++的文件,Apple自然不会认为每一个买了Mac的人都是拿来开发的,因此默认把它移除了,有两种方式来安装它: 1)打开终端,输入: xcode-select --install 会弹出是否安装命令行开发工具的提示,可以点击“安装”来安装单独的工具,安装完成之后/usr/include便出现了. 2)又或者你可以选择先安装Xcode,然后再通过Xcode安装Command Line Tools.