Symbol not found error on run
spikeheap opened this issue · 7 comments
First run at node wiringpi, so apologies if I'm just being obtuse.
Running npm install git+https://github.com/nekuz0r/wiring-pi.git generated a good number of warnings such as
../src/bindings.cc:2273:3: warning: ‘static v8::Local<v8::FunctionTemplate> v8::FunctionTemplate::New(v8::InvocationCallback, v8::Handle<v8::Value>, v8::Handle<v8::Signature>, int)’ is deprecated (declared at /root/.node-gyp/0.11.6/deps/v8/include/v8.h:3354) [-Wdeprecated-declarations]
And running the following code:
var wiringpi = require( 'wiring-pi' );
var RELAY_A = 24
var RELAY_B = 25
exports.getCurrentState = function(){
wiringpi.setup('gpio');
var selectedRelay = RELAY_A
var relayState = wiringpi.digitalRead(selectedRelay)
return relayState;
};
Generated the following error:
node: symbol lookup error: /usr/local/myapp/app/node_modules/wiring-pi/build/Release/wiringPi.node: undefined symbol: _ZN2v816FunctionTemplate3NewEPFNS_6HandleINS_5ValueEEERKNS_9ArgumentsEES3_NS1_INS_9SignatureEEEi
This is running on a v1 Pi running Raspian IPE (in R/W mode of course :p )
Any ideas?
Cheers!
This seems to be caused by the the version of v8 engine used in release v0.11.6 of nodejs.
The function v8::FunctionTemplate::New() is deprecated by the version of v8 engine.
Since nodejs v0.11.6 is unstable, i suggest to use the last stable (v0.10.22) with which wiring-pi is working.
I will fix the code, so it will works with the future version of nodejs.
That's great. Thanks. I didn't realise 0.11.6 was unstable, I'd just grabbed the most recent release with a pi build. I've got 0.10.22 building as we speak.
I created a branche named node-v0.11.x, it compiles with node v0.11.6 and seems to work.
That's great work. I've just tried installing it and it compiled fine. I still get the same symbol lookup error, but I'm pretty tired so I'll do a clean run tomorrow :). Cheers!
I tried, on a clean raspbian installation, compiled node 0.11.6, compiled the node-v0.11.x branch and it works for me, no symbol lookup error.
Thanks for checking it on your system. I've done the same and it works, not sure how I managed to get it into the error state, but it's working now so cheers!
@spikeheap Good news !
The node-v0.11.x branch will be merged into master as soon as node v0.12 (stable) is released.