尝试从源代码构建 GCC 7.1.0。这不是我的第一次,它曾经在过去的 GCC 版本中工作。
../configure --build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 \
--prefix=/c/mingw64 --with-sysroot=/c/mingw64 \
--with-gmp=/c/mingw64/gmp --with-mpfr=/c/mingw64/mpfr --with-mpc=/c/mingw64/mpc \
--with-isl=/c/mingw64/isl \
--disable-nls --disable-multilib --disable-libstdcxx-pch --disable-shared \
--disable-win32-registry --disable-libstdcxx-debug --disable-libstdcxx-verbose \
--with-tune=haswell --enable-lto --enable-checking=release --enable-languages=c,c++ \
--enable-libstdcxx-time --enable-threads=win32 --enable-libatomic --enable-fully-dynamic-string
错误
checking how to run the C++ preprocessor... /lib/cpp
configure: error: in `/c/mingw64/src/build/gcc':
configure: error: C++ preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details.
make[2]: *** [Makefile:4309: configure-stage2-gcc] Error 1
make[2]: Leaving directory '/c/mingw64/src/build'
make[1]: *** [Makefile:20550: stage2-bubble] Error 2
make[1]: Leaving directory '/c/mingw64/src/build'
make: *** [Makefile:936: all] Error 2
完成配置日志:https://pastebin.com/raw/mEeJHCuK
请注意,我 /lib/cpp 永远不存在。
我做了一些谷歌搜索并尝试了所有建议,包括:
CXX=/c/mingw/bin/g++(类似于 CC 和 CPP)gcc-7.1.0/gcc/configure中所有/lib/cpp替换为/c/mingw/bin/g++。这给了我: conftest.c:14:8: error: 'Syntax' does not name a type
Syntax error
^
(^ 类似于 Compiling on a mac: What does it mean if my compiler fails a sanity check? )
在 https://gcc.gnu.org/ml/gcc-bugs/2015-10/msg00604.html 处似乎有一个旧的(严重的)错误, 但没有更新。
最佳答案
CPP 不应指向g++; CPP 是 C 预处理器,所以让它指向 C 预处理器:
CPP=/c/mingw/bin/cpp
您链接到的问题中提到了这一点。
关于windows - 编译 GCC 7 : error: C++ preprocessor "/lib/cpp" fails sanity check,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43763527/
我需要在客户计算机上运行Ruby应用程序。通常需要几天才能完成(复制大备份文件)。问题是如果启用sleep,它会中断应用程序。否则,计算机将持续运行数周,直到我下次访问为止。有什么方法可以防止执行期间休眠并让Windows在执行后休眠吗?欢迎任何疯狂的想法;-) 最佳答案 Here建议使用SetThreadExecutionStateWinAPI函数,使应用程序能够通知系统它正在使用中,从而防止系统在应用程序运行时进入休眠状态或关闭显示。像这样的东西:require'Win32API'ES_AWAYMODE_REQUIRED=0x0
我正在尝试测试是否存在表单。我是Rails新手。我的new.html.erb_spec.rb文件的内容是:require'spec_helper'describe"messages/new.html.erb"doit"shouldrendertheform"dorender'/messages/new.html.erb'reponse.shouldhave_form_putting_to(@message)with_submit_buttonendendView本身,new.html.erb,有代码:当我运行rspec时,它失败了:1)messages/new.html.erbshou
我在从html页面生成PDF时遇到问题。我正在使用PDFkit。在安装它的过程中,我注意到我需要wkhtmltopdf。所以我也安装了它。我做了PDFkit的文档所说的一切......现在我在尝试加载PDF时遇到了这个错误。这里是错误:commandfailed:"/usr/local/bin/wkhtmltopdf""--margin-right""0.75in""--page-size""Letter""--margin-top""0.75in""--margin-bottom""0.75in""--encoding""UTF-8""--margin-left""0.75in""-
我正在使用这个:4.times{|i|assert_not_equal("content#{i+2}".constantize,object.first_content)}我之前声明过局部变量content1content2content3content4content5我得到的错误NameError:wrongconstantnamecontent2这个错误是什么意思?我很确定我想要content2=\ 最佳答案 你必须用一个大字母来调用ruby常量:Content2而不是content2。Aconstantnamestart
为了将Cucumber用于命令行脚本,我按照提供的说明安装了arubagem。它在我的Gemfile中,我可以验证是否安装了正确的版本并且我已经包含了require'aruba/cucumber'在'features/env.rb'中为了确保它能正常工作,我写了以下场景:@announceScenario:Testingcucumber/arubaGivenablankslateThentheoutputfrom"ls-la"shouldcontain"drw"假设事情应该失败。它确实失败了,但失败的原因是错误的:@announceScenario:Testingcucumber/ar
我的瘦服务器配置了nginx,我的ROR应用程序正在它们上运行。在我发布代码更新时运行thinrestart会给我的应用程序带来一些停机时间。我试图弄清楚如何优雅地重启正在运行的Thin实例,但找不到好的解决方案。有没有人能做到这一点? 最佳答案 #Restartjustthethinserverdescribedbythatconfigsudothin-C/etc/thin/mysite.ymlrestartNginx将继续运行并代理请求。如果您将Nginx设置为使用多个上游服务器,例如server{listen80;server
我正在尝试在我的centos服务器上安装therubyracer,但遇到了麻烦。$geminstalltherubyracerBuildingnativeextensions.Thiscouldtakeawhile...ERROR:Errorinstallingtherubyracer:ERROR:Failedtobuildgemnativeextension./usr/local/rvm/rubies/ruby-1.9.3-p125/bin/rubyextconf.rbcheckingformain()in-lpthread...yescheckingforv8.h...no***e
我遵循MichaelHartl的“RubyonRails教程:学习Web开发”,并创建了检查用户名和电子邮件长度有效性的测试(名称最多50个字符,电子邮件最多255个字符)。test/helpers/application_helper_test.rb的内容是:require'test_helper'classApplicationHelperTest在运行bundleexecraketest时,所有测试都通过了,但我看到以下消息在最后被标记为错误:ERROR["test_full_title_helper",ApplicationHelperTest,1.820016791]test
我正在尝试从Postgresql表(table1)中获取数据,该表由另一个相关表(property)的字段(table2)过滤。在纯SQL中,我会这样编写查询:SELECT*FROMtable1JOINtable2USING(table2_id)WHEREtable2.propertyLIKE'query%'这工作正常:scope:my_scope,->(query){includes(:table2).where("table2.property":query)}但我真正需要的是使用LIKE运算符进行过滤,而不是严格相等。然而,这是行不通的:scope:my_scope,->(que
我正在尝试编写一个将文件上传到AWS并公开该文件的Ruby脚本。我做了以下事情:s3=Aws::S3::Resource.new(credentials:Aws::Credentials.new(KEY,SECRET),region:'us-west-2')obj=s3.bucket('stg-db').object('key')obj.upload_file(filename)这似乎工作正常,除了该文件不是公开可用的,而且我无法获得它的公共(public)URL。但是当我登录到S3时,我可以正常查看我的文件。为了使其公开可用,我将最后一行更改为obj.upload_file(file