Tag: gcc

如何在OSX El Capitan上安装libxml-ruby gem 2.3.2?

我正在尝试安装一个在Ruby 1.8.7-p370上运行的旧项目,并且在运行OS X El Capitan的Mac上依赖于旧版本的libxml-ruby 2.3.2 gem。 问题是,当尝试安装gem时,它不会构建本机扩展。 以下是运行gem install libxml-ruby -v ‘2.3.2’时的完整错误: Building native extensions. This could take a while… ERROR: Error installing libxml-ruby: ERROR: Failed to build gem native extension. /Users/myusername/.rbenv/versions/1.8.7-p370/bin/ruby extconf.rb checking for socket() in -lsocket… no checking for gethostbyname() in -lnsl… no checking for atan() in -lm… no checking for atan() […]

rvm pkg安装openssl

我尝试安装openssl,但是当它说: 需要重新安装所有ruby: rvm reinstall all –force rvm reinstall ruby-2.0.0-p0 –with-gcc=gcc-4.7 –with-openssl-dir=$rvm_path/usr 在我运行上面的行之后,我得到你要求使用’gcc-4.7’进行构建,但它不在你的路径中。 我已经安装了xcode,我认为已经安装了gcc。 任何人都知道任何答案。

有没有办法改变gem的gcc编译选项?

我正在努力安装RedCloth gem。 当我打字 gem install RedCloth 我明白了: […] ragel/redcloth_attributes.c.rl: In function ‘redcloth_attribute_parser’: ragel/redcloth_attributes.c.rl:26:11: error: variable ‘act’ set but not used [-Werror=unused-but-set-variable] cc1: all warnings being treated as errors make: *** [redcloth_attributes.o] Error 1 […] 原因是-Rerror编译选项传递给RedCloth gem的extconf.rb中的gcc: require ‘mkmf’ CONFIG[‘warnflags’].gsub!(/-Wshorten-64-to-32/, ”) if CONFIG[‘warnflags’] $CFLAGS << ' -O0 -Wall -Werror' if CONFIG['CC'] =~ /gcc/ […] 问题是,当我从文件中删除-Werror选项时,它会在下次启动“gem install”命令时自动重新出现。 […]

警告被视为铁路中的错误

当我尝试在我的rails项目中进行“bundle install”时出现以下错误 C:/Ruby22/bin/ruby.exe -r ./siteconf20150427-5772-lng4pk.rb extconf.rb creating Makefile make “DESTDIR=” clean make “DESTDIR=” generating byebug-i386-mingw32.def compiling breakpoint.c cc1.exe: warnings being treated as errors In file included from c:/Ruby22/include/ruby-2.2.0/ruby/defines.h:163:0, from c:/Ruby22/include/ruby-2.2.0/ruby/ruby.h:29, from c:/Ruby22/include/ruby-2.2.0/ruby.h:33, from ./byebug.h:4, from breakpoint.c:1: c:/Ruby22/include/ruby-2.2.0/ruby/win32.h:319:44: error: ‘struct timespec’ declared inside parameter list c:/Ruby22/include/ruby-2.2.0/ruby/win32.h:319:44: error: its scope is only this definition or declaration, which […]

rvm安装1.8.7错误

我正在尝试安装ruby 1.8.7 Searching for binary rubies, this might take some time. No binary rubies available for: ubuntu/12.04/x86_64/ruby-1.8.7-p371. Continuing with compilation. Please read ‘rvm mount’ to get more information on binary rubies. Installing Ruby from source to: ~/.rvm/rubies/ruby-1.8.7-p371, this may take a while depending on your cpu(s)… ruby-1.8.7-p371 – #downloading ruby-1.8.7-p371, this may take a while […]

C编译器无法在Mac OS Mountain Lion上创建可执行文件

我几乎每个页面都经历过,所有提示都无法解决问题。 我正在运行Mountain Lion我有Xcode,所有最新的开发人员工具都是最新的GCC和一切。 我正在尝试设置rbenv和ruby-build。 一切似乎都有效,但是当我去安装一个版本的ruby时,它说c编译器不起作用,并且它无法创建可执行文件。 日志的确切最后一行: checking for gawk… no checking for mawk… no checking for nawk… no checking for awk… awk checking whether make sets $(MAKE)… yes checking for gcc… /usr/bin/gcc-4.2 checking whether the C compiler works… no configure: error: in `/var/folders/zr/gv4jcc_122sfrtpfj5g9prc00000gn/T/ruby-build.20130106144331.1477/yaml-0.1.4′: configure: error: C compiler cannot create executables 我很难过。 该日志包含: configure:3265: /usr/bin/gcc-4.2 -I’/Volumes/Macintosh […]

由于符号链接错误,无法在Mac OSX 10.8.1中安装ruby-1.9.2

首先,我尝试了常见的rvm安装。 rvm install 1.9.2 但是,显示以下错误: The provided compiler ‘/usr/bin/gcc’ is LLVM based, it is not yet fully supported by ruby and gems, please read `rvm requirements`. 然后我跑 rvm requirements 并发现以下部分输出有用 Right now Ruby requires gcc to compile, but Xcode 4.2 and later no longer ship with gcc. Instead they ship with llvm-gcc (to which gcc […]

gem install pg error:无法理解Yosemite w / Ruby 2.1.5上的kern.osversion`14.0.0′

我使用RVM安装Ruby-2.1.5并再次运行bundle。 现在pg gem将无法安装,我收到此错误: gem install pg -v ‘0.17.1’ — –with-pg-config=/Applications/Postgres.app/Contents/Versions/9.3/bin/pg_config Building native extensions with: ‘–with-pg-config=/Applications/Postgres.app/Contents/Versions/9.3/bin/pg_config’ This could take a while… ERROR: Error installing pg: ERROR: Failed to build gem native extension. /Users/diego/.rvm/rubies/ruby-2.1.5/bin/ruby -r ./siteconf20141120-33258-108chh6.rb extconf.rb –with-pg-config=/Applications/Postgres.app/Contents/Versions/9.3/bin/pg_config Using config values from /Applications/Postgres.app/Contents/Versions/9.3/bin/pg_config checking for libpq-fe.h… yes checking for libpq/libpq-fs.h… yes checking for pg_config_manual.h… yes checking for […]

安装libv8 3.11.8.3时出错

我正在运行全新安装的OSX 10.9 Mavericks和XCode 5.0.1。 当我试图在我的项目中运行bundle install时,它无法安装libv8 gem。 这是输出: ERROR: Error installing libv8: ERROR: Failed to build gem native extension. /Users/user1/.rvm/rubies/ruby-1.9.3-p448/bin/ruby extconf.rb creating Makefile Configured with: –prefix=/Applications/Xcode.app/Contents/Developer/usr –with-gxx-include-dir=/usr/include/c++/4.2.1 Unable to find a compiler officially supported by v8. It is recommended to use GCC v4.4 or higher Using compiler: g++ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: /Users/user1/.rvm/gems/ruby-1.9.3-p448/gems/libv8-3.11.8.3/vendor/v8/out/x64.release/obj.target/preparser_lib/src/atomicops_internals_x86_gcc.o has no symbols In […]

如何在低内存系统上使用RVM编译ruby?

rvm install 1.9.3 导致make.log中的错误: … compiling ./enc/trans/emoji_sjis_docomo.c compiling ./enc/trans/emoji_sjis_kddi.c gcc: internal compiler error: Killed (program cc1) gcc: internal compiler error: Killed (program cc1) gcc: internal compiler error: Killed (program cc1) Please submit a full bug report, with preprocessed source if appropriate. … dmesg显示 [180031.341709] send sigkill to 3705 (cc1), adj 0, size 3394 在某些时候运行配置过程的free节目: total […]