[csw-users] Ruby 'gem install mysql' problems
Ben Walton
bwalton at opencsw.org
Fri May 8 15:23:25 CEST 2009
Excerpts from Chris May's message of Thu May 07 18:05:56 -0400 2009:
> Not sure if this is an issue with rubygems, rubydev, or just something wierd
> with my setup:
>
> ruby 1.8.7,REV=2009.04.06_p72
> rubydev 1.8.7,REV=2009.04.06_p72
> rubygems 1.3.1,REV=2009.02.16
> mysql5 5.0.51,REV=2008.01.20
> mysql5client 5.0.51,REV=2007.12.19
> mysql5devel 5.0.51,REV=2008.01.20
> mysql5rt 5.0.51,REV=2008.01.20
>
> Now, I want to do 'gem install mysql'.
>
> Running that command by itself fails to find the mysql libaries. Even though
> mysql_config is on my $PATH, I have to specify it explicitly.
Looking at the extconf.rb shipped with the mysql gem, it only attempts
to use mysql_config if you pass it as you do below. If you don't pass
that option, it falls back to using directories in /usr/local. This
is a shortcoming of the mysql gem.
> On inspection, there are 3 problems with the generated Makefile: it
> specifies a -mt parameter which gcc claims not to understand, it
> specifies -xtarget=386, which again isnt' understood, and it doesn't
> specify -R/opt/csw/mysql5/lib/mysql, so libmysqlclient.so can't be
> found at runtime. If I remove the two bogus parameters and add the
> -R one, then I can successfully make and install the gem.
This is to do with ruby being built with gcc and mysql being built
with the sun compiler.
> Is this something that I should file as a bug with the Ruby/Mysql project, or
> should it go in the OpenCSW bug tracker, or is it not a bug at all?
I'm not sure, really. The logic in the extconf.rb Make maker could be
improved...in fact, it ignores the fully qualified path provided to
mysql_config, and relies on the shell and $PATH to find it when it's
called. Really, though, most of the issue is the assumption that only
a single compiler would be used to build all of the packages. This is
likely a product of the primary development platform.
I've used this same method to build the gem locally, although you
could play PATH games to provide your own version of mysql_config.
That's a little heavy weight for this type of thing though, I think.
HTH.
-Ben
--
Ben Walton
Systems Programmer - CHASS
University of Toronto
C:416.407.5610 | W:416.978.4302
GPG Key Id: 8E89F6D2; Key Server: pgp.mit.edu
Contact me to arrange for a CAcert assurance meeting.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.opencsw.org/pipermail/users/attachments/20090508/e20b80ec/attachment-0002.asc>
More information about the users
mailing list