bitfloor / trader.nodejs

bitfloor nodejs sample trader implementation
55 stars 15 forks source link

Error on dlopen - Incompatibility with binaries? #3

Closed jenrobinson closed 11 years ago

jenrobinson commented 11 years ago

Hi guys,

First off, thanks for the killer work on Bitfloor. It's by far the friendliest and most accessible way to buy Bitcoins that I've experienced. Absolutely delightful.

I'm having a little trouble with the API. I think there may be a compatibility issue with the module build and my hardware (OSX 10.7.4 Lion). I'm pasting the console log below, including diagnostic info at the end. It looks like you're using Waf in the build process, so it may be related to joyent/node#3633?

Let me know what you think. Many thanks.

Jen

jen:examples jenrobinson$ node market_data.js

module.js:485
  process.dlopen(filename, module.exports);
          ^
Error: dlopen(/Users/jenrobinson/Sites/btc/node_modules/btctrader/node_modules/microtime/build/Release/microtime.node, 1): no suitable image found.  Did find:
    /Users/jenrobinson/Sites/btc/node_modules/btctrader/node_modules/microtime/build/Release/microtime.node: mach-o, but wrong architecture
    at Object.Module._extensions..node (module.js:485:11)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:362:17)
    at require (module.js:378:17)
    at Object.<anonymous> (/Users/jenrobinson/Sites/btc/node_modules/btctrader/node_modules/microtime/index.js:9:24)
    at Module._compile (module.js:449:26)
    at Object.Module._extensions..js (module.js:467:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
jen:examples jenrobinson$ node -pe process.arch
x64
jen:examples jenrobinson$ lipo -info /Users/jenrobinson/Sites/btc/node_modules/btctrader/node_modules/microtime/build/Release/microtime.node
Non-fat file: /Users/jenrobinson/Sites/btc/node_modules/btctrader/node_modules/microtime/build/Release/microtime.node is architecture: i386

Here's the log from my installation:

jen:btc jenrobinson$ npm install git://github.com/bitfloor/trader.nodejs.git
npm http GET https://registry.npmjs.org/microtime/0.2.0
npm http GET https://registry.npmjs.org/colors/0.6.0-1
npm http GET https://registry.npmjs.org/num/0.1.2
npm http 304 https://registry.npmjs.org/colors/0.6.0-1
npm http 304 https://registry.npmjs.org/microtime/0.2.0
npm http 304 https://registry.npmjs.org/num/0.1.2

> microtime@0.2.0 install /Users/jenrobinson/Sites/btc/node_modules/btctrader/node_modules/microtime
> node-waf configure build

npm http GET https://registry.npmjs.org/int/0.1.0
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                   : ok /usr/local/bin/node 
Checking for node prefix                 : ok /usr/local 
'configure' finished successfully (0.058s)
Waf: Entering directory `/Users/jenrobinson/Sites/btc/node_modules/btctrader/node_modules/microtime/build'
[1/2] cxx: src/microtime.cc -> build/Release/src/microtime_1.o
npm http 304 https://registry.npmjs.org/int/0.1.0
[2/2] cxx_link: build/Release/src/microtime_1.o -> build/Release/microtime.node
Waf: Leaving directory `/Users/jenrobinson/Sites/btc/node_modules/btctrader/node_modules/microtime/build'
'build' finished successfully (0.264s)
btctrader@0.0.1 node_modules/btctrader
├── colors@0.6.0-1
├── num@0.1.2 (int@0.1.0)
└── microtime@0.2.0
defunctzombie commented 11 years ago

what version of node.js are you running? Did you build it from source or install the precompiled binaries? I usually build from source so it may be that there is something with the binary download.

I will also update the lib with the latest versions of some of those packages to bring in new changes they will have for the newer nodejs versions.

jenrobinson commented 11 years ago

I had installed from precompiled binaries (v0.8.7). I re-installed from source and that did the trick!

Thanks for the response. Look forward to playing with this.

On Thursday, August 16, 2012, Roman Shtylman wrote:

what version of node.js are you running? Did you build it from source or install the precompiled binaries? I usually build from source so it may be that there is something with the binary download.

I will also update the lib with the latest versions of some of those packages to bring in new changes they will have for the newer nodejs versions.

— Reply to this email directly or view it on GitHubhttps://github.com/bitfloor/trader.nodejs/issues/3#issuecomment-7801309.