Hello,

I'm having difficulties trying to install mysql-ruby-2.5.1 on OS X and am
hoping someone can help me.

The problem occurs when running:
ruby extconf.rb (with seemingly any combination of options)

The details are below, thanks very much for any help!

Bests,
Matt



My setup is:

OS X 10.3.7 (Darwin 7.7.0)
mysql-standard-4.1.9-apple-darwin7.7.0-powerpc (the package installer)
Ruby 1.8.2 stable snapshot dmg

I've tried various combinations of the following extconf.rb arguments (which
match my mysql install layout)

--with-mysql-dir=/usr/local/mysql
--with-mysql-lib=/usr/local/mysql/lib
--with-mysql-include=/usr/local/mysql/include
--with-mysql-config=/usr/local/mysql/bin/mysql_config

I've also tried using the full directory name instead of the 'mysql'
symbolic link.


With the first three options I get the following:

checking for mysql_query() in -lmysqlclient... no
checking for main() in -lm... no
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... no
checking for mysql_query() in -lmysqlclient... No

But with the --with-mysql-config I get this:

checking for mysql_ssl_set()... no
checking for mysql.h... no
checking for mysql/mysql.h... No

And finally, the content of mkmf.log:

have_func: checking for mysql_ssl_set()... -------------------- no

"gcc -o conftest -I/Users/mattj/Desktop/mysql-ruby-2.5.1
-I/usr/local/lib/ruby/1.8/powerpc-darwin7.5.0
-I/usr/local/mysql-standard-4.1.9-apple-darwin7.7.0-powerpc/include
-fno-omit-frame-pointer -g -O2  -fno-common -pipe -fno-common conftest.c
-L"/usr/local/lib" 
-L/usr/local/mysql-standard-4.1.9-apple-darwin7.7.0-powerpc/lib
-lmysqlclient -lm  -lz  -lruby-static
-L/usr/local/mysql-standard-4.1.9-apple-darwin7.7.0-powerpc/lib
-lmysqlclient -lm  -lz  -ldl -lobjc  "
sh: line 1: gcc: command not found
checked program was:
/* begin */

/*top*/
int main() { return 0; }
int t() { mysql_ssl_set(); return 0; }
/* end */

"gcc -o conftest -I/Users/mattj/Desktop/mysql-ruby-2.5.1
-I/usr/local/lib/ruby/1.8/powerpc-darwin7.5.0
-I/usr/local/mysql-standard-4.1.9-apple-darwin7.7.0-powerpc/include
-fno-omit-frame-pointer -g -O2  -fno-common -pipe -fno-common conftest.c
-L"/usr/local/lib" 
-L/usr/local/mysql-standard-4.1.9-apple-darwin7.7.0-powerpc/lib
-lmysqlclient -lm  -lz  -lruby-static
-L/usr/local/mysql-standard-4.1.9-apple-darwin7.7.0-powerpc/lib
-lmysqlclient -lm  -lz  -ldl -lobjc  "
sh: line 1: gcc: command not found
checked program was:
/* begin */


/*top*/
int main() { return 0; }
int t() { void ((*volatile p)()); p = (void ((*)()))mysql_ssl_set; return 0;
}
/* end */

--------------------

have_header: checking for mysql.h... -------------------- no

"gcc -E -I/Users/mattj/Desktop/mysql-ruby-2.5.1
-I/usr/local/lib/ruby/1.8/powerpc-darwin7.5.0
-I/usr/local/mysql-standard-4.1.9-apple-darwin7.7.0-powerpc/include
-fno-omit-frame-pointer -g -O2  -fno-common -pipe -fno-common  conftest.c -o
conftest.i"
checked program was:
/* begin */
#include <mysql.h>
/* end */

--------------------

have_header: checking for mysql/mysql.h... -------------------- no

"gcc -E -I/Users/mattj/Desktop/mysql-ruby-2.5.1
-I/usr/local/lib/ruby/1.8/powerpc-darwin7.5.0
-I/usr/local/mysql-standard-4.1.9-apple-darwin7.7.0-powerpc/include
-fno-omit-frame-pointer -g -O2  -fno-common -pipe -fno-common  conftest.c -o
conftest.i"
checked program was:
/* begin */
#include <mysql/mysql.h>
/* end */

--------------------