zoukankan      html  css  js  c++  java
  • 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编译正常,真正原因因时间所限制,后面空了再深究。

      

  • 相关阅读:
    hdu多校4
    hdu多校第三场
    牛客多校4
    bzoj 1477 扩展欧几里德
    bzoj 1485 卡特兰数 + 分解因子
    hdu多校 2
    牛客网暑期多校2
    bzoj 1040 基向内环树dp
    hdu 多校第一场
    SPOJ
  • 原文地址:https://www.cnblogs.com/noxy/p/9486435.html
Copyright © 2011-2022 走看看