Dick Davies wrote:
> On Sun, Jul 13, 2008 at 12:20 AM, miles.sterrett / gmail.com
> <miles.sterrett / gmail.com> wrote:
> 
>> As a note, for those that may come across this thread in the future...
>>
>> 'sudo apt-get install build-essential'
> 
> 
> Bit odd that it's not a dependency of the ruby dev package, isn't it ?

Hey guys.  I'm not sorted after all, argh.  Humbly asking for more 
help...

My problem is with trying to install the mysql gem.
I did the build-essential install above, that worked fine, but i get ths 
when i try to install the mysql gem:

>max@max-laptop:~$ sudo  gem install mysql
>Need to update 1 gems from http://gems.rubyforge.org
>.
>complete
>Select which gem to install for your platform (i486-linux)
> 1. mysql 2.7.3 (mswin32)
> 2. mysql 2.7.1 (mswin32)
> 3. mysql 2.7 (ruby)
> 4. mysql 2.6 (ruby)
> 5. Skip this gem
> 6. Cancel installation
>> 3
>Building native extensions.  This could take a while...
>ERROR:  While executing gem ... (Gem::Installer::ExtensionBuildError)
>    ERROR: Failed to build gem native extension.
>
>ruby extconf.rb install mysql
>checking for mysql_query() in -lmysqlclient... no
>checking for main() in -lm... yes
>checking for mysql_query() in -lmysqlclient... no
>checking for main() in -lz... no
>checking for mysql_query() in -lmysqlclient... no
>checking for main() in -lsocket... no
>checking for mysql_query() in -lmysqlclient... no
>checking for main() in -lnsl... yes
>checking for mysql_query() in -lmysqlclient... 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.

I looked in the relevant mkmf.log file and found a load of stuff that's 
way over my head.  There's loads of errors in it, i'll just post the 
first up:

>find_library: checking for mysql_query() in -lmysqlclient... >-------------------- no
>
>"cc -o conftest -I. -I/usr/lib/ruby/1.8/i486-linux -I. -I/usr/local/include  -fno-strict-aliasing -g -g -O2  -fPIC conftest.c  -L"." -L"/us$
>conftest.c: In function t:
>conftest.c:3: error: mysql_query undeclared (first use in this function)
>conftest.c:3: error: (Each undeclared identifier is reported only once
>conftest.c:3: error: for each function it appears in.)
>checked program was:
>/* begin */
>1: /*top*/
>2: int main() { return 0; }
>3: int t() { void ((*volatile p)()); p = (void ((*)()))mysql_query; return 0; }
>/* end */

-- 
Posted via http://www.ruby-forum.com/.