|
I just can’t seem to get the mysql gem installed on my Mac OSX Leopard. (Disclaimer: I had this problem from the original Ruby-version in Leopard). I downloaded the 1.9.1 and installed on Mac OSX as mentioned by Dan Benjamin in http://hivelogic.com. I installed Mysql version from source/package etc., But no luck in getting the mysql gem installed. Here is the error I get:
a-mac:$ sudo gem install mysql — —with-mysql-dir=/usr/local/mysql
Building native extensions. This could take a while…
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.
/usr/local/bin/ruby extconf.rb install mysql — —with-mysql-dir=/usr/local/mysql
checking for mysql_query() in -lmysqlclient… yes
checking for mysql_ssl_set()… yes
checking for mysql.h… no
checking for mysql/mysql.h… yes
creating Makefile
make
gcc -I. -I/usr/local/include/ruby-1.9.1/i386-darwin9.6.0 -I/usr/local/include/ruby-1.9.1/ruby/backward -I/usr/local/include/ruby-1.9.1 -I. -DHAVE_MYSQL_SSL_SET -DHAVE_MYSQL_MYSQL_H -I/usr/local/mysql/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -D_XOPEN_SOURCE=1 -O2 -g -Wall -Wno-parentheses -fno-common -pipe -fno-common -o mysql.o -c mysql.c
mysql.c:6:21: error: version.h: No such file or directory
mysql.c: In function ‘make_field_obj’:
mysql.c:185: warning: unused variable ‘hash’
mysql.c: In function ‘escape_string’:
mysql.c:267: error: ‘struct RString’ has no member named ‘len’
mysql.c:268: error: ‘struct RString’ has no member named ‘len’
mysql.c:268: error: ‘struct RString’ has no member named ‘ptr’
mysql.c:268: error: ‘struct RString’ has no member named ‘ptr’
mysql.c:268: error: ‘struct RString’ has no member named ‘len’
mysql.c: In function ‘real_escape_string’:
mysql.c:401: error: ‘struct RString’ has no member named ‘len’
mysql.c:402: error: ‘struct RString’ has no member named ‘len’
mysql.c:402: error: ‘struct RString’ has no member named ‘ptr’
mysql.c:402: error: ‘struct RString’ has no member named ‘ptr’
mysql.c:402: error: ‘struct RString’ has no member named ‘len’
mysql.c: In function ‘query’:
mysql.c:710: error: ‘struct RString’ has no member named ‘ptr’
mysql.c:710: error: ‘struct RString’ has no member named ‘len’
mysql.c:729: error: ‘struct RString’ has no member named ‘ptr’
mysql.c:729: error: ‘struct RString’ has no member named ‘len’
mysql.c: In function ‘query_with_result_set’:
mysql.c:882: warning: implicit declaration of function ‘TypeError’
mysql.c: In function ‘fetch_field_direct’:
mysql.c:960: warning: implicit declaration of function ‘Raise’
mysql.c: In function ‘fetch_hash2’:
mysql.c:1032: error: ‘struct RString’ has no member named ‘ptr’
mysql.c:1033: error: ‘struct RString’ has no member named ‘ptr’
mysql.c: In function ‘field_inspect’:
mysql.c:1157: error: ‘struct RString’ has no member named ‘len’
mysql.c:1158: error: ‘struct RString’ has no member named ‘ptr’
gcc -I. -I/usr/local/include/ruby-1.9.1/i386-darwin9.6.0 -I/usr/local/include/ruby-1.9.1/ruby/backward -I/usr/local/include/ruby-1.9.1 -I. -DHAVE_MYSQL_SSL_SET -DHAVE_MYSQL_MYSQL_H -I/usr/local/mysql/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -D_XOPEN_SOURCE=1 -O2 -g -Wall -Wno-parentheses -fno-common -pipe -fno-common -o mysql.o -c mysql.c
mysql.c:6:21: error: version.h: No such file or directory
mysql.c: In function ‘make_field_obj’:
mysql.c:185: warning: unused variable ‘hash’
mysql.c: In function ‘escape_string’:
mysql.c:267: error: ‘struct RString’ has no member named ‘len’
mysql.c:268: error: ‘struct RString’ has no member named ‘len’
mysql.c:268: error: ‘struct RString’ has no member named ‘ptr’
mysql.c:268: error: ‘struct RString’ has no member named ‘ptr’
mysql.c:268: error: ‘struct RString’ has no member named ‘len’
mysql.c: In function ‘real_escape_string’:
mysql.c:401: error: ‘struct RString’ has no member named ‘len’
mysql.c:402: error: ‘struct RString’ has no member named ‘len’
mysql.c:402: error: ‘struct RString’ has no member named ‘ptr’
mysql.c:402: error: ‘struct RString’ has no member named ‘ptr’
mysql.c:402: error: ‘struct RString’ has no member named ‘len’
mysql.c: In function ‘query’:
mysql.c:710: error: ‘struct RString’ has no member named ‘ptr’
mysql.c:710: error: ‘struct RString’ has no member named ‘len’
mysql.c:729: error: ‘struct RString’ has no member named ‘ptr’
mysql.c:729: error: ‘struct RString’ has no member named ‘len’
mysql.c: In function ‘query_with_result_set’:
mysql.c:882: warning: implicit declaration of function ‘TypeError’
mysql.c: In function ‘fetch_field_direct’:
make: * [mysql.o] Error 1
Gem files will remain installed in /usr/local/lib/ruby/gems/1.9.1/gems/mysql-2.7 for inspection.
Results logged to /usr/local/lib/ruby/gems/1.9.1/gems/mysql-2.7/gem_make.out
|