红宝石音频1.6.1安装错误(与安装Libsndfile 1.0.25) [英] ruby-audio 1.6.1 install error (with installed Libsndfile 1.0.25)

查看:249
本文介绍了红宝石音频1.6.1安装错误(与安装Libsndfile 1.0.25)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请帮我安装ruby-audio 1.6.1 ruby​​ 1.9.3p194(2012-04-20修订版35410)[i686-linux]



已安装Libsndfile 1.0.25。



这里是日志:

gem install ruby​​-audio-1.6.1.gem
构建原生扩展。这可能需要一段时间...
错误:安装ruby-audio-1.6.1.gem时出错:
错误:无法构建gem原生扩展。

  /usr/bin/ruby1.9.1 extconf.rb 
检查/ opt / local / include中的sndfile.h,/ usr / local / include,C: / Program Files(x86)/ Mega-Nerd / libsndfile / include,C:/ Program Files / Mega-Nerd / libsndfile / include ... yes
在-lsndfile-1中检查sf_open()
检查sf_open()in -lsndfile ...是
检查sndfile.h中的SF_FORMAT_OGG ...是
创建Makefile

make
编译ra_buffer.c
ra_buffer.c:函数'ra_buffer_index_get':
ra_buffer.c:277:1:warning:控制到达非空函数结束[-Wreturn-type]
ra_buffer.c:在函数'ra_buffer_type'中:
ra_buffer.c:214:1:warning:控制到达非void函数结束[-Wreturn-type]
编译ra_soundinfo.c
编译rubyaudio_ext.c
编译ra_sound.c
ra_sound.c:在函数'ra_sound_ init':
ra_sound.c:155:5:error:格式不是字符串文字,也没有格式参数[-Werror = format-security]
ra_sound.c:函数'ra_sound_read_short':
ra_sound.c:258:1:warning:未使用的变量'channels'[-Wunused-variable]
ra_sound.c:函数'ra_sound_read_int':
ra_sound.c:259:1:警告:未使用的变量'channels'[-Wunused-variable]
ra_sound.c:函数'ra_sound_read_float':
ra_sound.c:260:1:warning:未使用的变量'channels'[-Wunused-variable ]
ra_sound.c:在函数'ra_sound_read_double'中:
ra_sound.c:261:1:warning:未使用的变量'channels'[-Wunused-variable]
在ra_sound包含的文件中。 h:6:0,来自ra_sound.c的
:1:
ra_sound.c:顶层:
ra_soundinfo.h:10:14:warning:'ra_soundinfo_allocate'声明'static'但没有定义[-Wunused-function]
ra_soundinfo.h:11:14:警告:'ra_soundinfo_free'声明为'static',但是nev er定义[-Wunused-function]
ra_soundinfo.h:14:14:警告:'ra_soundinfo_valid'声明为'static'但从未定义过[-Wunused-function]
ra_soundinfo.h:15:14:警告:'ra_soundinfo_frames'声明为'static'但从未定义过[-Wunused-function]
ra_soundinfo.h:16:14:warning:'ra_soundinfo_samplerate'声明为'static'但从未定义过[-Wunused-function]
ra_soundinfo.h:17:14:warning:'ra_soundinfo_samplerate_set'声明为'static'但从未定义过[-Wunused-function]
ra_soundinfo.h:18:14:warning:'ra_soundinfo_channels'声明为'static',但是从未定义[-Wunused-function]
ra_soundinfo.h:19:14:warning:'ra_soundinfo_channels_set'声明为'static'但从未定义过[-Wunused-function]
ra_soundinfo.h:20:14:警告:'ra_soundinfo_format'声明'静态'但从未定义过[-Wunused-function]
ra_soundinfo.h:21:14:warning:'ra_soundinfo_format_set'声明为'static',但neve r已定义[-Wunused-function]
ra_soundinfo.h:22:14:warning:'ra_soundinfo_sections'声明为'static'但从未定义过[-Wunused-function]
ra_soundinfo.h:23:14:警告:'ra_soundinfo_seekable'声明为'static'但从未定义过[-Wunused-function]
在ra_sound.h中包含的文件中:7:0,ra_sound.c中的
:1:
ra_buffer .h:24:14:警告:'ra_buffer_allocate'声明'静态'但从未定义过[-Wunused-function]
ra_buffer.h:25:14:警告:'ra_buffer_free'声明'静态'但从未定义过[ -Wunused-function]
ra_buffer.h:28:14:warning:'ra_buffer_init'声明为'static'但从未定义过[-Wunused-function]
ra_buffer.h:29:14:warning:' ra_buffer_init_copy'声明'静态'但从未定义[-Wunused-function]
ra_buffer.h:30:14:警告:'ra_buffer_channels'声明为'static'但从未定义过[-Wunused-function]
ra_buffer .h:31:14:警告:'ra_buffer_size'd eclared'static'但从未定义[-Wunused-function]
ra_buffer.h:32:14:警告:'ra_buffer_real_size'声明为'static'但从未定义过[-Wunused-function]
ra_buffer.h :33:14:警告:'ra_buffer_real_size_set'声明'静态'但从未定义过[--Wunused-function]
ra_buffer.h:34:14:警告:'ra_buffer_type'声明'静态'但从未定义过[--Wunused函数]
ra_buffer.h:35:14:警告:'ra_buffer_each'声明为'static'但从未定义过[-Wunused-function]
ra_buffer.h:36:14:warning:'ra_buffer_aref'声明'静态'但从未定义[-Wunused-function]
ra_buffer.h:37:14:警告:'ra_buffer_index_get'声明为'static'但从未定义过[-Wunused-function]
ra_buffer.h :38:14:警告:'ra_buffer_aset'声明'静态'但从未定义过[-Wunused-function]
ra_buffer.h:39:13:警告:'ra_buffer_index_set'声明'静态'但从未定义过[--Wunused功能]
cc1:某些警告被视为错误
make:*** [ra_sound.o]错误1


Gem文件将保留安装在/ usr / lib / ruby​​ / gems中/1.9.1/gems/ruby-audio-1.6.1进行检查。
结果记录到/usr/lib/ruby/gems/1.9.1/gems/ruby-audio-1.6.1/ext/rubyaudio_ext/gem_make.out

解决方案使用 -Wno-error = format-security flag:

  gem install ruby​​-audio  -  --with-cflags = -Wno-error =格式安全性

我也遇到了这个问题(在Ubuntu 13.10上),我相信底层问题与这个链接的问题 - - 默认的编译器标志会引发安全错误。



传递 -Wno-error = format-security 编译器标志在安装gem时会忽略安全错误并允许您安装gem。


Please help me to install ruby-audio 1.6.1

ruby 1.9.3p194 (2012-04-20 revision 35410) [i686-linux]

Libsndfile 1.0.25 already installed.

Here is log:

gem install ruby-audio-1.6.1.gem Building native extensions. This could take a while... ERROR: Error installing ruby-audio-1.6.1.gem: ERROR: Failed to build gem native extension.

    /usr/bin/ruby1.9.1 extconf.rb
checking for sndfile.h in /opt/local/include,/usr/local/include,C:/Program Files (x86)/Mega-Nerd/libsndfile/include,C:/Program Files/Mega-Nerd/libsndfile/include... yes
checking for sf_open() in -lsndfile-1... no
checking for sf_open() in -lsndfile... yes
checking for SF_FORMAT_OGG in sndfile.h... yes
creating Makefile

make
compiling ra_buffer.c
ra_buffer.c: In function ‘ra_buffer_index_get’:
ra_buffer.c:277:1: warning: control reaches end of non-void function [-Wreturn-type]
ra_buffer.c: In function ‘ra_buffer_type’:
ra_buffer.c:214:1: warning: control reaches end of non-void function [-Wreturn-type]
compiling ra_soundinfo.c
compiling rubyaudio_ext.c
compiling ra_sound.c
ra_sound.c: In function ‘ra_sound_init’:
ra_sound.c:155:5: error: format not a string literal and no format arguments [-Werror=format-security]
ra_sound.c: In function ‘ra_sound_read_short’:
ra_sound.c:258:1: warning: unused variable ‘channels’ [-Wunused-variable]
ra_sound.c: In function ‘ra_sound_read_int’:
ra_sound.c:259:1: warning: unused variable ‘channels’ [-Wunused-variable]
ra_sound.c: In function ‘ra_sound_read_float’:
ra_sound.c:260:1: warning: unused variable ‘channels’ [-Wunused-variable]
ra_sound.c: In function ‘ra_sound_read_double’:
ra_sound.c:261:1: warning: unused variable ‘channels’ [-Wunused-variable]
In file included from ra_sound.h:6:0,
                 from ra_sound.c:1:
ra_sound.c: At top level:
ra_soundinfo.h:10:14: warning: ‘ra_soundinfo_allocate’ declared ‘static’ but never defined [-Wunused-function]
ra_soundinfo.h:11:14: warning: ‘ra_soundinfo_free’ declared ‘static’ but never defined [-Wunused-function]
ra_soundinfo.h:14:14: warning: ‘ra_soundinfo_valid’ declared ‘static’ but never defined [-Wunused-function]
ra_soundinfo.h:15:14: warning: ‘ra_soundinfo_frames’ declared ‘static’ but never defined [-Wunused-function]
ra_soundinfo.h:16:14: warning: ‘ra_soundinfo_samplerate’ declared ‘static’ but never defined [-Wunused-function]
ra_soundinfo.h:17:14: warning: ‘ra_soundinfo_samplerate_set’ declared ‘static’ but never defined [-Wunused-function]
ra_soundinfo.h:18:14: warning: ‘ra_soundinfo_channels’ declared ‘static’ but never defined [-Wunused-function]
ra_soundinfo.h:19:14: warning: ‘ra_soundinfo_channels_set’ declared ‘static’ but never defined [-Wunused-function]
ra_soundinfo.h:20:14: warning: ‘ra_soundinfo_format’ declared ‘static’ but never defined [-Wunused-function]
ra_soundinfo.h:21:14: warning: ‘ra_soundinfo_format_set’ declared ‘static’ but never defined [-Wunused-function]
ra_soundinfo.h:22:14: warning: ‘ra_soundinfo_sections’ declared ‘static’ but never defined [-Wunused-function]
ra_soundinfo.h:23:14: warning: ‘ra_soundinfo_seekable’ declared ‘static’ but never defined [-Wunused-function]
In file included from ra_sound.h:7:0,
                 from ra_sound.c:1:
ra_buffer.h:24:14: warning: ‘ra_buffer_allocate’ declared ‘static’ but never defined [-Wunused-function]
ra_buffer.h:25:14: warning: ‘ra_buffer_free’ declared ‘static’ but never defined [-Wunused-function]
ra_buffer.h:28:14: warning: ‘ra_buffer_init’ declared ‘static’ but never defined [-Wunused-function]
ra_buffer.h:29:14: warning: ‘ra_buffer_init_copy’ declared ‘static’ but never defined [-Wunused-function]
ra_buffer.h:30:14: warning: ‘ra_buffer_channels’ declared ‘static’ but never defined [-Wunused-function]
ra_buffer.h:31:14: warning: ‘ra_buffer_size’ declared ‘static’ but never defined [-Wunused-function]
ra_buffer.h:32:14: warning: ‘ra_buffer_real_size’ declared ‘static’ but never defined [-Wunused-function]
ra_buffer.h:33:14: warning: ‘ra_buffer_real_size_set’ declared ‘static’ but never defined [-Wunused-function]
ra_buffer.h:34:14: warning: ‘ra_buffer_type’ declared ‘static’ but never defined [-Wunused-function]
ra_buffer.h:35:14: warning: ‘ra_buffer_each’ declared ‘static’ but never defined [-Wunused-function]
ra_buffer.h:36:14: warning: ‘ra_buffer_aref’ declared ‘static’ but never defined [-Wunused-function]
ra_buffer.h:37:14: warning: ‘ra_buffer_index_get’ declared ‘static’ but never defined [-Wunused-function]
ra_buffer.h:38:14: warning: ‘ra_buffer_aset’ declared ‘static’ but never defined [-Wunused-function]
ra_buffer.h:39:13: warning: ‘ra_buffer_index_set’ declared ‘static’ but never defined [-Wunused-function]
cc1: some warnings being treated as errors
make: *** [ra_sound.o] Error 1


Gem files will remain installed in /usr/lib/ruby/gems/1.9.1/gems/ruby-audio-1.6.1 for inspection.
Results logged to /usr/lib/ruby/gems/1.9.1/gems/ruby-audio-1.6.1/ext/rubyaudio_ext/gem_make.out

解决方案

Install with the -Wno-error=format-security flag:

gem install ruby-audio -- --with-cflags=-Wno-error=format-security

I ran into this as well (on Ubuntu 13.10) and I believe the underlying issue is the same as in this linked question -- the default compiler flags will raise a security error.

Passing the -Wno-error=format-security compiler flag when installing the gem ignores the security error and allows you to install the gem.

这篇关于红宝石音频1.6.1安装错误(与安装Libsndfile 1.0.25)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆