1、Qt570的简单测试项目,在做"重新构建"的操作的时候,出现1个问题,Qt底下的"编译输出"窗口中的信息为:

cc1plus: error: unrecognized command line option "-std=gnu++11"
make: *** [main.o] Error 1
17:01:27: 进程"/usr/bin/make"退出,退出代码 2 。
Error while building/deploying project qt570_test_01 (kit: Desktop Qt 5.7.0 GCC 64bit)
When executing step "Make"
17:01:27: Elapsed time: 00:00.

  1.1、这个报错是∵ gcc-c++ 版本太低,需要升级到 >=4.7:http://www.51bbo.com/archives/2228

   ZC: 这里,我只升级到了 4.7,没有升级到4.8

wget http://people.centos.org/tru/devtools-1.1/devtools-1.1.repo
yum --enablerepo=testing-1.1-devtools-6 install devtoolset-1.1-gcc devtoolset-1.1-gcc-c++ 安装文件放置位置在:/opt/centos/devtoolset-1.1
具体程序文件位置在:/opt/centos/devtoolset-1.1/root/usr/bin/*
使用最新的gcc环境,所以要替换本地的,使用软连接来完成(也可以设置环境变量,看自己喜好) mv /usr/bin/gcc /usr/bin/gcc-4.4.7
mv /usr/bin/g++ /usr/bin/g++-4.4.7
mv /usr/bin/c++ /usr/bin/c++-4.4.7
ln -s /opt/centos/devtoolset-1.1/root/usr/bin/gcc /usr/bin/gcc
ln -s /opt/centos/devtoolset-1.1/root/usr/bin/c++ /usr/bin/c++
ln -s /opt/centos/devtoolset-1.1/root/usr/bin/g++ /usr/bin/g++
gcc --version

2、再次编译,没错了。Release程序在IDE中执行的时候,出现如下错误:

  ZC: 貌似是在 QWebEngineView*->load(???)的时候出现该问题

Starting /home/qt532_projects/build-qt570_test_01-Desktop_Qt_5_7_0_GCC_64bit-Release/qt570_test_01...
[0913/090214:ERROR:browser_main_loop.cc(217)] Running without the SUID sandbox! See https://chromium.googlesource.com/chromium/src/+/master/docs/linux_suid_sandbox_development.md for more information on developing with the sandbox on.
[0913/090214:FATAL:namespace_sandbox.cc(141)] Check failed: clone_flags & CLONE_NEWUSER.
#0 0x7f9b42bffaee <unknown>
#1 0x7f9b42c1440e <unknown>
#2 0x7f9b428a4df5 <unknown>
#3 0x7f9b428a528c <unknown>
#4 0x7f9b41fd1108 <unknown>
#5 0x7f9b42043b46 <unknown>
#6 0x7f9b41e85344 <unknown>
#7 0x7f9b412d0011 <unknown>
#8 0x7f9b412d0cad <unknown>
#9 0x7f9b412c428e <unknown>
#10 0x7f9b412c7785 QtWebEngineCore::WebContentsAdapter::WebContentsAdapter()
#11 0x7f9b460429f5 <unknown>
#12 0x7f9b46042f94 QWebEnginePage::QWebEnginePage()
#13 0x7f9b4604da2b QWebEngineView::page()
#14 0x7f9b4604db79 QWebEngineView::load()
#15 0x000000403240 MainWindow::MainWindow()
#16 0x000000402dac main
#17 0x0037bce1ecdd <unknown>
#18 0x000000402e29 <unknown> 程序异常结束。
/home/qt532_projects/build-qt570_test_01-Desktop_Qt_5_7_0_GCC_64bit-Release/qt570_test_01 crashed.

  2.1、

http://askubuntu.com/questions/329320/chromium-running-without-the-suid-sandbox-error

http://commondatastorage.googleapis.com/chromium-browser-continuous/index.html?prefix=Linux_x64/382014/ (ZC: 需要f/q)

  2.2、

sudo mv chrome_sandbox chrome-sandbox
sudo chown root chrome-sandbox
sudo chmod 4755 chrome-sandbox
./chrome-wrapper [root@localhost chrome-linux]# ./chrome-wrapper
/home/chrome-linux/chrome: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /home/chrome-linux/chrome)
/home/chrome-linux/chrome: /lib64/libc.so.6: version `GLIBC_2.15' not found (required by /home/chrome-linux/chrome)
/home/chrome-linux/chrome: /usr/lib64/libnss3.so: version `NSS_3.14.3' not found (required by /home/chrome-linux/chrome)
[root@localhost chrome-linux]# ./chrome-wrapper
/home/chrome-linux/chrome: /usr/lib64/libnss3.so: version `NSS_3.14.3' not found (required by /home/chrome-linux/chrome)
[root@localhost chrome-linux]# yum list nss* ../glibc-2.15/configure --prefix=/usr --disable-profile --enable-add-ons --with-headers=/usr/include --with-binutils=/usr/bin

  安装升级 glibc,参考:http://blog.csdn.net/hnhuangyiyang/article/details/50392997

  2.3、

   ./chrome-wrapper(Linux_x64%2F250015%2Fchrome-linux.zip) 又说 找不到变量g_variant_builder_init,http://www.linuxforums.org/forum/red-hat-fedora-linux/205952-issue-google-chrome-rhel6.html 中说“Do you have glib 2.2.4 or greater installed? It's a part of the gnome library.” 也有人说 不再支持...

   ZC: 使用 yum update glib2,升级了一下 glib2 和 glib2-devel,g_variant_builder_init的报错没有了。又说 "undefined symbol: gtk_offscreen_window_new"

   ZC: 使用 "yum update gtk2",升级 gtk2相关信息,但是需要下载 总共219M的东西...

   ZC: 运行"./chrome-wapper" 提示信息:“不能以根用户身份运行 chromium”,命令改成这样:“./chrome-wapper --user-data-dir”就行了

  2.4、按照"2.1"&"2.2"中的说法弄了之后 chrome是打开了,但是 Qt执行时的错误依旧...

3、不知道怎么弄了... 以后再说,或者 等5.7.1吧...

4、

5、

Qt570_CentOS64x64_02的更多相关文章

随机推荐

  1. 阿里云搭建SVN服务器

    1:安装svn apt-get install subversion 2. 开启svn服务器 svnserve -d 检查是否开启:ps aux | grep svnserve 若出现如下内容: wk ...

  2. vue 学习报错 Newline required at end of file but not found

    着不敢了,原因竟然是需要在js css等后面再加一行(空行) Newline required at end of file but not found 翻译:文件末尾需要换行符,但找不到 如下面两处 ...

  3. TFIDF练习

    直接上代码吧: """ 测试Demo """ import lightgbm as lgb import numpy as np from ...

  4. Fundamental theorem of arithmetic 为什么1不是质数

    https://en.wikipedia.org/wiki/Fundamental_theorem_of_arithmetic In number theory, the fundamental th ...

  5. iptables,lokkit,ebtables,arptables---logrotate

    iptables,lokkit,ebtables,arptables logrotate  这五个位置也被称为五个钩子函数(hook functions),也叫五个规则链. 1.PREROUTING ...

  6. QQ 空间过滤器 for V8

    最近 QQ空间升级到 V8 版本,做了很大的调整, 我也做了升级,由于时间关系,功能暂时只有 模块过滤,其他过滤请等待后续更新,谢谢大家的支持! 刚刚上线,不知道你们能否看到 https://chro ...

  7. Git学习-->GitLab如何修改时区?

    一.背景 今天有同事在GitLab上查看时间的时候,发现GitLab上显示的时间和提交的时间不一致. 本地时间现在为:2017-11-28 11:43 查看本地代码提交的时间为:2017-11-28 ...

  8. AndroidManifest.xml的targetSdkVersion 与 project.properties中target

    (1)minSdkVersion与maxSdkVersion :在安装程序的时候,如果目标设备的API < minSdkVersion,或者目标设备的API > maxSdkVersion ...

  9. LoadRunner-常用的函数

    LoadRunner中,常用的函数有很多,这里只介绍编写性能测试脚本过程中那些必然用到的函数.本文重点关注这些典型函数的应用场合及注意点,至于函数详细使用说明请参见LoadRunner帮助文档. 1. ...

  10. 【spring mvc】扒一扒tomcat

    1.TOMCAT的目录 主要说一下webapps目录,WEB应用的目录结构:假设在$CATALINA_HOME/webapps下有helloapp的web应用 /helloapp:Web应用的根目录, ...