MySQL Forums
Forum List  »  Ruby

mysql gem install error on Mac OS X - 'ulong' undeclared error
Posted by: Greg Hauptmann
Date: April 11, 2008 04:53PM


I can't seem to install the mysql gem for Ruby (see errors below). I get an 'ulong' undeclared error. Can anyone assist?

Macintosh:mysql-2.7 greg$ sudo gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
Building native extensions. This could take a while...
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.

/opt/local/bin/ruby extconf.rb install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
checking for mysql_ssl_set()... yes
checking for mysql.h... yes
creating Makefile

gcc -I. -I. -I/opt/local/lib/ruby/1.8/i686-darwin8.10.1 -I. -DHAVE_MYSQL_SSL_SET -DHAVE_MYSQL_H -I/opt/local/include -I/usr/local/mysql/include -Os -arch i386 -fno-common -fno-common -O2 -fno-common -pipe -fno-common -c mysql.c
mysql.c: In function 'Init_mysql':
mysql.c:2015: error: 'ulong' undeclared (first use in this function)
mysql.c:2015: error: (Each undeclared identifier is reported only once
mysql.c:2015: error: for each function it appears in.)
mysql.c:2015: error: syntax error before numeric constant
mysql.c:2018: error: syntax error before numeric constant
make: *** [mysql.o] Error 1

Gem files will remain installed in /opt/local/lib/ruby/gems/1.8/gems/mysql-2.7 for inspection.
Results logged to /opt/local/lib/ruby/gems/1.8/gems/mysql-2.7/gem_make.out

===========VERSION INFO==========================
Macintosh:mysql-2.7 greg$ ruby --version
ruby 1.8.6 (2007-03-13 patchlevel 0) [i686-darwin8.10.1]
Macintosh:mysql-2.7 greg$ rails --version
Rails 2.0.2
Macintosh:mysql-2.7 greg$ gem --version

=========MacBook Details============================
Model Name: MacBook
Model Identifier: MacBook2,1
Processor Name: Intel Core 2 Duo
Processor Speed: 2 GHz

System Version: Mac OS X 10.5.2 (9C7010)
Kernel Version: Darwin 9.2.2


Options: ReplyQuote

Written By
mysql gem install error on Mac OS X - 'ulong' undeclared error
April 11, 2008 04:53PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.