Skip to content

Loading…

dlopen error on Mac OSX #82

Open
shockie opened this Issue · 1 comment

2 participants

@shockie

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

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
Something went wrong with that request. Please try again.