Open lexogram opened 11 years ago
Don't know if this problem is special only to Darwin but I suspect that the include path that is expanded on row 15 in binding.gyp results in string with "-I" at the beginning although the gyp expects the just path.
If I try on commad line
mysql_config --include
I got
-I/usr/local/mysql/include
Anyway, after replacing the contents of the single quotes on that row with just the path to the mysql includes, I was successful to build the db-mysql on OS X 10.6.8. I was also able to successfully build it when I replaced mysql_config --include in the binding.gyp with:
mysql_config --variable=pkgincludedir
-- EDITED TERMINAL SESSION --
$ export MYSQL_CONFIG=/Applications/MAMP/Library/bin/mysql_config $ echo $MYSQL_CONFIG /Applications/MAMP/Library/bin/mysql_config
$ cd /usr/local/lib/node
su root...
sh-3.2# npm install db-mysql npm http GET https://registry.npmjs.org/db-mysql npm http 200 https://registry.npmjs.org/db-mysql npm http GET https://registry.npmjs.org/db-mysql/-/db-mysql-0.7.6.tgz npm http 200 https://registry.npmjs.org/db-mysql/-/db-mysql-0.7.6.tgz
Checking for program g++ or c++ : /usr/bin/g++ Checking for program cpp : /usr/bin/cpp Checking for program ar : /usr/bin/ar Checking for program ranlib : /usr/bin/ranlib Checking for g++ : ok
Checking for node path : not found Checking for node prefix : ok /usr/local Checking for program mysql_config : /Applications/MAMP/Library/bin/mysql_config Checking for library mysqlclient_r : Missing libmysqlclient_r 'configure' finished successfully (0.552s) Waf: Entering directory `/usr/local/lib/node_modules/db-mysql/build' [ 1/12] cxx: lib/node-db/binding.cc -> build/Release/lib/node-db/binding_1.o [ 2/12] cxx: lib/node-db/connection.cc -> build/Release/lib/node-db/connection_1.o [ 3/12] cxx: lib/node-db/events.cc -> build/Release/lib/node-db/events_1.o [ 4/12] cxx: lib/node-db/exception.cc -> build/Release/lib/node-db/exception_1.o [ 5/12] cxx: lib/node-db/query.cc -> build/Release/lib/node-db/query_1.o [ 6/12] cxx: lib/node-db/result.cc -> build/Release/lib/node-db/result_1.o [ 7/12] cxx: src/connection.cc -> build/Release/src/connection_1.o In file included from ../src/connection.cc:2: ../src/./connection.h:5:19: error: mysql.h: No such file or directory In file included from ../src/./connection.h:8, from ../src/connection.cc:2: ../src/././result.h:16: error: expected ‘,’ or ‘...’ before ‘&’ token