npm package build failing, how best to debug?

I'm trying to install a mysql node package on Mac OS X. I'm trying to run a client project locally.

I have node and npm installed already and they work fine, other packages have installed fine. I've also compiled/installed the full LAMP stack.

When the build below fails, I'm not seeing any error messages that are helpful - just information about a library not being found. Without knowing what it can't find, I can't fix it.

Any advice? MySQL has been installed the standard way - downloaded packages, ./configure'd, make/install.

$ npm install mysql-libmysqlclient
npm http GET https://registry.npmjs.org/mysql-libmysqlclient
npm http 304 https://registry.npmjs.org/mysql-libmysqlclient

> mysql-libmysqlclient@1.3.3 install /Users/botskonet/node_modules/mysql-libmysqlclient
> node-gyp rebuild

info it worked if it ends with ok 
spawn python [ '/Users/botskonet/.node-gyp/0.6.12/tools/gyp_addon',
  'binding.gyp',
  '-I/Users/botskonet/node_modules/mysql-libmysqlclient/build/config.gypi',
  '-f',
  'make' ]
spawn make [ 'BUILDTYPE=Release', '-C', 'build' ]
  CXX(target) Release/obj.target/mysql_bindings/src/mysql_bindings.o
  CXX(target) Release/obj.target/mysql_bindings/src/mysql_bindings_connection.o
  CXX(target) Release/obj.target/mysql_bindings/src/mysql_bindings_result.o
  CXX(target) Release/obj.target/mysql_bindings/src/mysql_bindings_statement.o
  SOLINK_MODULE(target) Release/mysql_bindings.node
ld: library not found for -lmysqlclient_r
collect2: ld returned 1 exit status
make: *** [Release/mysql_bindings.node] Error 1
ERR! Error: `make` failed with exit code: 2
    at Array.0 (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:176:25)
    at EventEmitter._tickCallback (node.js:192:40)
ERR! not ok

npm ERR! mysql-libmysqlclient@1.3.3 install: `node-gyp rebuild`
npm ERR! `sh "-c" "node-gyp rebuild"` failed with 1
npm ERR! 
npm ERR! Failed at the mysql-libmysqlclient@1.3.3 install script.
npm ERR! This is most likely a problem with the mysql-libmysqlclient package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls mysql-libmysqlclient
npm ERR! There is likely additional logging output above.
npm ERR! 
npm ERR! System Darwin 11.3.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "mysql-libmysqlclient"
npm ERR! cwd /Users/botskonet/Sites/SportsBuddies
npm ERR! node -v v0.6.12
npm ERR! npm -v 1.1.15
npm ERR! code ELIFECYCLE
npm ERR! message mysql-libmysqlclient@1.3.3 install: `node-gyp rebuild`
npm ERR! message `sh "-c" "node-gyp rebuild"` failed with 1
npm ERR! errno {}
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/botskonet/Sites/SportsBuddies/npm-debug.log
npm not ok

Look at the dependencies section in README and issues #107. To build mysql-libmysqlclient you should install both libmysqlclient and development headers for it, add path to your MySQL bin dir to $PATH and path to your MySQL lib dir to $DYLD_LIBRARY_PATH.