Я пытаюсь установить гем ruby-audio из warhammerkid на Windows 7x64 с Ruby 1.9.1 (установлен DevKit).При установке libsndfile x64 поместите файлы в C:\Program Files\Mega-Nerd\libsndfile
(libsndfile-1.dll
находится в этом каталоге).
Когда я пытаюсь установить гем, я получаю следующее (подробности ниже):1009 *
C:/Ruby/bin/ruby.exe extconf.rb
checking for sf_open() in -lsndfile... no
....
extconf.rb:8:in `<main>': You need to install libsndfile
(http://www.mega-nerd.com/libsndfile/) (RuntimeError)
Вы можете увидеть (краткое) содержимое extconf.rb
в репозитории GitHub .Неисправная строка:
unless find_library 'sndfile', 'sf_open'
Как настроить гем или установить libsndfile, чтобы гем мог его найти?Я попытался поместить 'C:/Program Files/Mega-Nerd/libsndfile
в пути, переданные в find_library
, безрезультатно.
Вот полный вывод установки подробного гема:
C:\>gem install ruby-audio --verbose
GET http://rubygems.org/latest_specs.4.8.gz
302 Found
GET http://production.s3.rubygems.org/latest_specs.4.8.gz
200 OK
Installing gem ruby-audio-1.3.0
Downloading gem ruby-audio-1.3.0.gem
GET http://rubygems.org/gems/ruby-audio-1.3.0.gem
connection reset after 2 requests, retrying
GET http://rubygems.org/gems/ruby-audio-1.3.0.gem
302 Found
GET http://production.cf.rubygems.org/gems/ruby-audio-1.3.0.gem
200 OK
C:/Ruby/lib/ruby/gems/1.9.1/gems/ruby-audio-1.3.0/README.rdoc
C:/Ruby/lib/ruby/gems/1.9.1/gems/ruby-audio-1.3.0/Rakefile
C:/Ruby/lib/ruby/gems/1.9.1/gems/ruby-audio-1.3.0/LICENSE
C:/Ruby/lib/ruby/gems/1.9.1/gems/ruby-audio-1.3.0/lib/ruby-audio/buffer.rb
C:/Ruby/lib/ruby/gems/1.9.1/gems/ruby-audio-1.3.0/lib/ruby-audio/sound.rb
C:/Ruby/lib/ruby/gems/1.9.1/gems/ruby-audio-1.3.0/lib/ruby-audio/sound_info.rb
C:/Ruby/lib/ruby/gems/1.9.1/gems/ruby-audio-1.3.0/lib/ruby-audio.rb
C:/Ruby/lib/ruby/gems/1.9.1/gems/ruby-audio-1.3.0/spec/buffer_spec.rb
C:/Ruby/lib/ruby/gems/1.9.1/gems/ruby-audio-1.3.0/spec/sound_info_spec.rb
C:/Ruby/lib/ruby/gems/1.9.1/gems/ruby-audio-1.3.0/spec/sound_spec.rb
C:/Ruby/lib/ruby/gems/1.9.1/gems/ruby-audio-1.3.0/spec/spec_helper.rb
C:/Ruby/lib/ruby/gems/1.9.1/gems/ruby-audio-1.3.0/spec/spec.opts
C:/Ruby/lib/ruby/gems/1.9.1/gems/ruby-audio-1.3.0/spec/data/what.wav
C:/Ruby/lib/ruby/gems/1.9.1/gems/ruby-audio-1.3.0/spec/data/what2.wav
C:/Ruby/lib/ruby/gems/1.9.1/gems/ruby-audio-1.3.0/spec/data/what.mp3
C:/Ruby/lib/ruby/gems/1.9.1/gems/ruby-audio-1.3.0/ext/extconf.rb
C:/Ruby/lib/ruby/gems/1.9.1/gems/ruby-audio-1.3.0/ext/ra_buffer.c
C:/Ruby/lib/ruby/gems/1.9.1/gems/ruby-audio-1.3.0/ext/ra_sound.c
C:/Ruby/lib/ruby/gems/1.9.1/gems/ruby-audio-1.3.0/ext/ra_soundinfo.c
C:/Ruby/lib/ruby/gems/1.9.1/gems/ruby-audio-1.3.0/ext/rubyaudio_ext.c
C:/Ruby/lib/ruby/gems/1.9.1/gems/ruby-audio-1.3.0/ext/ra_buffer.h
C:/Ruby/lib/ruby/gems/1.9.1/gems/ruby-audio-1.3.0/ext/ra_sound.h
C:/Ruby/lib/ruby/gems/1.9.1/gems/ruby-audio-1.3.0/ext/ra_soundinfo.h
Building native extensions. This could take a while...
ERROR: Error installing ruby-audio:
ERROR: Failed to build gem native extension.
C:/Ruby/bin/ruby.exe extconf.rb
checking for sf_open() in -lsndfile... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=C:/Ruby/bin/ruby
--with-sndfilelib
--without-sndfilelib
extconf.rb:8:in `<main>': You need to install libsndfile (http://www.mega-nerd.com/libsndfile/) (RuntimeError)
Gem files will remain installed in C:/Ruby/lib/ruby/gems/1.9.1/gems/ruby-audio-1.3.0 for inspection.
Results logged to C:/Ruby/lib/ruby/gems/1.9.1/gems/ruby-audio-1.3.0/ext/gem_make.out
Наконец, здесьэто вывод в mkmf.log
find_library: checking for sf_open() in -lsndfile... -------------------- no
"gcc -o conftest -IC:/Ruby/include/ruby-1.9.1/i386-mingw32 -IC:/Ruby/include/ruby-1.9.1/ruby/backward -IC:/Ruby/include/ruby-1.9.1 -I. -I/opt/local/include conftest.c -L. -LC:/Ruby/lib -L/opt/local/lib -L/usr/local/lib -lmsvcrt-ruby191-static -lshell32 -lws2_32 "
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <winsock2.h>
4: #include <windows.h>
5: int main() {return 0;}
/* end */
"gcc -o conftest -IC:/Ruby/include/ruby-1.9.1/i386-mingw32 -IC:/Ruby/include/ruby-1.9.1/ruby/backward -IC:/Ruby/include/ruby-1.9.1 -I. -I/opt/local/include conftest.c -L. -LC:/Ruby/lib -L/opt/local/lib -L/usr/local/lib -lmsvcrt-ruby191-static -lsndfile -lshell32 -lws2_32 "
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <winsock2.h>
4: #include <windows.h>
5:
6: /*top*/
7: int main() {return 0;}
8: int t() { void ((*volatile p)()); p = (void ((*)()))sf_open; return 0; }
/* end */
"gcc -o conftest -IC:/Ruby/include/ruby-1.9.1/i386-mingw32 -IC:/Ruby/include/ruby-1.9.1/ruby/backward -IC:/Ruby/include/ruby-1.9.1 -I. -I/opt/local/include conftest.c -L. -LC:/Ruby/lib -L/opt/local/lib -L/usr/local/lib -lmsvcrt-ruby191-static -lsndfile -lshell32 -lws2_32 "
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <winsock2.h>
4: #include <windows.h>
5:
6: /*top*/
7: int main() {return 0;}
8: int t() { sf_open(); return 0; }
/* end */
--------------------