Malfeasance in 64-bit PowerPC MySQL Gem Compilation

Posted on May 12, 2008

For the three people in the world building the Rails mysql gem on a PowerPC G5-based OS X Server with the 64-bit MySQL installed getting this crazy error:

lazy symbol binding failed: Symbol not found: _mysql_init

The magic ninja gem install command that will cure all your ills goes a little something like this:

sudo env ARCHFLAGS="-arch ppc64" gem install -V mysql -- --with-mysql-include=/usr/local/mysql/include/ --with-mysql-lib=/usr/local/mysql/lib --with-mysql-config=/usr/local/mysql/bin/mysql_config --with-mysql-dir=/usr/local/mysql

Pretty obvious when you think about it. Not sure why it took me a little over an hour to discover the crucial lynchpin for correcting this system-wide thought-tastrophy.

Trackbacks

Use this link to trackback from your own site.

Comments

Leave a response

  1. Liquid Mon, 20 Oct 2008 19:11:23 UTC

    This one worked to me using the 64bit version:

    sudo env ARCHFLAGS=”-arch x86_64″ gem install -V mysql — –with-mysql-include=/usr/local/mysql/include/ –with-mysql-lib=/usr/local/mysql/lib –with-mysql-config=/usr/local/mysql/bin/mysql_config –with-mysql-dir=/usr/local/mysql

  2. Administrator Mon, 20 Oct 2008 19:32:33 UTC

    That works for 64-bit x86, but not PowerPC.

Comments