From: Mike Spears Date: 2006-07-25T23:13:47+09:00 Subject: Re: problem building ruby-audio-0.1.1 on OSX 10.4.7 > > Odd. As I'm running tiger (10.4.7) as well and it works fine, I think > perhaps you haven't fixed your ruby to compile C extensions yet. I get a > different compilation command than you do. Google for "ruby fix osx" or > just do "gem install fixrbconfig" > > Interesting - what does your compilation command look like? I think I have tried the 'fixrbconfig' trick in the past in order to install Rails, but I tried it again anyway and it didn't help. So instead, I tried clearing out the OSX install of Ruby and installing 1.8.4 from ruby-lang.org (and then reinstalling narray in the new location). I can get the extension to compile now, but when I try to use it, I get the following error: ~/Desktop/toscan/ruby-audio-0.1.1>irb irb(main):001:0> require 'sndfile' dyld: NSLinkModule() error dyld: Symbol not found: _cNArray Referenced from: /usr/local/lib/ruby/site_ruby/1.8/powerpc-darwin8.7.0/sndfile.bundle Expected in: flat namespace Trace/BPT trap Here is the rake output: ~/Desktop/toscan/ruby-audio-0.1.1>rake (in /Users/samesimilar/Desktop/toscan/ruby-audio-0.1.1) ruby setup.rb config ---> lib ---> lib/audio <--- lib/audio <--- lib ---> ext ---> ext/sndfile /usr/local/bin/ruby /Users/samesimilar/Desktop/toscan/ruby-audio-0.1.1/ext/sndfile/extconf.rb /usr/include/sndfile.h:278: Warning(451): Setting const char * member may leak memory. /usr/include/sndfile.h:279: Warning(451): Setting const char * member may leak memory. /usr/include/sndfile.h:300: Warning(451): Setting const char * member may leak memory. checking for sf_open() in -lsndfile... yes checking for narray.h... yes creating Makefile <--- ext/sndfile <--- ext ruby setup.rb setup ---> lib ---> lib/audio <--- lib/audio <--- lib ---> ext ---> ext/sndfile make gcc -fno-common -g -O2 -pipe -fno-common -I. -I/usr/local/lib/ruby/1.8/powerpc-darwin8.7.0 -I/usr/local/lib/ruby/1.8/powerpc-darwin8.7.0 -I/Users/samesimilar/Desktop/toscan/ruby-audio-0.1.1/ext/sndfile -DHAVE_NARRAY_H -I/usr/local/lib/ruby/site_ruby/1.8/powerpc-darwin8.7.0 -c sndfile_wrap.c cc -dynamic -bundle -undefined suppress -flat_namespace -L"/usr/local/lib/ruby/site_ruby/1.8/powerpc-darwin8.7.0" -L"/usr/local/lib" -o sndfile.bundle sndfile_wrap.o -lsndfile -ldl -lobjc <--- ext/sndfile <--- ext Loaded suite /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake/rake_test_loader Started ..E....... Finished in 0.117749 seconds. 1) Error: test_enums(SndfileTest): NameError: uninitialized constant SndfileTest::SF_FORMAT_FLAC ./test/test_sndfile.rb:41:in `test_enums' 10 tests, 102 assertions, 0 failures, 1 errors rake aborted! Command failed with status (1): [/usr/local/bin/ruby -Ilib:ext/sndfile "/us...]