[Rbrainz-users] Fwd: mb-discid issue with OS X
nigel at maven-group.org
Sun Apr 4 14:06:37 EDT 2010
I looked some more into the issue and I think I have an explanation.
The problem seems to be that libdiscid isn't compiled as a universal binary and ruby expects it to be.
You can verify that this is the problem by doing:
And the reported architecture should either be i386 or x86_64
So you need to either get libdiscid built as both i386 and x86_64 which you have to do by hand (or with some scripts that I can help you with) or you need to get ruby to compile the extension with only one architecture. If you only need the gem for local development and aren't gonna distribute binaries getting ruby to change how it compiles is far easier.
Simply do the following command if you are on a 64 bit machine:
sudo env ARCHFLAGS="-arch x86_64" gem install mb-discid -- --with-opt-dir=/usr/local
Or change the x86_64 to i386 on a 32 bit machine.
On 01/04/2010, at 02.48, Derek Reeve wrote:
> I was the original person who asked the question; I didn't want to
> spam the mailing list if I was doing something silly. Unfortunately,
> after spending a few hours trying different things, I'm not having
> much luck.
>> The short answer that worked on my Snow Leopard: sudo gem install mb-discid -- --with-opt-dir=/usr/local
>> You could argue that there should be a dir_config('discid') line in extconf.rb but since mb-discid only requires one external lib the opt option works just as well. If the dir_config option is
>> added the following will also work: sudo gem install mb-discid -- --with-discid-dir=/usr/local
> I tried the --with-opt-dir switch and I tried adding dir_config to
> extconf.rb and installing the gem with --with-discid-dir, all with the
> same results.
> I apologize for my lack of knowledge, but is it possible OS X (I'm on
> Snow Leopard too) can't find libdiscid, even though it's in
> /usr/local/lib is definitely where the libraries are installed, but I
> can't seem to get gem install to find libdiscid in this case.
> I also tried updating extconf.rb with find_library('disc_id',
> 'discid_new', '/usr/local/lib') and ran extconf.rb. I got the same
> error; I just thought I'd give it a shot.
> Thanks for your continued help,
> Rbrainz-users mailing list
> Rbrainz-users at rubyforge.org
More information about the Rbrainz-users