简体   繁体   English

错误:无法在Windows 7x64上构建gem本机扩展

[英]ERROR: Failed to build gem native extension on windows 7x64

I've been following the instructions provided by Development Kit for the rubyinstaller 我一直在遵循开发套件为rubyinstaller提供的说明
https://github.com/oneclick/rubyinstaller/wiki/Development-Kit https://github.com/oneclick/rubyinstaller/wiki/Development-Kit

When I try the last step I get the following error: 当我尝试最后一步时,出现以下错误:
ERROR: Failed to build gem native extension 错误:无法构建gem本机扩展

Here is the log file. 这是日志文件。 http://pastebin.com/mLUCCVd3 http://pastebin.com/mLUCCVd3

I have been following the troubleshoot section with no avail. 我一直在跟踪故障排除部分,但无济于事。

Running windows7x64 This all started because I want to get the appfog tunnel working 运行Windows7x64这一切都开始了,因为我想让appfog tunnel正常工作

Any help is appreciated 任何帮助表示赞赏

I see things that suggest a mismatch between 32 bit and 64 bit building. 我看到的东西表明32位和64位构建之间不匹配。

Without doing anything except looking at your error log, I see two things. 除了查看您的错误日志外,没有做任何其他事情,我看到两件事。

First, "c:/Ruby192/include/ruby-1.9.1/ruby/ruby.h:112:14: error: size of array 'ruby_check_sizeof_voidp' is negative" 首先,“ c:/Ruby192/include/ruby-1.9.1/ruby/ruby.h:112:14:错误:数组'ruby_check_sizeof_voidp'的大小为负数”

second, all the "warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]" messages. 第二,所有“警告:从不同大小的整数[-Wint-to-pointer-cast]转换为指针”消息。

in the first case, a 32 bit unsigned int value 0xFFFFFFFF is signed int value -1; 在第一种情况下,将32位无符号整数值0xFFFFFFFF标记为整数值-1; in 64 bit, it's still 0x00000000FFFFFFFF. 在64位中,它仍然是0x00000000FFFFFFFF。 In the second case, sizeof(int) is 4 for both 32- and 64-bit windows; 在第二种情况下,对于32位和64位窗口,sizeof(int)均为4。 in win32, sizeof(*T) is 4, but in 64-bit windows, sizeof(*T) is 8, thus, in 32bit, sizeof(int) == sizeof(*T), but not in win64. 在Win32中,sizeof(* T)为4,但在64位窗口中,sizeof(* T)为8,因此,在32位中,sizeof(int)== sizeof(* T),但在win64中则不是。

Look for contradictory architectures in your build scripts, command lines, and preprocessor definitions. 在构建脚本,命令行和预处理器定义中寻找矛盾的体系结构。

In your original attempt, it looks like you were using ruby 1.9.x. 在您最初的尝试中,您似乎正在使用ruby1.9.x。 I was recently trying to install json in 1.9.3, and I was getting some of the same errors as you, specifically: 我最近尝试在1.9.3中安装json,但遇到了与您相同的错误,特别是:

c:/Ruby192/include/ruby-1.9.1/ruby/missing.h:42:8: error: redefinition of 'struct timezone'

It turned out this was happening because I was using the latest version of devkit... You need to use the 'old' devkit which, I believe, has recently been renamed to 'tdm' which works for 1.9.x and 1.8.7 (I originally interpreted there information page to mean tdm was for 1.8.x due to skimming too fast and having done this in the past so many times, and the fact that with regard to the language itself, 1.9 is far more compatible to 2.0 than 1.8 is to 1.9). 原来是因为我使用的是最新版本的devkit ...您需要使用“旧” devkit,我相信它最近已重命名为“ tdm”,适用于1.9.x和1.8.7。 (我最初将那里的信息页解释为tdm是1.8.x的版本,因为它浏览速度太快,并且在过去已经执行了很多次,而且就语言本身而言,1.9与2.0的兼容性要比2.0的兼容得多。 1.8是1.9)。

In your second attempt (noted in your comment to the other answer) you switched to using ruby 2.0, which your gem may be flat out incompatible with, idk, that's a whole nother can of worms. 在第二次尝试中(在您对其他答案的评论中注意到),您切换到使用ruby 2.0,该宝石可能与idk完全不兼容,这是蠕虫的全部来源。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用 Windows 使用 bootsnap 修复“无法构建 gem 原生扩展”错误 - How to fix ' Failed to build gem native extension' error with bootsnap with Windows 无法在Windows上构建gem本机扩展 - Failed to build gem native extension on Windows 无法构建gem本机扩展(Windows) - Failed to build gem native extension (Windows) Windows:安装 jekyll 时出错 + gem 更新失败 - 错误:无法构建 gem 本机扩展 - Windows : Error installing jekyll + gem update failed - ERROR: Failed to build gem native extension 错误:安装jekyll时出错:错误:无法构建gem原生扩展 - ERROR: Error installing jekyll: ERROR: Failed to build gem native extension 错误:安装 psych 时出错:错误:无法构建 gem 本机扩展 - ERROR: Error installing psych: ERROR: Failed to build gem native extension 安装 libv8 时出错:错误:无法构建 gem 本机扩展 - Error installing libv8: ERROR: Failed to build gem native extension Ruby on Windows:无法安装mysql2 gem - 无法构建gem原生扩展 - Ruby on Windows: Cannot install mysql2 gem - Failed to build gem native extension Gem::Ext::BuildError: 错误:无法构建 gem 本机扩展。 对于 SQLite3 - Gem::Ext::BuildError: ERROR: Failed to build gem native extension. for SQlite3 ROR错误:无法构建gem本机扩展。 (Gem :: Installer :: ExtensionBuildError) - ROR ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM