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

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

问题描述

请帮我安装红宝石音频1.6.1

红宝石1.9.3p194(2012-04-20改版35410)的i686-linux的]

Libsndfile 1.0.25已安装。

下面是日志:

创业板安装红宝石音频1.6.1.gem
构建本机扩展。这可能需要一段时间...
错误:错误安装Ruby-AUDIO-1.6.1.gem:
    错误:未能建立宝石原生扩展

  /usr/bin/ruby1.9.1 extconf.rb
对于sndfile.h检查在/ opt /本地/包括在/ usr /本地/包括C:/ Program Files文件(86)/兆书呆子/ libsndfile /包括C:/ Program Files文件/兆书呆子/ libsndfile /包括......是的
检查sf_open()在-lsndfile-1 ...没有
检查中-lsndfile sf_open()......是的
在sndfile.h检查SF_FORMAT_OGG ...是的
创建的Makefile使
编译ra_buffer.c
ra_buffer.c:在函数'ra_buffer_index_get:
ra_buffer.c:277:1:警告:控制​​到达非void函数[-Wreturn型]结束
ra_buffer.c:在函数'ra_buffer_type:
ra_buffer.c:214:1:警告:控制​​到达非void函数[-Wreturn型]结束
编译ra_soundinfo.c
编译rubyaudio_ext.c
编译ra_sound.c
ra_sound.c:在函数'ra_sound_init:
ra_sound.c:155:5:错误:格式不是字符串文字,没有格式参数[-Werror =格式安全]
ra_sound.c:在函数'ra_sound_read_short:
ra_sound.c:258:1:警告:未使用的变量频道[-Wunused变量]
ra_sound.c:在函数'ra_sound_read_int:
ra_sound.c:259:1:警告:未使用的变量频道[-Wunused变量]
ra_sound.c:在函数'ra_sound_read_float:
ra_sound.c:260:1:警告:未使用的变量频道[-Wunused变量]
ra_sound.c:在函数'ra_sound_read_double:
ra_sound.c:261:1:警告:未使用的变量频道[-Wunused变量]
6:在文件从ra_sound.h包含0,
                 从ra_sound.c:1:
ra_sound.c:在顶层:
ra_soundinfo.h:10:14:警告:​​ra_soundinfo_allocate声明静态,但从来没有定义[-Wunused功能]
ra_soundinfo.h:11:14:警告:​​ra_soundinfo_free声明静态,但从来没有定义[-Wunused功能]
ra_soundinfo.h:14:14:警告:​​ra_soundinfo_valid声明静态,但从来没有定义[-Wunused功能]
ra_soundinfo.h:15:14:警告:​​ra_soundinfo_frames声明静态,但从来没有定义[-Wunused功能]
ra_soundinfo.h:16:14:警告:​​ra_soundinfo_samplerate声明静态,但从来没有定义[-Wunused功能]
ra_soundinfo.h:17:14:警告:​​ra_soundinfo_samplerate_set声明静态,但从来没有定义[-Wunused功能]
ra_soundinfo.h:18:14:警告:​​ra_soundinfo_channels声明静态,但从来没有定义[-Wunused功能]
ra_soundinfo.h:19:14:警告:​​ra_soundinfo_channels_set声明静态,但从来没有定义[-Wunused功能]
ra_soundinfo.h:20:14:警告:​​ra_soundinfo_format声明静态,但从来没有定义[-Wunused功能]
ra_soundinfo.h:21:14:警告:​​ra_soundinfo_format_set声明静态,但从来没有定义[-Wunused功能]
ra_soundinfo.h:22:14:警告:​​ra_soundinfo_sections声明静态,但从来没有定义[-Wunused功能]
ra_soundinfo.h:23:14:警告:​​ra_soundinfo_seekable声明静态,但从来没有定义[-Wunused功能]
7:在文件从ra_sound.h包含0,
                 从ra_sound.c:1:
ra_buffer.h:24:14:警告:​​ra_buffer_allocate声明静态,但从来没有定义[-Wunused功能]
ra_buffer.h:25:14:警告:​​ra_buffer_free声明静态,但从来没有定义[-Wunused功能]
ra_buffer.h:28:14:警告:​​ra_buffer_init声明静态,但从来没有定义[-Wunused功能]
ra_buffer.h:29:14:警告:​​ra_buffer_init_copy声明静态,但从来没有定义[-Wunused功能]
ra_buffer.h:30:14:警告:​​ra_buffer_channels声明静态,但从来没有定义[-Wunused功能]
ra_buffer.h:31:14:警告:​​ra_buffer_size声明静态,但从来没有定义[-Wunused功能]
ra_buffer.h:32:14:警告:​​ra_buffer_real_size声明静态,但从来没有定义[-Wunused功能]
ra_buffer.h:33:14:警告:​​ra_buffer_real_size_set声明静态,但从来没有定义[-Wunused功能]
ra_buffer.h:34:14:警告:​​ra_buffer_type声明静态,但从来没有定义[-Wunused功能]
ra_buffer.h:35:14:警告:​​ra_buffer_each声明静态,但从来没有定义[-Wunused功能]
ra_buffer.h:36:14:警告:​​ra_buffer_aref声明静态,但从来没有定义[-Wunused功能]
ra_buffer.h:37:14:警告:​​ra_buffer_index_get声明静态,但从来没有定义[-Wunused功能]
ra_buffer.h:38:14:警告:​​ra_buffer_aset声明静态,但从来没有定义[-Wunused功能]
ra_buffer.h:39:13:警告:ra_buffer_index_set声明静态,但从来没有定义[-Wunused功能]
CC1:一些警告被视为错误
使:*** [ra_sound.o]错误1
宝石文件仍将安装在/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错误=格式安全标志安装:

 创业板安装Ruby的音频 -  --with-CFLAGS = -Wno错误=格式的安全性

我遇到了这个问题,以及(在Ubuntu 13.10),我相信根本的问题是一样的<一个href=\"http://stackoverflow.com/questions/17260409/fprintf-error-format-not-a-string-literal-and-no-format-arguments-werror-for\">this链接的问题 - 默认的编译器标志将引发安全错误

薪火 -Wno错误=当安装宝石忽略的安全性错误,并允许您安装宝石格式安全编译器标志。

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天全站免登陆