Problems installing mysql-gem

Emil Kampp
2007-04-30T06:51:57Z

Hi.

I have been trying to install the mysql-gem with the inatllation
instructions from hivelogic. After running the

sudo gem install mysql -- --with-mysql-dir=/usr/local/mysql

I get the following error:

**********************************************************************
jekyll:/usr/local/src emil$ sudo gem install mysql --
--with-mysql-dir=/usr/local/mysql
Password:
Select which gem to install for your platform (i686-darwin8.9.1)
 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 -- --with-mysql-dir=/usr/local/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... yes
checking for mysql_query() in -lmysqlclient... yes
checking for mysql_ssl_set()... yes
checking for mysql.h... yes
creating Makefile

make
gcc -I. -I. -I/usr/local/lib/ruby/1.8/i686-darwin8.9.1 -I.
-DHAVE_MYSQL_SSL_SET -DHAVE_MYSQL_H -I/usr/local/mysql/include
-fno-common -g -O2 -pipe -fno-common  -c mysql.c
mysql.c: In function ''query'':
mysql.c:635: error: invalid storage class for function
''res_free''
mysql.c:637: error: ''res_free'' undeclared (first use in this
function)
mysql.c:637: error: (Each undeclared identifier is reported only once
mysql.c:637: error: for each function it appears in.)
mysql.c: In function ''Init_mysql'':
mysql.c:1299: error: ''ulong'' undeclared (first use in this
function)
mysql.c:1299: error: parse error before numeric constant
mysql.c:1302: error: parse error before numeric constant
make: *** [mysql.o] Error 1
**********************************************************************

I currently have mysql 5.x installed. Does anyone of you know this
error?

Thank you.
Emil

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