Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dlopen error on Mac OSX #82

Open
shockie opened this issue Aug 10, 2012 · 1 comment
Open

dlopen error on Mac OSX #82

shockie opened this issue Aug 10, 2012 · 1 comment

Comments

@shockie
Copy link

shockie commented Aug 10, 2012

I have a problem using the node-db-mysql module on mac os x. On a Mountain Lion clean install everything works but on a upgraded lion -> mountain lion and a snow leopard mac, I get errors from node-waf.

Node-waf is complaining about the libmysqlclient_r.dylib:

cxx_link: build/Release/lib/node-db/binding_1.o build/Release/lib/node-db/connection_1.o build/Release/lib/node-db/events_1.o build/Release/lib/node-db/exception_1.o build/Release/lib/node-db/query_1.o build/Release/lib/node-db/result_1.o build/Release/src/connection_1.o build/Release/src/mysql_1.o build/Release/src/query_1.o build/Release/src/result_1.o build/Release/src/mysql_bindings_1.o -> build/Release/mysql_bindings.node
ld: warning: ignoring file /usr/local/mysql/lib/libmysqlclient_r.dylib, file was built for unsupported file format which is not the architecture being linked (i386)

As it says, it tries to install it as a 32 bit architecture but the libraries are build on 64 bit architectures. Question where does node-waf defines for what architecture it should build?

If I ignore this issue and include it through a require, I receive the following error message:

dlopen(node_modules/db-mysql/build/Release/mysql_bindings.node, 1): no suitable image found.  Did find: node_modules/db-mysql/build/Release/mysql_bindings.node: mach-o, but wrong architecture
@qraynaud
Copy link

I believe node-waf use the architecture nodejs was built on. Install a 64bits version of nodejs instead of a 32bits version and you should be fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants