Feb 21, 2009

Compile do_mysql on OS X(Mac)

I was trying to upgrade DM to the latest version the other day, but I failed miserable:
install do-mysql
Installing do_mysql-0.9.11
Building native extensions. This could take a while...
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb merb:gem:install
checking for mysql.h... no
checking for main() in -lmysqlclient... no
checking for mysql_query()... no
checking for mysql_ssl_set()... no
creating Makefile
make
gcc -I. -I. -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin9.0 -I. -I/usr/include -fno-omit-frame-pointer -pipe -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DIGNORE_SIGHUP_SIGQUIT -fno-common -arch i386 -Os -pipe -fno-common -Wall -c do_mysql_ext.c
do_mysql_ext.c:6:23: error: my_global.h: No such file or directory
do_mysql_ext.c:7:19: error: mysql.h: No such file or directory
do_mysql_ext.c:8:20: error: errmsg.h: No such file or directory
do_mysql_ext.c:9:26: error: mysqld_error.h: No such file or directory
do_mysql_ext.c:76: error: syntax error before '*' token
do_mysql_ext.c: In function 'infer_rub